fsh-shell/bin/FSHa.lst

4454 lines
179 KiB
Plaintext

1 00:0000 - - - - #include "includes/static/ti84pce.inc"
Listing for file "/home/pi/Documents/asm/FSH/includes/static/ti84pce.inc"
1 00:0000 - - - - ;TI-84 Plus CE Include File
2 00:0000 - - - -
3 00:0000 - - - - ;Various Parts Contributed by
4 00:0000 - - - - ;- BrandonW
5 00:0000 - - - - ;- calc84
6 00:0000 - - - - ;- MateoConLechuga
7 00:0000 - - - - ;- Runer112
8 00:0000 - - - - ;- tr1p1ea
9 00:0000 - - - - ;- Kerm Martian
10 00:0000 - - - - ;- Texas Instruments (ti83plus.inc)
Listing for file "FSHa.asm"
2 00:0000 - - - - #include "includes/static/define.inc"
Listing for file "/home/pi/Documents/asm/FSH/includes/static/define.inc"
Listing for file "FSHa.asm"
3 00:0000 - - - - #include "includes/macros/macros.inc"
Listing for file "/home/pi/Documents/asm/FSH/includes/macros/macros.inc"
1 00:0000 - - - - #include "includes/macros/misc.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/macros/misc.asm"
1 00:0000 - - - - ;;rgbto565
2 00:0000 - - - - ;;turns an rgb input into the 656 format that the lcd uses
3 00:0000 - - - - ;;Inputs:
4 00:0000 - - - - ;; r,g,b
5 00:0000 - - - - ;;Outputs:
6 00:0000 - - - - ;; HL: color
7 00:0000 - - - - #macro rgbto565(red, green, blue)
8 00:0000 ld hl, ((red / 255 * 31) << 11) | ((green / 255 * 63) << 5) | ((blue / 255 * 31))
9 00:0000 #endmacro
Listing for file "/home/pi/Documents/asm/FSH/includes/macros/macros.inc"
2 00:0000 - - - - #include "includes/macros/pixel.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/macros/pixel.asm"
1 00:0000 - - - - ;;pixel
2 00:0000 - - - - ;;Gets vRam location of coordinates
3 00:0000 - - - - ;;Inputs:
4 00:0000 - - - - ;; x: x axis
5 00:0000 - - - - ;; y: y axis
6 00:0000 - - - - ;;Outputs:
7 00:0000 - - - - ;; DE: vRam location
8 00:0000 - - - - #macro pixel(x, y)
9 00:0000 ld de, vRam + (y * 320 * 2) + (x * 2)
10 00:0000 #endmacro
Listing for file "/home/pi/Documents/asm/FSH/includes/macros/macros.inc"
3 00:0000 - - - - #include "includes/macros/draw.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/macros/draw.asm"
1 00:0000 - - - - #macro drawpixelxyM(x, y)
2 00:0000 ld de, x
3 00:0000 ld a, y
4 00:0000 call drawpixelxy
5 00:0000 #endmacro
6 00:0000 - - - -
7 00:0000 - - - - #macro drawlineM(x1, y1, x2, y2)
8 00:0000 ;TODO
9 00:0000 #endmacro
10 00:0000 - - - -
11 00:0000 - - - - #macro drawrowM(y)
12 00:0000 ld a, y
13 00:0000 call drawrow
14 00:0000 #endmacro
15 00:0000 - - - -
16 00:0000 - - - - #macro drawbarM(y, height)
17 00:0000 ld a, y
18 00:0000 ld bc, height
19 00:0000 call drawbar
20 00:0000 #endmacro
21 00:0000 - - - -
22 00:0000 - - - - #macro drawrectfilledM(x, y, width, height)
23 00:0000 ex de, hl
24 00:0000 ld ixl, e
25 00:0000 ld ixh, d
26 00:0000 ex de, hl
27 00:0000 ld hl, width
28 00:0000 ld de, x
29 00:0000 ld bc, 0
30 00:0000 ld c, y
31 00:0000 ld a, height
32 00:0000 call drawrectfilled
33 00:0000 #endmacro
Listing for file "/home/pi/Documents/asm/FSH/includes/macros/macros.inc"
Listing for file "FSHa.asm"
4 00:0000 - - - -
5 00:0000 - - - - .assume ADL=1
6 00:0000 - - - - .org userMem-2
7 D1:A87F EF 7B - - .DB tExtTok,tAsm84CeCmp
8 D1:A881 - - - -
9 D1:A881 - - - - Setup:
10 D1:A881 CD 48 08 02 CALL _RunIndicOff
11 D1:A885 CD 38 11 02 CALL _EnableAPD
12 D1:A889 FD CB 08 DE SET apdRunning,(iy+apdFlags)
13 D1:A88D CD 28 08 02 CALL _homeup
14 D1:A891 CD 08 08 02 CALL _ClrLCDFull
15 D1:A895 - - - -
16 D1:A895 CD B2 B4 D1 CALL drawstatusbar
17 D1:A899 - - - -
18 D1:A899 CD E7 B2 D1 CALL fshvarreset
19 D1:A89D - - - -
20 D1:A89D CD 8D B4 D1 CALL printmotd
21 D1:A8A1 - - - -
22 D1:A8A1 - - - - Input:
23 D1:A8A1 - - - - ;; TODO: Update status bar sometimes
24 D1:A8A1 3E 00 - - LD A, $00
25 D1:A8A3 CD D8 B0 D1 CALL commandfill
26 D1:A8A7 - - - -
27 D1:A8A7 21 2B A9 D1 LD HL, PS1
28 D1:A8AB CD 14 AB D1 CALL printprompt
29 D1:A8AF - - - -
30 D1:A8AF 21 9F EA D0 LD HL, FshCmd
31 D1:A8B3 11 2C 00 00 LD DE, FshCmdInptSize
32 D1:A8B7 CD 9C AD D1 CALL inputstr
33 D1:A8BB - - - -
34 D1:A8BB 21 9F EA D0 LD HL, FshCmd
35 D1:A8BF CD F3 B0 D1 CALL fshparsecommand
36 D1:A8C3 - - - -
37 D1:A8C3 CD F0 07 02 CALL _NewLine
38 D1:A8C7 - - - -
39 D1:A8C7 - - - - Decode:
40 D1:A8C7 21 9F EA D0 LD HL, FshCmd
41 D1:A8CB 11 CF EA D0 LD DE, FshCmdOP
42 D1:A8CF CD 3A B6 D1 CALL commanddecode
43 D1:A8D3 - - - -
44 D1:A8D3 - - - - Route:
45 D1:A8D3 21 CF EA D0 LD HL, FshCmdOP
46 D1:A8D7 C3 43 B6 D1 JP commandroute
47 D1:A8DB - - - -
48 D1:A8DB - - - - Fin:
49 D1:A8DB C3 A1 A8 D1 JP Input
50 D1:A8DF - - - -
51 D1:A8DF - - - - Err:
52 D1:A8DF C3 12 B3 D1 JP ErrRoute
53 D1:A8E3 - - - -
54 D1:A8E3 - - - - Cleanup:
55 D1:A8E3 FD CB 03 C6 SET graphdraw,(IY+graphflags)
56 D1:A8E7 CD 08 08 02 CALL _ClrLCDFull
57 D1:A8EB CD 18 08 02 CALL _ClrTxtShdw
58 D1:A8EF CD 28 08 02 CALL _homeup
59 D1:A8F3 CD 3C 1A 02 call _DrawStatusBar
60 D1:A8F7 - - - -
61 D1:A8F7 - - - - Exit:
62 D1:A8F7 FD CB 00 AE RES donePrgm,(iy+doneFlags)
63 D1:A8FB C9 - - - RET
64 D1:A8FC - - - -
65 D1:A8FC - - - - #include "includes/Text.inc"
Listing for file "/home/pi/Documents/asm/FSH/includes/Text.inc"
1 D1:A8FC - - - - ;STRINGS -------------------------
2 D1:A8FC 46 73 68 20
53 48 65 6C
6C 00 - - FshName: .db "Fsh SHell", 0
3 D1:A906 42 79 20 70
69 78 69 79
73 00 - - FshBy: .db "By pixiys", 0
4 D1:A910 73 74 65 70
68 65 6E 6C
74 6F 74 68
2E 63 6F 6D
2F 66 73 68
2D 73 68 65
6C 6C 00 - FshSite: .db "stephenltoth.com/fsh-shell", 0
5 D1:A92B 46 53 48 3E
20 00 - - PS1: .db "FSH> ", 0
6 D1:A931 36 34 77 00 FshVVars: .db "64w", 0
7 D1:A935 30 00 - - FshVMajor: .db "0", 0
8 D1:A937 31 00 - - FshVMinor: .db "1", 0
9 D1:A939 31 00 - - FshVPatch: .db "1", 0
10 D1:A93B 35 30 30 00 FshVBuild: .db "500", 0
11 D1:A93F 2E 00 - - FshVSeparator: .db ".", 0
12 D1:A941 50 72 65 73
73 20 32 6E
64 20 66 6F
72 20 6E 75
6D 62 65 72
73 00 - - FshMotd2nd: .db "Press 2nd for numbers", 0
13 D1:A957 54 79 70 65
20 27 48 45
4C 50 27 20
66 6F 72 20
68 65 6C 70
00 - - - FshMotdHelp: .db "Type 'HELP' for help", 0
Listing for file "FSHa.asm"
66 D1:A96C 00 - - - FshFlags: .DB %00000000
67 D1:A96D - - - - ; 0: Debug Flag
68 D1:A96D - - - - ; 1: Error Flag
69 D1:A96D - - - - ; 2: Program Flag
70 D1:A96D - - - -
71 D1:A96D - - - - #include "includes/lib/std/std.inc"
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/std.inc"
1 D1:A96D - - - - #include "includes/lib/std/Math.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/Math.asm"
1 D1:A96D - - - - ;;cpHLDE
2 D1:A96D - - - - ;;Compares HL to DE.
3 D1:A96D - - - - ;;Output:
4 D1:A96D - - - - ;; Same as z80 CP instruction.
5 D1:A96D - - - - cpHLDE:
6 D1:A96D B7 - - - or a
7 D1:A96E ED 52 - - sbc hl, de
8 D1:A970 19 - - - add hl,de
9 D1:A971 C9 - - - ret
10 D1:A972 - - - -
11 D1:A972 - - - - ;;cpHLBC
12 D1:A972 - - - - ;;Compares HL to BC.
13 D1:A972 - - - - ;;Output:
14 D1:A972 - - - - ;; Same as z80 CP instruction.
15 D1:A972 - - - - cpHLBC:
16 D1:A972 B7 - - - or a
17 D1:A973 ED 42 - - sbc hl, bc
18 D1:A975 09 - - - add hl,bc
19 D1:A976 C9 - - - ret
20 D1:A977 - - - -
21 D1:A977 - - - - ;;cpBCDE
22 D1:A977 - - - - ;;Compares DE to BC.
23 D1:A977 - - - - ;;Output:
24 D1:A977 - - - - ;; Same as z80 CP instruction.
25 D1:A977 - - - - cpBCDE:
26 D1:A977 E5 - - - push hl
27 D1:A978 60 - - - ld h, b
28 D1:A979 69 - - - ld l, c
29 D1:A97A B7 - - - or a
30 D1:A97B ED 52 - - sbc hl, de
31 D1:A97D E1 - - - pop hl
32 D1:A97E C9 - - - ret
33 D1:A97F - - - -
34 D1:A97F - - - - ;;mulAbyB
35 D1:A97F - - - - ;;Multiplys AxB
36 D1:A97F - - - - ;;Inputs:
37 D1:A97F - - - - ;; A: Multiplier
38 D1:A97F - - - - ;; B: Multiplicand
39 D1:A97F - - - - ;;Outputs:
40 D1:A97F - - - - ;; A: Product of A and B.
41 D1:A97F - - - - mulAbyB:
42 D1:A97F C5 - - - push bc
43 D1:A980 4F - - - ld c, a
44 D1:A981 - - - - mulAbyBLoop:
45 D1:A981 81 - - - add a, c
46 D1:A982 10 FD - - djnz mulAbyBLoop
47 D1:A984 91 - - - sub c
48 D1:A985 C1 - - - pop bc
49 D1:A986 C9 - - - ret
50 D1:A987 - - - -
51 D1:A987 - - - - ;;mulAbyHL
52 D1:A987 - - - - ;;Multiplys AxHL
53 D1:A987 - - - - ;;Inputs:
54 D1:A987 - - - - ;; A: Multiplier
55 D1:A987 - - - - ;; HL: Multiplicand
56 D1:A987 - - - - ;;Outputs:
57 D1:A987 - - - - ;; HL: Product of A and HL.
58 D1:A987 - - - - mulAbyHL:
59 D1:A987 C5 - - - push bc
60 D1:A988 D5 - - - push de
61 D1:A989 11 00 00 00 ld de, 0
62 D1:A98D EB - - - ex de, hl
63 D1:A98E FE 00 - - cp 0
64 D1:A990 28 04 - - jr z, mulAbyHLEnd
65 D1:A992 47 - - - ld b, a
66 D1:A993 - - - - mulAbyHLLoop:
67 D1:A993 19 - - - add hl, de
68 D1:A994 10 FD - - djnz mulAbyHLLoop
69 D1:A996 - - - - mulAbyHLEnd:
70 D1:A996 D1 - - - pop de
71 D1:A997 C1 - - - pop bc
72 D1:A998 C9 - - - ret
73 D1:A999 - - - -
74 D1:A999 - - - - ;;modHL
75 D1:A999 - - - - ;;H % L => H
76 D1:A999 - - - - ;;Inputs:
77 D1:A999 - - - - ;; H:
78 D1:A999 - - - - ;; L:
79 D1:A999 - - - - modHL:
80 D1:A999 C5 - - - push bc
81 D1:A99A 44 - - - ld b, h
82 D1:A99B 3E 00 - - ld a, 0
83 D1:A99D - - - - modHLLoop:
84 D1:A99D 3C - - - inc a
85 D1:A99E BD - - - cp a, l
86 D1:A99F 20 02 - - jr nz, modHLLoopEnd
87 D1:A9A1 3E 00 - - ld a, 0
88 D1:A9A3 - - - - modHLLoopEnd:
89 D1:A9A3 10 F8 - - djnz modHLLoop
90 D1:A9A5 67 - - - ld h, a
91 D1:A9A6 C1 - - - pop bc
92 D1:A9A7 C9 - - - ret
93 D1:A9A8 - - - -
94 D1:A9A8 - - - -
95 D1:A9A8 - - - -
96 D1:A9A8 - - - - ;;mul32By8
97 D1:A9A8 - - - - ;;Performs an unsigned multiplication of DEHL and A.
98 D1:A9A8 - - - - ;;Outputs:
99 D1:A9A8 - - - - ;; DEHL: product of DEHL and A
100 D1:A9A8 - - - - mul32By8:
101 D1:A9A8 C5 DD E5 - push bc \ push ix
102 D1:A9AB DD 2E 08 - ld ixl, 8
103 D1:A9AE D5 - - - push de
104 D1:A9AF E5 - - - push hl
105 D1:A9B0 21 00 00 00 ld hl, 0
106 D1:A9B4 54 - - - ld d, h
107 D1:A9B5 5D - - - ld e, l
108 D1:A9B6 - - - - mul32by8loop:
109 D1:A9B6 29 - - - add hl, hl
110 D1:A9B7 CB 13 - - rl e
111 D1:A9B9 CB 12 - - rl d
112 D1:A9BB 17 - - - rla
113 D1:A9BC 30 0A - - jr nc, mul32by8noAdd
114 D1:A9BE C1 - - - pop bc
115 D1:A9BF 09 - - - add hl, bc
116 D1:A9C0 E3 - - - ex (sp), hl
117 D1:A9C1 E5 - - - push hl
118 D1:A9C2 ED 5A - - adc hl, de
119 D1:A9C4 D1 - - - pop de
120 D1:A9C5 EB - - - ex de, hl
121 D1:A9C6 E3 - - - ex (sp), hl
122 D1:A9C7 C5 - - - push bc
123 D1:A9C8 - - - - mul32by8noAdd:
124 D1:A9C8 DD 2D - - dec ixl
125 D1:A9CA 20 EA - - jr nz, mul32by8loop
126 D1:A9CC C1 - - - pop bc
127 D1:A9CD C1 - - - pop bc
128 D1:A9CE DD E1 C1 - pop ix \ pop bc
129 D1:A9D1 C9 - - - ret
130 D1:A9D2 - - - -
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/std.inc"
2 D1:A9D2 - - - - #include "includes/lib/std/Random.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/Random.asm"
1 D1:A9D2 - - - - ;;randomint
2 D1:A9D2 - - - - ;;Gets an 8-bit random number.
3 D1:A9D2 - - - - ;;Inputs:
4 D1:A9D2 - - - - ;; A: Seed
5 D1:A9D2 - - - - ;;Outputs:
6 D1:A9D2 - - - - ;; A: Random number (0-255)
7 D1:A9D2 - - - - ;;Notes:
8 D1:A9D2 - - - - ;; This is not cryptographically random.
9 D1:A9D2 - - - - randomint:
10 D1:A9D2 32 25 AA D1 ld (randomintSeed), a
11 D1:A9D6 E5 - - - push hl
12 D1:A9D7 D5 - - - push de
13 D1:A9D8 C5 - - - push bc
14 D1:A9D9 2A 25 AA D1 ld hl, (randomintSeed)
15 D1:A9DD ED 5B 27 AA
D1 - - - ld de, (randomintSeed+2)
16 D1:A9E2 44 - - - ld b, h
17 D1:A9E3 4D - - - ld c, l
18 D1:A9E4 29 CB 13 CB
12 - - - add hl, hl \ rl e \ rl d
19 D1:A9E9 29 CB 13 CB
12 - - - add hl, hl \ rl e \ rl d
20 D1:A9EE 2C - - - inc l
21 D1:A9EF 09 - - - add hl, bc
22 D1:A9F0 22 25 AA D1 ld (randomintSeed), hl
23 D1:A9F4 2A 27 AA D1 ld hl, (randomintSeed+2)
24 D1:A9F8 ED 5A - - adc hl, de
25 D1:A9FA 22 28 AA D1 ld (randomintSeed+3), hl
26 D1:A9FE EB - - - ex de, hl
27 D1:A9FF 2A 25 AA D1 ld hl, (randomintSeed)
28 D1:AA03 ED 5B 29 AA
D1 - - - ld de, (randomintSeed+4)
29 D1:AA08 01 5E F9 00 ld bc, 63838
30 D1:AA0C 29 CB 11 CB
10 - - - add hl, hl \ rl c \ rl b
31 D1:AA11 ED 43 2B AA
D1 - - - ld (randomintSeed+6), bc
32 D1:AA16 9F - - - sbc a, a
33 D1:AA17 E6 F1 - - and %11110001
34 D1:AA19 AD - - - xor l
35 D1:AA1A 6F - - - ld l, a
36 D1:AA1B 22 2C AA D1 ld (randomintSeed+7), hl
37 D1:AA1F 7A - - - ld a, d
38 D1:AA20 80 - - - add a, b
39 D1:AA21 C1 - - - pop bc
40 D1:AA22 D1 - - - pop de
41 D1:AA23 E1 - - - pop hl
42 D1:AA24 C9 - - - ret
43 D1:AA25 - - - - ;Actual random bytes
44 D1:AA25 28 BE B3 BB
A3 F1 97 AF
87 50 26 91
46 CC 5F C7 randomintSeed: .db $28, $BE, $B3, $BB, $a3, $f1, $97, $af, $87, $50, $26, $91, $46, $cc, $5f, $c7
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/std.inc"
3 D1:AA35 - - - - #include "includes/lib/std/Byte.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/Byte.asm"
1 D1:AA35 - - - - ;;bytecmp
2 D1:AA35 - - - - ;;Determines if two bytes are equal.
3 D1:AA35 - - - - ;;Inputs:
4 D1:AA35 - - - - ;; HL: Byte pointer
5 D1:AA35 - - - - ;; DE: Byte pointer
6 D1:AA35 - - - - ;;Outputs:
7 D1:AA35 - - - - ;; Z: Set if equal, reset if not equal
8 D1:AA35 - - - - bytecmp:
9 D1:AA35 E5 - - - push hl
10 D1:AA36 D5 - - - push de
11 D1:AA37 1A - - - ld a, (de)
12 D1:AA38 B7 - - - or a
13 D1:AA39 BE - - - cp (hl)
14 D1:AA3A D1 - - - pop de
15 D1:AA3B E1 - - - pop hl
16 D1:AA3C C9 - - - ret
17 D1:AA3D - - - -
18 D1:AA3D - - - - ;;bytecpy
19 D1:AA3D - - - - ;; Copies a byte.
20 D1:AA3D - - - - ;;Inputs:
21 D1:AA3D - - - - ;; HL: Byte pointer
22 D1:AA3D - - - - ;; DE: Destination
23 D1:AA3D - - - - bytecpy:
24 D1:AA3D D5 - - - push de
25 D1:AA3E E5 - - - push hl
26 D1:AA3F EB - - - ex de, hl
27 D1:AA40 1A - - - ld a, (de)
28 D1:AA41 77 - - - ld (hl), a
29 D1:AA42 E1 - - - pop hl
30 D1:AA43 D1 - - - pop de
31 D1:AA44 C9 - - - ret
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/std.inc"
4 D1:AA45 - - - - #include "includes/lib/std/Word.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/Word.asm"
1 D1:AA45 - - - - ;;wordcpy [Words]
2 D1:AA45 - - - - ;;Copies a word.
3 D1:AA45 - - - - ;;Inputs:
4 D1:AA45 - - - - ;; HL: word pointer
5 D1:AA45 - - - - ;; DE: Destination
6 D1:AA45 - - - - wordcpy:
7 D1:AA45 D5 - - - push de
8 D1:AA46 E5 - - - push hl
9 D1:AA47 EB - - - ex de, hl
10 D1:AA48 1A - - - ld a, (de)
11 D1:AA49 77 - - - ld (hl), a
12 D1:AA4A 13 - - - inc de
13 D1:AA4B 23 - - - inc hl
14 D1:AA4C 1A - - - ld a, (de)
15 D1:AA4D 77 - - - ld (hl), a
16 D1:AA4E E1 - - - pop hl
17 D1:AA4F D1 - - - pop de
18 D1:AA50 C9 - - - ret
19 D1:AA51 - - - -
20 D1:AA51 - - - - ;;wordcmp
21 D1:AA51 - - - - ;;Compares 2 words
22 D1:AA51 - - - - ;;Inputs:
23 D1:AA51 - - - - ;; HL: word pointer
24 D1:AA51 - - - - ;; DE: word pointer
25 D1:AA51 - - - - wordcmp:
26 D1:AA51 E5 - - - push hl
27 D1:AA52 D5 - - - push de
28 D1:AA53 1A - - - ld a, (de)
29 D1:AA54 BE - - - cp a, (hl)
30 D1:AA55 20 04 - - jr nz, wordcmpEnd
31 D1:AA57 23 - - - inc hl
32 D1:AA58 13 - - - inc de
33 D1:AA59 1A - - - ld a, (de)
34 D1:AA5A BE - - - cp a, (hl)
35 D1:AA5B - - - - wordcmpEnd:
36 D1:AA5B D1 - - - pop de
37 D1:AA5C E1 - - - pop hl
38 D1:AA5D C9 - - - ret
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/std.inc"
5 D1:AA5E - - - - #include "includes/lib/std/Mem.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/Mem.asm"
1 D1:AA5E - - - - ;;memset
2 D1:AA5E - - - - ;;Fills B amount of bytes from hl with a
3 D1:AA5E - - - - ;;Inputs:
4 D1:AA5E - - - - ;; HL: start
5 D1:AA5E - - - - ;; B: how many bytes
6 D1:AA5E - - - - ;; A: Byte
7 D1:AA5E - - - - memset:
8 D1:AA5E E5 - - - push hl
9 D1:AA5F C5 - - - push bc
10 D1:AA60 - - - - memsetLoop:
11 D1:AA60 77 - - - ld (hl), a
12 D1:AA61 23 - - - inc hl
13 D1:AA62 10 FC - - djnz memsetLoop
14 D1:AA64 C1 - - - pop bc
15 D1:AA65 E1 - - - pop hl
16 D1:AA66 C9 - - - ret
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/std.inc"
6 D1:AA67 - - - - #include "includes/lib/std/Char.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/Char.asm"
1 D1:AA67 - - - - #include "includes/tables/CSC.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/tables/CSC.asm"
1 D1:AA67 - - - - charMapCSC:
2 D1:AA67 22 57 52 4D
48 FF FF - .DB "\"WRMH", $FF, $FF
3 D1:AA6E 3F 5B 56 51
4C 47 FF FF .DB Lquestion, Ltheta, "VQLG", $FF, $FF
4 D1:AA76 3A 5A 55 50
4B 46 43 FF .DB ":ZUPKFC", $FF
5 D1:AA7E 20 59 54 4F
4A 45 42 FF .DB " YTOJEB", $FF
6 D1:AA86 FF 58 53 4E
49 44 41 - .DB $FF, "XSNIDA"
7 D1:AA8D - - - -
8 D1:AA8D - - - - numsymMapCSC
9 D1:AA8D 2B 2D 2A 2F
5E FF FF - .DB "+-*/^", $FF, $FF
10 D1:AA94 5F 33 36 39
29 C1 5D FF .DB "_369)", $C1, "]", $FF
11 D1:AA9C 2E 32 35 38
28 7B 7D 3B .DB ".258({};"
12 D1:AAA4 30 31 34 37
2C 20 3C 3E
7C FF - - .DB "0147, <>|", $FF
13 D1:AAAE 05 21 40 23
25 26 - - .DB $05, "!@#%&"
14 D1:AAB4 - - - -
15 D1:AAB4 - - - - numMapCSC
16 D1:AAB4 FF FF FF FF
FF FF FF - .DB $FF, $FF, $FF, $FF, $FF, $FF, $FF
17 D1:AABB FF 33 36 39
FF FF FF FF .DB $FF, "369", $FF, $FF, $FF, $FF
18 D1:AAC3 FF 32 35 38
FF FF FF FF .DB $FF, "258", $FF, $FF, $FF, $FF
19 D1:AACB 30 31 34 37
FF FF FF FF
FF FF - - .DB "0147", $FF, $FF, $FF, $FF, $FF, $FF
20 D1:AAD5 FF FF FF FF
FF FF - - .DB $FF, $FF, $FF, $FF, $FF, $FF
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/Char.asm"
2 D1:AADB - - - - ;;chartoascii
3 D1:AADB - - - - ;;Converts a char to "ascii"
4 D1:AADB - - - - ;;Inputs:
5 D1:AADB - - - - ;; A: char code (csc)
6 D1:AADB - - - - ;;Outputs:
7 D1:AADB - - - - ;; A: ascii char
8 D1:AADB - - - - chartoascii:
9 D1:AADB E5 - - - push hl
10 D1:AADC 21 00 00 00 ld hl, 0
11 D1:AAE0 26 00 - - ld h, 0
12 D1:AAE2 6F - - - ld l, a
13 D1:AAE3 11 67 AA D1 ld de, charMapCSC
14 D1:AAE7 19 - - - add hl, de
15 D1:AAE8 7E - - - ld a, (hl)
16 D1:AAE9 E1 - - - pop hl
17 D1:AAEA C9 - - - ret
18 D1:AAEB - - - -
19 D1:AAEB - - - - ;;Charnumtoascii
20 D1:AAEB - - - - ;;Converts a char to "ascii"
21 D1:AAEB - - - - ;;Inputs:
22 D1:AAEB - - - - ;; A: char code (csc)
23 D1:AAEB - - - - ;;Outputs:
24 D1:AAEB - - - - ;; A: ascii char
25 D1:AAEB - - - - charnumtoascii:
26 D1:AAEB E5 - - - push hl
27 D1:AAEC 21 00 00 00 ld hl, 0
28 D1:AAF0 26 00 - - ld h, 0
29 D1:AAF2 6F - - - ld l, a
30 D1:AAF3 11 B4 AA D1 ld de, numMapCSC
31 D1:AAF7 19 - - - add hl, de
32 D1:AAF8 7E - - - ld a, (hl)
33 D1:AAF9 E1 - - - pop hl
34 D1:AAFA C9 - - - ret
35 D1:AAFB - - - -
36 D1:AAFB - - - - ;;charnumsymtoascii
37 D1:AAFB - - - - ;;Converts a char to "ascii"
38 D1:AAFB - - - - ;;Inputs:
39 D1:AAFB - - - - ;; A: char code (csc)
40 D1:AAFB - - - - ;;Outputs:
41 D1:AAFB - - - - ;; A: ascii char
42 D1:AAFB - - - - charnumsymtoascii:
43 D1:AAFB E5 - - - push hl
44 D1:AAFC 21 00 00 00 ld hl, 0
45 D1:AB00 26 00 - - ld h, 0
46 D1:AB02 6F - - - ld l, a
47 D1:AB03 11 8D AA D1 ld de, numsymMapCSC
48 D1:AB07 19 - - - add hl, de
49 D1:AB08 7E - - - ld a, (hl)
50 D1:AB09 E1 - - - pop hl
51 D1:AB0A C9 - - - ret
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/std.inc"
7 D1:AB0B - - - - #include "includes/lib/std/Cursor.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/Cursor.asm"
1 D1:AB0B - - - - ;;cursorcharunderreset
2 D1:AB0B - - - - ;;Sets curUnder to 0
3 D1:AB0B - - - - cursorcurunderreset:
4 D1:AB0B E5 - - - push hl
5 D1:AB0C 21 99 05 D0 ld hl, curUnder
6 D1:AB10 36 20 - - ld (hl), ' '
7 D1:AB12 E1 - - - pop hl
8 D1:AB13 C9 - - - ret
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/std.inc"
8 D1:AB14 - - - - #include "includes/lib/std/Print.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/Print.asm"
1 D1:AB14 - - - - ;;printprompt
2 D1:AB14 - - - - ;;Sets curcol to 0 and prints prompt
3 D1:AB14 - - - - ;;Inputs:
4 D1:AB14 - - - - ;; HL: Prompt String Location
5 D1:AB14 - - - - printprompt:
6 D1:AB14 E5 - - - push hl
7 D1:AB15 AF - - - xor a
8 D1:AB16 32 96 05 D0 ld (CurCol), a
9 D1:AB1A CD C0 07 02 call _PutS
10 D1:AB1E E1 - - - pop hl
11 D1:AB1F C9 - - - ret
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/std.inc"
9 D1:AB20 - - - - #include "includes/lib/std/Draw.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/Draw.asm"
1 D1:AB20 - - - - ;;drawpixel
2 D1:AB20 - - - - ;;Sets a pixel to specified color (565)
3 D1:AB20 - - - - ;;Inputs:
4 D1:AB20 - - - - ;; HL: color
5 D1:AB20 - - - - ;; DE: vRam location
6 D1:AB20 - - - - drawpixel:
7 D1:AB20 E5 - - - push hl
8 D1:AB21 D5 - - - push de
9 D1:AB22 EB - - - ex de, hl
10 D1:AB23 73 - - - ld (hl), e
11 D1:AB24 23 - - - inc hl
12 D1:AB25 72 - - - ld (hl), d
13 D1:AB26 D1 - - - pop de
14 D1:AB27 E1 - - - pop hl
15 D1:AB28 C9 - - - ret
16 D1:AB29 - - - -
17 D1:AB29 - - - - ;;drawpixelxy
18 D1:AB29 - - - - ;;Sets a pixel to specified color
19 D1:AB29 - - - - ;;Inputs:
20 D1:AB29 - - - - ;; HL: color
21 D1:AB29 - - - - ;; DE: x
22 D1:AB29 - - - - ;; A: y
23 D1:AB29 - - - - drawpixelxy
24 D1:AB29 D5 - - - push de
25 D1:AB2A E5 - - - push hl
26 D1:AB2B EB - - - ex de, hl
27 D1:AB2C 29 - - - add hl, hl
28 D1:AB2D E5 - - - push hl
29 D1:AB2E 21 80 02 00 ld hl, 640
30 D1:AB32 CD 87 A9 D1 call mulAbyHL
31 D1:AB36 EB - - - ex de, hl
32 D1:AB37 E1 - - - pop hl
33 D1:AB38 19 - - - add hl, de
34 D1:AB39 11 00 00 D4 ld de, vRam
35 D1:AB3D 19 - - - add hl, de
36 D1:AB3E EB - - - ex de, hl
37 D1:AB3F E1 - - - pop hl
38 D1:AB40 CD 20 AB D1 call drawpixel
39 D1:AB44 D1 - - - pop de
40 D1:AB45 C9 - - - ret
41 D1:AB46 - - - -
42 D1:AB46 - - - - ;;drawrow
43 D1:AB46 - - - - ;;Draws a row on lcd
44 D1:AB46 - - - - ;;Inputs:
45 D1:AB46 - - - - ;; A: y
46 D1:AB46 - - - - ;; HL: color
47 D1:AB46 - - - - drawrow:
48 D1:AB46 E5 - - - push hl
49 D1:AB47 C5 - - - push bc
50 D1:AB48 E5 - - - push hl
51 D1:AB49 21 E0 01 00 ld hl, lcdHeight * 2
52 D1:AB4D CD 87 A9 D1 call mulAbyHL
53 D1:AB51 11 00 00 D4 ld de, vRam
54 D1:AB55 19 - - - add hl, de
55 D1:AB56 EB - - - ex de, hl
56 D1:AB57 E1 - - - pop hl
57 D1:AB58 01 40 01 00 ld bc, lcdWidth
58 D1:AB5C - - - - drawrowLoop:
59 D1:AB5C CD 20 AB D1 call drawpixel
60 D1:AB60 13 - - - inc de
61 D1:AB61 13 - - - inc de
62 D1:AB62 0B - - - dec bc
63 D1:AB63 E5 - - - push hl
64 D1:AB64 21 00 00 00 ld hl, 0
65 D1:AB68 CD 72 A9 D1 call cpHLBC
66 D1:AB6C E1 - - - pop hl
67 D1:AB6D 20 ED - - jr nz, drawrowLoop
68 D1:AB6F C1 - - - pop bc
69 D1:AB70 E1 - - - pop hl
70 D1:AB71 C9 - - - ret
71 D1:AB72 - - - -
72 D1:AB72 - - - - ;;drawbar
73 D1:AB72 - - - - ;;Loops drawing row
74 D1:AB72 - - - - ;;Inputs:
75 D1:AB72 - - - - ;; A: y
76 D1:AB72 - - - - ;; [B]C: height
77 D1:AB72 - - - - ;; HL: color
78 D1:AB72 - - - - drawbar:
79 D1:AB72 C5 - - - push bc
80 D1:AB73 - - - - drawbarLoop:
81 D1:AB73 CD 46 AB D1 call drawrow
82 D1:AB77 0B - - - dec bc
83 D1:AB78 3C - - - inc a
84 D1:AB79 E5 - - - push hl
85 D1:AB7A 21 00 00 00 ld hl, 0
86 D1:AB7E CD 72 A9 D1 call cpHLBC
87 D1:AB82 E1 - - - pop hl
88 D1:AB83 20 EE - - jr nz, drawbarLoop
89 D1:AB85 C1 - - - pop bc
90 D1:AB86 C9 - - - ret
91 D1:AB87 - - - -
92 D1:AB87 - - - - ;;drawrectfilled
93 D1:AB87 - - - - ;;Draws a rectangle from coordinates (Slow)
94 D1:AB87 - - - - ;;Inputs:
95 D1:AB87 - - - - ;; DE: x
96 D1:AB87 - - - - ;; C: y
97 D1:AB87 - - - - ;; HL: width
98 D1:AB87 - - - - ;; A: height
99 D1:AB87 - - - - ;; IXH+IXL: color
100 D1:AB87 - - - - drawrectfilled:
101 D1:AB87 19 - - - add hl, de
102 D1:AB88 81 - - - add a, c
103 D1:AB89 47 - - - ld b, a
104 D1:AB8A - - - - drawrectfilledLoopY:
105 D1:AB8A D5 - - - push de
106 D1:AB8B - - - - drawrectfilledLoopX:
107 D1:AB8B E5 - - - push hl
108 D1:AB8C C5 - - - push bc
109 D1:AB8D EB - - - ex de, hl
110 D1:AB8E DD 54 - - ld d, ixh
111 D1:AB90 DD 5D - - ld e, ixl
112 D1:AB92 EB - - - ex de, hl
113 D1:AB93 79 - - - ld a, c
114 D1:AB94 CD 29 AB D1 call drawpixelxy
115 D1:AB98 C1 - - - pop bc
116 D1:AB99 E1 - - - pop hl
117 D1:AB9A 13 - - - inc de
118 D1:AB9B CD 6D A9 D1 call cpHLDE
119 D1:AB9F 20 EA - - jr nz, drawrectfilledLoopX
120 D1:ABA1 D1 - - - pop de
121 D1:ABA2 0C - - - inc c
122 D1:ABA3 78 - - - ld a, b
123 D1:ABA4 B9 - - - cp c
124 D1:ABA5 20 E3 - - jr nz, drawrectfilledLoopY
125 D1:ABA7 C9 - - - ret
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/std.inc"
10 D1:ABA8 - - - - #include "includes/lib/std/Array.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/Array.asm"
1 D1:ABA8 - - - - ;;array2d
2 D1:ABA8 - - - - ;;gets the address of 2d array
3 D1:ABA8 - - - - ;;Inputs:
4 D1:ABA8 - - - - ;; H: y
5 D1:ABA8 - - - - ;; L: x width
6 D1:ABA8 - - - - ;; B: x
7 D1:ABA8 - - - - ;; DE: Array start
8 D1:ABA8 - - - - ;;Outputs:
9 D1:ABA8 - - - - ;; DE: Array loc address
10 D1:ABA8 - - - - array2d:
11 D1:ABA8 E5 - - - push hl
12 D1:ABA9 ED 6C - - mlt hl
13 D1:ABAB 19 - - - add hl, de
14 D1:ABAC 11 00 00 00 ld de, 0
15 D1:ABB0 58 - - - ld e, b
16 D1:ABB1 19 - - - add hl, de
17 D1:ABB2 EB - - - ex de, hl
18 D1:ABB3 E1 - - - pop hl
19 D1:ABB4 C9 - - - ret
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/std.inc"
11 D1:ABB5 - - - - #include "includes/lib/std/Hex.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/Hex.asm"
1 D1:ABB5 - - - - ;;bytetohexstr
2 D1:ABB5 - - - - ;;converts byte to hex string
3 D1:ABB5 - - - - ;;Inputs:
4 D1:ABB5 - - - - ;; A: input byte
5 D1:ABB5 - - - - ;;Outputs:
6 D1:ABB5 - - - - ;; hl: output string location
7 D1:ABB5 - - - - bytetohexstr:
8 D1:ABB5 E5 - - - push hl
9 D1:ABB6 C5 - - - push bc
10 D1:ABB7 01 00 00 00 ld bc, 0
11 D1:ABBB 4F - - - ld c, a
12 D1:ABBC 06 0F - - ld b, $0F
13 D1:ABBE A0 - - - and a, b
14 D1:ABBF 47 - - - ld b, a
15 D1:ABC0 79 - - - ld a, c
16 D1:ABC1 48 - - - ld c, b
17 D1:ABC2 06 00 - - ld b, 0
18 D1:ABC4 21 FE AB D1 ld hl, hexLUT
19 D1:ABC8 09 - - - add hl, bc
20 D1:ABC9 46 - - - ld b, (hl)
21 D1:ABCA 21 FB AB D1 ld hl, bytetohexstrBuf + 1
22 D1:ABCE 70 - - - ld (hl), b
23 D1:ABCF C1 - - - pop bc
24 D1:ABD0 C5 - - - push bc
25 D1:ABD1 01 00 00 00 ld bc, 0
26 D1:ABD5 CB 3F - - srl a
27 D1:ABD7 CB 3F - - srl a
28 D1:ABD9 CB 3F - - srl a
29 D1:ABDB CB 3F - - srl a
30 D1:ABDD 47 - - - ld b, a
31 D1:ABDE 79 - - - ld a, c
32 D1:ABDF 48 - - - ld c, b
33 D1:ABE0 06 00 - - ld b, 0
34 D1:ABE2 21 FE AB D1 ld hl, hexLUT
35 D1:ABE6 09 - - - add hl, bc
36 D1:ABE7 46 - - - ld b, (hl)
37 D1:ABE8 21 FA AB D1 ld hl, bytetohexstrBuf
38 D1:ABEC 70 - - - ld (hl), b
39 D1:ABED C1 - - - pop bc
40 D1:ABEE 21 FC AB D1 ld hl, bytetohexstrBuf + 2
41 D1:ABF2 36 00 - - ld (hl), $00
42 D1:ABF4 E1 - - - pop hl
43 D1:ABF5 21 FA AB D1 ld hl, bytetohexstrBuf
44 D1:ABF9 C9 - - - ret
45 D1:ABFA - - - -
46 D1:ABFA 00 00 00 00 bytetohexstrBuf: .db $00, $00, $00, $00
47 D1:ABFE - - - -
48 D1:ABFE - - - - #include "includes/tables/hexLUT.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/tables/hexLUT.asm"
1 D1:ABFE 30 31 32 33
34 35 36 37
38 39 41 42
43 44 45 46
00 - - - hexLUT: .db "0123456789ABCDEF", 0
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/Hex.asm"
49 D1:AC0F - - - -
50 D1:AC0F - - - - ;;hexToA
51 D1:AC0F - - - - ;;Converts a hexadecimal string to a number.
52 D1:AC0F - - - - ;;Inputs:
53 D1:AC0F - - - - ;; HL: String pointer
54 D1:AC0F - - - - ;;Outputs:
55 D1:AC0F - - - - ;; A: Value
56 D1:AC0F - - - - hexToA:
57 D1:AC0F C5 - - - push bc
58 D1:AC10 E5 - - - push hl
59 D1:AC11 06 00 - - ld b, 0
60 D1:AC13 7E - - - _: ld a, (hl)
61 D1:AC14 B7 - - - or a
62 D1:AC15 28 11 - - jr z, hexToA_ret
63 D1:AC17 CB 10 CB 10
CB 10 CB 10 rl b \ rl b \ rl b \ rl b
64 D1:AC1F CD 2C AC D1 call hexToA_doConvert
65 D1:AC23 B0 - - - or b
66 D1:AC24 47 - - - ld b, a
67 D1:AC25 23 - - - inc hl
68 D1:AC26 18 EB - - jr -_
69 D1:AC28 - - - - hexToA_ret:
70 D1:AC28 78 - - - ld a, b
71 D1:AC29 E1 - - - pop hl
72 D1:AC2A C1 - - - pop bc
73 D1:AC2B C9 - - - ret
74 D1:AC2C - - - -
75 D1:AC2C - - - - hexToA_doConvert:
76 D1:AC2C FE 61 - - cp 'a' ; Convert to lowercase
77 D1:AC2E 38 02 - - jr c, _
78 D1:AC30 D6 20 - - sub 'a' - 'A'
79 D1:AC32 FE 41 - - _: cp 'A' ; Close gap between numbers and letter
80 D1:AC34 38 02 - - jr c, _
81 D1:AC36 D6 07 - - sub 'A'-('9'+1)
82 D1:AC38 D6 30 - - _: sub '0' ; To number
83 D1:AC3A C9 - - - ret
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/std.inc"
12 D1:AC3B - - - -
13 D1:AC3B - - - - #include "includes/lib/std/String.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/String.asm"
1 D1:AC3B - - - - ;;strlen
2 D1:AC3B - - - - ;;Determines the length of a zero delimited string.
3 D1:AC3B - - - - ;;Inputs:
4 D1:AC3B - - - - ;; HL: String pointer
5 D1:AC3B - - - - ;;Outputs:
6 D1:AC3B - - - - ;; BC: String length
7 D1:AC3B - - - - strlen:
8 D1:AC3B F5 - - - push af
9 D1:AC3C E5 - - - push hl
10 D1:AC3D AF - - - xor a
11 D1:AC3E 47 - - - ld b, a
12 D1:AC3F 4F - - - ld c, a
13 D1:AC40 ED B1 - - cpir
14 D1:AC42 - - - - ; bc = -bc
15 D1:AC42 AF 91 4F 9F
90 47 - - xor a \ sub c \ ld c, a \ sbc a, a \ sub b \ ld b, a
16 D1:AC48 0B - - - dec bc
17 D1:AC49 E1 - - - pop hl
18 D1:AC4A F1 - - - pop af
19 D1:AC4B C9 - - - ret
20 D1:AC4C - - - -
21 D1:AC4C - - - - ;;strcmp
22 D1:AC4C - - - - ;;Determines if two strings are equal, and checks alphabetical sort order.
23 D1:AC4C - - - - ;;Inputs:
24 D1:AC4C - - - - ;; HL: String pointer
25 D1:AC4C - - - - ;; DE: String pointer
26 D1:AC4C - - - - ;;Outputs:
27 D1:AC4C - - - - ;; Z: Set if equal, reset if not equal
28 D1:AC4C - - - - ;; C: Set if string HL is alphabetically earlier than string DE
29 D1:AC4C - - - - strcmp:
30 D1:AC4C E5 - - - push hl
31 D1:AC4D D5 - - - push de
32 D1:AC4E - - - - strcmpLoop:
33 D1:AC4E 1A - - - ld a, (de)
34 D1:AC4F B7 - - - or a
35 D1:AC50 28 07 - - jr z, strCmpEnd
36 D1:AC52 BE - - - cp (hl)
37 D1:AC53 20 06 - - jr nz, strcmpExit
38 D1:AC55 23 - - - inc hl
39 D1:AC56 13 - - - inc de
40 D1:AC57 18 F5 - - jr strcmpLoop
41 D1:AC59 - - - - strcmpEnd:
42 D1:AC59 7E - - - ld a, (hl)
43 D1:AC5A B7 - - - or a
44 D1:AC5B - - - - strcmpExit:
45 D1:AC5B 3F - - - ccf
46 D1:AC5C D1 - - - pop de
47 D1:AC5D E1 - - - pop hl
48 D1:AC5E C9 - - - ret
49 D1:AC5F - - - -
50 D1:AC5F - - - - ;;strcpy
51 D1:AC5F - - - - ;;Copies a string.
52 D1:AC5F - - - - ;;Inputs:
53 D1:AC5F - - - - ;; HL: String pointer
54 D1:AC5F - - - - ;; DE: Destination
55 D1:AC5F - - - - ;;Notes:
56 D1:AC5F - - - - ;; This will trample into undefined territory if you try to copy a string into some
57 D1:AC5F - - - - ;;allocated memory it won't fit in.
58 D1:AC5F - - - - strcpy:
59 D1:AC5F D5 - - - push de
60 D1:AC60 E5 - - - push hl
61 D1:AC61 EB - - - ex de, hl
62 D1:AC62 1A - - - _: ld a, (de)
63 D1:AC63 77 - - - ld (hl), a
64 D1:AC64 B7 - - - or a
65 D1:AC65 28 04 - - jr z, _
66 D1:AC67 23 13 - - inc hl \ inc de
67 D1:AC69 18 F7 - - jr -_
68 D1:AC6B E1 - - - _: pop hl
69 D1:AC6C D1 - - - pop de
70 D1:AC6D C9 - - - ret
71 D1:AC6E - - - -
72 D1:AC6E - - - - ;;strchr
73 D1:AC6E - - - - ;;Returns a pointer on the first occurence of a character in a string.
74 D1:AC6E - - - - ;;Inputs:
75 D1:AC6E - - - - ;; HL: Haystack
76 D1:AC6E - - - - ;; B: Needle
77 D1:AC6E - - - - ;;Outputs:
78 D1:AC6E - - - - ;; HL: Pointer to first occurence of character
79 D1:AC6E - - - - ;; Z: Set if character found
80 D1:AC6E - - - - ;; A: Destroyed
81 D1:AC6E - - - - strchr:
82 D1:AC6E - - - - strchrLoop:
83 D1:AC6E 7E - - - ld a, (hl)
84 D1:AC6F B7 - - - or a
85 D1:AC70 28 05 - - jr z, strchrNoCharFound
86 D1:AC72 B8 - - - cp b
87 D1:AC73 C8 - - - ret z
88 D1:AC74 23 - - - inc hl
89 D1:AC75 18 F7 - - jr strchrLoop
90 D1:AC77 - - - - strchrNoCharFound:
91 D1:AC77 3C - - - inc a
92 D1:AC78 C9 - - - ret
93 D1:AC79 - - - -
94 D1:AC79 - - - - ;;strtob
95 D1:AC79 - - - - ;;Converts a string to a byte
96 D1:AC79 - - - - ;;Inputs:
97 D1:AC79 - - - - ;; HL: string pointer
98 D1:AC79 - - - - ;;Outputs:
99 D1:AC79 - - - - ;; A: byte
100 D1:AC79 - - - - strtob:
101 D1:AC79 C5 - - - push bc
102 D1:AC7A D5 - - - push de
103 D1:AC7B 0E 00 - - ld c, 0
104 D1:AC7D - - - - strtobNumFind:
105 D1:AC7D 7E - - - ld a, (hl)
106 D1:AC7E FE 00 - - cp $00
107 D1:AC80 CA D2 AC D1 jp z, strtobEXIT
108 D1:AC84 0E 00 - - ld c, 0
109 D1:AC86 D6 31 - - sub '1'
110 D1:AC88 FE 3A - - cp '9' + 1
111 D1:AC8A 38 03 - - jr c, strtobNumWhile
112 D1:AC8C 23 - - - inc hl
113 D1:AC8D 18 EE - - jr strtobNumFind
114 D1:AC8F - - - - strtobNumWhile:
115 D1:AC8F E5 - - - push hl
116 D1:AC90 - - - - strtobNumWhileLoop:
117 D1:AC90 79 - - - ld a, c
118 D1:AC91 FE 03 - - cp 3
119 D1:AC93 D2 A4 AC D1 jp nc, strtobConvert
120 D1:AC97 7E - - - ld a, (hl)
121 D1:AC98 D6 2F - - sub '0' - 1
122 D1:AC9A 38 08 - - jr c, strtobConvert
123 D1:AC9C FE 3A - - cp '9' + 1
124 D1:AC9E 30 04 - - jr nc, strtobConvert
125 D1:ACA0 23 - - - inc hl
126 D1:ACA1 0C - - - inc c
127 D1:ACA2 18 EC - - jr strtobNumWhileLoop
128 D1:ACA4 - - - - strtobConvert:
129 D1:ACA4 2B - - - dec hl
130 D1:ACA5 7E - - - ld a, (hl)
131 D1:ACA6 D6 30 - - sub '0'
132 D1:ACA8 4F - - - ld c, a
133 D1:ACA9 2B - - - dec hl
134 D1:ACAA D1 - - - pop de
135 D1:ACAB CD 6D A9 D1 call cpHLDE
136 D1:ACAF DA D2 AC D1 jp c, strtobExit
137 D1:ACB3 7E - - - ld a, (hl)
138 D1:ACB4 D6 30 - - sub '0'
139 D1:ACB6 06 0A - - ld b, 10
140 D1:ACB8 CD 7F A9 D1 call mulAbyB
141 D1:ACBC 81 - - - add a, c
142 D1:ACBD 4F - - - ld c, a
143 D1:ACBE 2B - - - dec hl
144 D1:ACBF CD 6D A9 D1 call cpHLDE
145 D1:ACC3 DA D2 AC D1 jp c, strtobExit
146 D1:ACC7 7E - - - ld a, (hl)
147 D1:ACC8 D6 30 - - sub '0'
148 D1:ACCA 06 64 - - ld b, 100
149 D1:ACCC CD 7F A9 D1 call mulAbyB
150 D1:ACD0 81 - - - add a, c
151 D1:ACD1 4F - - - ld c, a
152 D1:ACD2 - - - - strtobExit:
153 D1:ACD2 79 - - - ld a, c
154 D1:ACD3 D1 - - - pop de
155 D1:ACD4 C1 - - - pop bc
156 D1:ACD5 C9 - - - ret
157 D1:ACD6 - - - -
158 D1:ACD6 - - - - ;;strtow
159 D1:ACD6 - - - - ;;Converts a string to a byte
160 D1:ACD6 - - - - ;;Inputs:
161 D1:ACD6 - - - - ;; HL: string pointer
162 D1:ACD6 - - - - ;;Outputs:
163 D1:ACD6 - - - - ;; HL: byte
164 D1:ACD6 - - - - strtow:
165 D1:ACD6 C5 - - - push bc
166 D1:ACD7 D5 - - - push de
167 D1:ACD8 01 00 00 00 ld bc, 0
168 D1:ACDC - - - - strtowNumFind:
169 D1:ACDC 7E - - - ld a, (hl)
170 D1:ACDD FE 00 - - cp $00
171 D1:ACDF CA 75 AD D1 jp z, strtowEXIT
172 D1:ACE3 0E 00 - - ld c, 0
173 D1:ACE5 D6 31 - - sub '1'
174 D1:ACE7 FE 3A - - cp '9' + 1
175 D1:ACE9 38 03 - - jr c, strtowNumWhile
176 D1:ACEB 23 - - - inc hl
177 D1:ACEC 18 EE - - jr strtowNumFind
178 D1:ACEE - - - - strtowNumWhile:
179 D1:ACEE E5 - - - push hl
180 D1:ACEF - - - - strtowNumWhileLoop:
181 D1:ACEF 79 - - - ld a, c
182 D1:ACF0 FE 05 - - cp 5
183 D1:ACF2 D2 03 AD D1 jp nc, strtowConvert
184 D1:ACF6 7E - - - ld a, (hl)
185 D1:ACF7 D6 2F - - sub '0' - 1
186 D1:ACF9 38 08 - - jr c, strtowConvert
187 D1:ACFB FE 3A - - cp '9' + 1
188 D1:ACFD 30 04 - - jr nc, strtowConvert
189 D1:ACFF 23 - - - inc hl
190 D1:AD00 0C - - - inc c
191 D1:AD01 18 EC - - jr strtowNumWhileLoop
192 D1:AD03 - - - - strtowConvert:
193 D1:AD03 01 00 00 00 ld bc, 0
194 D1:AD07 2B - - - dec hl
195 D1:AD08 7E - - - ld a, (hl)
196 D1:AD09 D6 30 - - sub '0'
197 D1:AD0B 01 00 00 00 ld bc, 0
198 D1:AD0F 4F - - - ld c, a
199 D1:AD10 2B - - - dec hl
200 D1:AD11 - - - -
201 D1:AD11 D1 - - - pop de
202 D1:AD12 CD 6D A9 D1 call cpHLDE
203 D1:AD16 DA 75 AD D1 jp c, strtowExit
204 D1:AD1A 7E - - - ld a, (hl)
205 D1:AD1B D6 30 - - sub '0'
206 D1:AD1D E5 - - - push hl
207 D1:AD1E 21 0A 00 00 ld hl, 10
208 D1:AD22 CD 87 A9 D1 call mulAbyHL
209 D1:AD26 09 - - - add hl, bc
210 D1:AD27 44 - - - ld b, h
211 D1:AD28 4D - - - ld c, l
212 D1:AD29 E1 - - - pop hl
213 D1:AD2A 2B - - - dec hl
214 D1:AD2B - - - -
215 D1:AD2B CD 6D A9 D1 call cpHLDE
216 D1:AD2F DA 75 AD D1 jp c, strtowExit
217 D1:AD33 7E - - - ld a, (hl)
218 D1:AD34 D6 30 - - sub '0'
219 D1:AD36 E5 - - - push hl
220 D1:AD37 21 64 00 00 ld hl, 100
221 D1:AD3B CD 87 A9 D1 call mulAbyHL
222 D1:AD3F 09 - - - add hl, bc
223 D1:AD40 44 - - - ld b, h
224 D1:AD41 4D - - - ld c, l
225 D1:AD42 E1 - - - pop hl
226 D1:AD43 2B - - - dec hl
227 D1:AD44 - - - -
228 D1:AD44 CD 6D A9 D1 call cpHLDE
229 D1:AD48 DA 75 AD D1 jp c, strtowExit
230 D1:AD4C 7E - - - ld a, (hl)
231 D1:AD4D D6 30 - - sub '0'
232 D1:AD4F E5 - - - push hl
233 D1:AD50 21 E8 03 00 ld hl, 1000
234 D1:AD54 CD 87 A9 D1 call mulAbyHL
235 D1:AD58 09 - - - add hl, bc
236 D1:AD59 44 - - - ld b, h
237 D1:AD5A 4D - - - ld c, l
238 D1:AD5B E1 - - - pop hl
239 D1:AD5C 2B - - - dec hl
240 D1:AD5D - - - -
241 D1:AD5D CD 6D A9 D1 call cpHLDE
242 D1:AD61 DA 75 AD D1 jp c, strtowExit
243 D1:AD65 7E - - - ld a, (hl)
244 D1:AD66 D6 30 - - sub '0'
245 D1:AD68 E5 - - - push hl
246 D1:AD69 21 10 27 00 ld hl, 10000
247 D1:AD6D CD 87 A9 D1 call mulAbyHL
248 D1:AD71 09 - - - add hl, bc
249 D1:AD72 44 - - - ld b, h
250 D1:AD73 4D - - - ld c, l
251 D1:AD74 E1 - - - pop hl
252 D1:AD75 - - - -
253 D1:AD75 - - - - strtowExit:
254 D1:AD75 21 00 00 00 ld hl, 0
255 D1:AD79 60 - - - ld h, b
256 D1:AD7A 69 - - - ld l, c
257 D1:AD7B D1 - - - pop de
258 D1:AD7C C1 - - - pop bc
259 D1:AD7D C9 - - - ret
260 D1:AD7E - - - -
261 D1:AD7E - - - - ;;strxor
262 D1:AD7E - - - - ;;xor 2 strings together
263 D1:AD7E - - - - ;;Inputs:
264 D1:AD7E - - - - ;; HL: string 1
265 D1:AD7E - - - - ;; DE: string 2
266 D1:AD7E - - - - ;;Outputs:
267 D1:AD7E - - - - ;; HL: Xor String Pointer
268 D1:AD7E - - - - strxor:
269 D1:AD7E E5 - - - push hl
270 D1:AD7F D5 - - - push de
271 D1:AD80 EB - - - ex de, hl
272 D1:AD81 - - - - strxorLoop:
273 D1:AD81 1A - - - ld a, (de)
274 D1:AD82 B7 - - - or a, a
275 D1:AD83 28 0A - - jr z, strxorEnd
276 D1:AD85 AE - - - xor (hl)
277 D1:AD86 B7 - - - or a, a
278 D1:AD87 20 01 - - jr nz, strxorLoopLD
279 D1:AD89 7E - - - ld a, (hl)
280 D1:AD8A - - - - strxorLoopLD:
281 D1:AD8A 12 - - - ld (de), a
282 D1:AD8B 13 - - - inc de
283 D1:AD8C 23 - - - inc hl
284 D1:AD8D 18 F2 - - jr strxorLoop
285 D1:AD8F - - - - strxorEnd:
286 D1:AD8F D1 - - - pop de
287 D1:AD90 E1 - - - pop hl
288 D1:AD91 C9 - - - ret
289 D1:AD92 - - - -
290 D1:AD92 - - - -
291 D1:AD92 - - - - ;;toLower [Strings]
292 D1:AD92 - - - - ;;Converts every alpha character of a string to lowercase.
293 D1:AD92 - - - - ;;Inputs:
294 D1:AD92 - - - - ;; HL: Pointer to string
295 D1:AD92 - - - - ;;Notes:
296 D1:AD92 - - - - ;; This modifies the string in-place.
297 D1:AD92 - - - - ;toLower:
298 D1:AD92 - - - - ; push af \ push hl
299 D1:AD92 - - - - ; ld a, (hl)
300 D1:AD92 - - - - ; or a
301 D1:AD92 - - - - ; jr z, toLowerExit
302 D1:AD92 - - - - ; call isAlphaNum
303 D1:AD92 - - - - ; jr nc, toLowerNotUpperAlpha
304 D1:AD92 - - - - ; cp 'a'
305 D1:AD92 - - - - ; jr nc, toLowerNotUpperAlpha
306 D1:AD92 - - - - ; add a, 'a' - 'A'
307 D1:AD92 - - - - ; ld (hl), a
308 D1:AD92 - - - - ;toLowerNotUpperAlpha:
309 D1:AD92 - - - - ; inc hl
310 D1:AD92 - - - - ; jr toLower + 2
311 D1:AD92 - - - - ;toLowerExit:
312 D1:AD92 - - - - ; pop hl \ pop af
313 D1:AD92 - - - - ; ret
314 D1:AD92 - - - -
315 D1:AD92 - - - - ;;toUpper [Strings]
316 D1:AD92 - - - - ;;Converts every alpha character of a string to uppercase.
317 D1:AD92 - - - - ;;Inputs:
318 D1:AD92 - - - - ;; HL: Pointer to string
319 D1:AD92 - - - - ;;Notes:
320 D1:AD92 - - - - ;; This modifies the string in-place.
321 D1:AD92 - - - - ;toUpper:
322 D1:AD92 - - - - ; push af \ push hl
323 D1:AD92 - - - - ; ld a, (hl)
324 D1:AD92 - - - - ; or a
325 D1:AD92 - - - - ; jr z, toUpperExit
326 D1:AD92 - - - - ; call isAlphaNum
327 D1:AD92 - - - - ; jr nc, toUpperNotLowerAlpha
328 D1:AD92 - - - - ; cp 'a'
329 D1:AD92 - - - - ; jr c, toUpperNotLowerAlpha
330 D1:AD92 - - - - ; sub 'a' - 'A'
331 D1:AD92 - - - - ; ld (hl), a
332 D1:AD92 - - - - ;toUpperNotLowerAlpha:
333 D1:AD92 - - - - ; inc hl
334 D1:AD92 - - - - ; jr toUpper + 2
335 D1:AD92 - - - - ;toUpperExit:
336 D1:AD92 - - - - ; pop hl \ pop af
337 D1:AD92 - - - - ; ret
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/std.inc"
14 D1:AD92 - - - -
15 D1:AD92 - - - - #include "includes/lib/std/Input.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/Input.asm"
1 D1:AD92 - - - - ;;inputgetkey
2 D1:AD92 - - - - ;;Gets keycode
3 D1:AD92 - - - - ;;Outputs:
4 D1:AD92 - - - - ;; A: keycode
5 D1:AD92 - - - - ;;Destroys:
6 D1:AD92 - - - - ;; DE
7 D1:AD92 - - - - inputgetkey:
8 D1:AD92 EB - - - ex de, hl
9 D1:AD93 CD 4C 01 02 call _GetCSC
10 D1:AD97 EB - - - ex de, hl
11 D1:AD98 B7 - - - or a
12 D1:AD99 28 F7 - - jr z, inputgetkey
13 D1:AD9B C9 - - - ret
14 D1:AD9C - - - -
15 D1:AD9C - - - - ;;inputstr
16 D1:AD9C - - - - ;;Inputs string of length [Buffer Size] and puts it in (Destination)
17 D1:AD9C - - - - ;;Inputs:
18 D1:AD9C - - - - ;; HL: Destination
19 D1:AD9C - - - - ;; D[E]: Buffer Size
20 D1:AD9C - - - - ;;Ouptuts:
21 D1:AD9C - - - - ;; (HL): String
22 D1:AD9C - - - - inputstr:
23 D1:AD9C D5 - - - push de
24 D1:AD9D E5 - - - push hl
25 D1:AD9E ED 53 BC AE
D1 - - - ld (inputstrSizeBuf), de
26 D1:ADA3 E5 - - - push hl
27 D1:ADA4 D5 - - - push de
28 D1:ADA5 21 96 05 D0 ld hl, CurCol
29 D1:ADA9 11 BE AE D1 ld de, inputstrCurColBuf
30 D1:ADAD CD 3D AA D1 call bytecpy
31 D1:ADB1 21 95 05 D0 ld hl, CurRow
32 D1:ADB5 11 BF AE D1 ld de, inputstrCurRowBuf
33 D1:ADB9 CD 3D AA D1 call bytecpy
34 D1:ADBD D1 - - - pop de
35 D1:ADBE E1 - - - pop hl
36 D1:ADBF - - - -
37 D1:ADBF FD CB 12 9E res Shift2nd, (IY + ShiftFlags)
38 D1:ADC3 CD B0 08 02 call _CursorOn
39 D1:ADC7 - - - -
40 D1:ADC7 AF - - - xor a
41 D1:ADC8 47 - - - ld b, a
42 D1:ADC9 - - - - inputstrKeyInput:
43 D1:ADC9 CD 0B AB D1 call cursorcurunderreset
44 D1:ADCD CD 92 AD D1 call inputgetkey
45 D1:ADD1 - - - -
46 D1:ADD1 FE 36 - - cp sk2nd
47 D1:ADD3 CA 2A AE D1 jp z, inputstrKey2nd
48 D1:ADD7 FE 38 - - cp skDel
49 D1:ADD9 CA 38 AE D1 jp z, inputstrKeyDel
50 D1:ADDD FE 0F - - cp skClear
51 D1:ADDF CA 58 AE D1 jp z, inputstrKeyClear
52 D1:ADE3 FE 09 - - cp skEnter
53 D1:ADE5 CA A8 AE D1 jp z, inputstrKeyEnter
54 D1:ADE9 - - - -
55 D1:ADE9 4F - - - ld c, a
56 D1:ADEA 78 - - - ld a, b
57 D1:ADEB D5 - - - push de
58 D1:ADEC ED 5B BC AE
D1 - - - ld de, (inputstrSizeBuf)
59 D1:ADF1 BB - - - cp e
60 D1:ADF2 D1 - - - pop de
61 D1:ADF3 28 D4 - - jr z, inputstrKeyInput
62 D1:ADF5 79 - - - ld a, c
63 D1:ADF6 - - - -
64 D1:ADF6 D6 0A - - sub skAdd
65 D1:ADF8 38 CF - - jr c, inputstrKeyInput
66 D1:ADFA FE 26 - - cp skMath - skAdd + 1
67 D1:ADFC 30 CB - - jr nc, inputstrKeyInput
68 D1:ADFE - - - -
69 D1:ADFE FD CB 12 5E bit Shift2nd, (IY + ShiftFlags) ; TIOS BASED
70 D1:AE02 CC DB AA D1 call z, chartoascii
71 D1:AE06 C4 FB AA D1 call nz, charnumsymtoascii
72 D1:AE0A - - - -
73 D1:AE0A FE FF - - cp $FF
74 D1:AE0C 28 BB - - jr z, inputstrKeyInput
75 D1:AE0E - - - -
76 D1:AE0E FD CB 05 96 res textScrolled, (iy+textFlags)
77 D1:AE12 - - - -
78 D1:AE12 CD B8 07 02 call _PutC
79 D1:AE16 - - - -
80 D1:AE16 77 - - - ld (hl), a
81 D1:AE17 23 - - - inc hl
82 D1:AE18 04 - - - inc b
83 D1:AE19 - - - -
84 D1:AE19 FD CB 05 56 bit textScrolled, (iy+textFlags)
85 D1:AE1D 28 AA - - jr z, inputstrKeyInput
86 D1:AE1F E5 - - - push hl
87 D1:AE20 21 BF AE D1 ld hl, inputstrCurRowBuf
88 D1:AE24 7E - - - ld a, (hl)
89 D1:AE25 3D - - - dec a
90 D1:AE26 77 - - - ld (hl), a
91 D1:AE27 E1 - - - pop hl
92 D1:AE28 18 9F - - jr inputstrKeyInput
93 D1:AE2A - - - - inputstrKey2nd:
94 D1:AE2A E5 - - - push hl
95 D1:AE2B 21 92 00 D0 ld hl, Flags + ShiftFlags
96 D1:AE2F 7E - - - ld a, (hl)
97 D1:AE30 EE 08 - - xor 1 << Shift2nd ; Toggle state of Shift2nd flag
98 D1:AE32 77 - - - ld (hl), a
99 D1:AE33 E1 - - - pop hl
100 D1:AE34 C3 C9 AD D1 jp inputstrKeyInput
101 D1:AE38 - - - - inputstrKeyDel:
102 D1:AE38 78 - - - ld a, b
103 D1:AE39 FE 00 - - cp 0
104 D1:AE3B CA C9 AD D1 jp z, inputstrKeyInput
105 D1:AE3F - - - -
106 D1:AE3F 3E 20 - - ld a, ' '
107 D1:AE41 CD B4 07 02 call _PutMap
108 D1:AE45 - - - -
109 D1:AE45 E5 - - - push hl
110 D1:AE46 21 96 05 D0 ld hl, CurCol
111 D1:AE4A 35 - - - dec (hl)
112 D1:AE4B E1 - - - pop hl
113 D1:AE4C - - - -
114 D1:AE4C 3E 20 - - ld a, ' '
115 D1:AE4E CD B4 07 02 call _PutMap
116 D1:AE52 - - - -
117 D1:AE52 2B - - - dec hl
118 D1:AE53 05 - - - dec b
119 D1:AE54 C3 C9 AD D1 jp inputstrKeyInput
120 D1:AE58 - - - -
121 D1:AE58 - - - - inputstrKeyClear:
122 D1:AE58 78 - - - ld a, b
123 D1:AE59 FE 00 - - cp 0
124 D1:AE5B CA C9 AD D1 jp z, inputstrKeyInput
125 D1:AE5F - - - -
126 D1:AE5F E5 - - - push hl
127 D1:AE60 D5 - - - push de
128 D1:AE61 21 BE AE D1 ld hl, inputstrCurColBuf
129 D1:AE65 11 96 05 D0 ld de, CurCol
130 D1:AE69 CD 3D AA D1 call bytecpy
131 D1:AE6D 21 BF AE D1 ld hl, inputstrCurRowBuf
132 D1:AE71 11 95 05 D0 ld de, CurRow
133 D1:AE75 CD 3D AA D1 call bytecpy
134 D1:AE79 D1 - - - pop de
135 D1:AE7A E1 - - - pop hl
136 D1:AE7B - - - -
137 D1:AE7B 3E 20 - - ld a, ' '
138 D1:AE7D 04 - - - inc b
139 D1:AE7E - - - - inputstrKeyClearLoop:
140 D1:AE7E CD B8 07 02 call _PutC
141 D1:AE82 10 FA - - djnz inputstrKeyClearLoop
142 D1:AE84 06 00 - - ld b, 0
143 D1:AE86 - - - -
144 D1:AE86 D5 - - - push de
145 D1:AE87 E5 - - - push hl
146 D1:AE88 21 BE AE D1 ld hl, inputstrCurColBuf
147 D1:AE8C 11 96 05 D0 ld de, CurCol
148 D1:AE90 CD 3D AA D1 call bytecpy
149 D1:AE94 21 BF AE D1 ld hl, inputstrCurRowBuf
150 D1:AE98 11 95 05 D0 ld de, CurRow
151 D1:AE9C CD 3D AA D1 call bytecpy
152 D1:AEA0 E1 - - - pop hl
153 D1:AEA1 D1 - - - pop de
154 D1:AEA2 E1 - - - pop hl
155 D1:AEA3 E5 - - - push hl
156 D1:AEA4 C3 C9 AD D1 jp inputstrKeyInput
157 D1:AEA8 - - - -
158 D1:AEA8 - - - - inputstrKeyEnter:
159 D1:AEA8 36 00 - - ld (hl), 0
160 D1:AEAA CD A8 08 02 call _CursorOff
161 D1:AEAE 3E 20 - - ld a, ' '
162 D1:AEB0 CD B4 07 02 call _PutMap
163 D1:AEB4 E1 - - - pop hl
164 D1:AEB5 D1 - - - pop de
165 D1:AEB6 FD CB 12 9E res Shift2nd, (IY + ShiftFlags)
166 D1:AEBA C9 - - - ret
167 D1:AEBB - - - -
168 D1:AEBB 00 - - - inputstrFlags: .db %00000000
169 D1:AEBC - - - - ; 0: num Flag
170 D1:AEBC 00 00 - - inputstrSizeBuf: .dw $0000
171 D1:AEBE 00 - - - inputstrCurColBuf: .db $00
172 D1:AEBF 00 - - - inputstrCurRowBuf: .db $00
173 D1:AEC0 - - - -
174 D1:AEC0 - - - - ;;inputcharstr
175 D1:AEC0 - - - - ;;Inputs string of (only letters) of length [Buffer Size] and puts it in (Destination)
176 D1:AEC0 - - - - ;;Inputs:
177 D1:AEC0 - - - - ;; HL: Destination
178 D1:AEC0 - - - - ;; D[E]: Buffer Size
179 D1:AEC0 - - - - ;;Ouptuts:
180 D1:AEC0 - - - - ;; (HL): String
181 D1:AEC0 - - - - inputcharstr:
182 D1:AEC0 D5 - - - push de
183 D1:AEC1 E5 - - - push hl
184 D1:AEC2 ED 53 D0 AF
D1 - - - ld (inputcharstrSizeBuf), de
185 D1:AEC7 E5 - - - push hl
186 D1:AEC8 D5 - - - push de
187 D1:AEC9 21 96 05 D0 ld hl, CurCol
188 D1:AECD 11 D2 AF D1 ld de, inputcharstrCurColBuf
189 D1:AED1 CD 3D AA D1 call bytecpy
190 D1:AED5 21 95 05 D0 ld hl, CurRow
191 D1:AED9 11 D3 AF D1 ld de, inputcharstrCurRowBuf
192 D1:AEDD CD 3D AA D1 call bytecpy
193 D1:AEE1 D1 - - - pop de
194 D1:AEE2 E1 - - - pop hl
195 D1:AEE3 - - - -
196 D1:AEE3 CD B0 08 02 call _CursorOn
197 D1:AEE7 - - - -
198 D1:AEE7 AF - - - xor a
199 D1:AEE8 47 - - - ld b, a
200 D1:AEE9 - - - - inputcharstrKeyInput:
201 D1:AEE9 CD 0B AB D1 call cursorcurunderreset
202 D1:AEED CD 92 AD D1 call inputgetkey
203 D1:AEF1 - - - -
204 D1:AEF1 FE 38 - - cp skDel
205 D1:AEF3 CA 3C AF D1 jp z, inputcharstrKeyDel
206 D1:AEF7 FE 0F - - cp skClear
207 D1:AEF9 CA 5C AF D1 jp z, inputcharstrKeyClear
208 D1:AEFD FE 09 - - cp skEnter
209 D1:AEFF CA C1 AF D1 jp z, inputcharstrKeyEnter
210 D1:AF03 - - - -
211 D1:AF03 4F - - - ld c, a
212 D1:AF04 78 - - - ld a, b
213 D1:AF05 D5 - - - push de
214 D1:AF06 ED 5B D0 AF
D1 - - - ld de, (inputcharstrSizeBuf)
215 D1:AF0B BB - - - cp e
216 D1:AF0C D1 - - - pop de
217 D1:AF0D 28 DA - - jr z, inputcharstrKeyInput
218 D1:AF0F 79 - - - ld a, c
219 D1:AF10 - - - -
220 D1:AF10 D6 0A - - sub skAdd
221 D1:AF12 38 D5 - - jr c, inputcharstrKeyInput
222 D1:AF14 FE 26 - - cp skMath - skAdd + 1
223 D1:AF16 30 D1 - - jr nc, inputcharstrKeyInput
224 D1:AF18 - - - -
225 D1:AF18 CD DB AA D1 call chartoascii
226 D1:AF1C - - - -
227 D1:AF1C FE FF - - cp $FF
228 D1:AF1E 28 C9 - - jr z, inputcharstrKeyInput
229 D1:AF20 - - - -
230 D1:AF20 FD CB 05 96 res textScrolled, (iy+textFlags)
231 D1:AF24 - - - -
232 D1:AF24 CD B8 07 02 call _PutC
233 D1:AF28 - - - -
234 D1:AF28 77 - - - ld (hl), a
235 D1:AF29 23 - - - inc hl
236 D1:AF2A 04 - - - inc b
237 D1:AF2B - - - -
238 D1:AF2B FD CB 05 56 bit textScrolled, (iy+textFlags)
239 D1:AF2F 28 B8 - - jr z, inputcharstrKeyInput
240 D1:AF31 E5 - - - push hl
241 D1:AF32 21 D3 AF D1 ld hl, inputcharstrCurRowBuf
242 D1:AF36 7E - - - ld a, (hl)
243 D1:AF37 3D - - - dec a
244 D1:AF38 77 - - - ld (hl), a
245 D1:AF39 E1 - - - pop hl
246 D1:AF3A 18 AD - - jr inputcharstrKeyInput
247 D1:AF3C - - - - inputcharstrKeyDel:
248 D1:AF3C 78 - - - ld a, b
249 D1:AF3D FE 00 - - cp 0
250 D1:AF3F CA E9 AE D1 jp z, inputcharstrKeyInput
251 D1:AF43 - - - -
252 D1:AF43 3E 20 - - ld a, ' '
253 D1:AF45 CD B4 07 02 call _PutMap
254 D1:AF49 - - - -
255 D1:AF49 E5 - - - push hl
256 D1:AF4A 21 96 05 D0 ld hl, CurCol
257 D1:AF4E 35 - - - dec (hl)
258 D1:AF4F E1 - - - pop hl
259 D1:AF50 - - - -
260 D1:AF50 3E 20 - - ld a, ' '
261 D1:AF52 CD B4 07 02 call _PutMap
262 D1:AF56 - - - -
263 D1:AF56 2B - - - dec hl
264 D1:AF57 05 - - - dec b
265 D1:AF58 C3 E9 AE D1 jp inputcharstrKeyInput
266 D1:AF5C - - - -
267 D1:AF5C - - - - inputcharstrKeyClear:
268 D1:AF5C 78 - - - ld a, b
269 D1:AF5D FE 00 - - cp 0
270 D1:AF5F CA E9 AE D1 jp z, inputcharstrKeyInput
271 D1:AF63 - - - -
272 D1:AF63 E5 - - - push hl
273 D1:AF64 21 95 05 D0 ld hl, CurRow
274 D1:AF68 4E - - - ld c, (hl)
275 D1:AF69 E1 - - - pop hl
276 D1:AF6A - - - -
277 D1:AF6A E5 - - - push hl
278 D1:AF6B D5 - - - push de
279 D1:AF6C 21 D2 AF D1 ld hl, inputcharstrCurColBuf
280 D1:AF70 11 96 05 D0 ld de, CurCol
281 D1:AF74 CD 3D AA D1 call bytecpy
282 D1:AF78 21 D3 AF D1 ld hl, inputcharstrCurRowBuf
283 D1:AF7C 11 95 05 D0 ld de, CurRow
284 D1:AF80 CD 3D AA D1 call bytecpy
285 D1:AF84 D1 - - - pop de
286 D1:AF85 E1 - - - pop hl
287 D1:AF86 - - - -
288 D1:AF86 3E 20 - - ld a, ' '
289 D1:AF88 04 - - - inc b
290 D1:AF89 - - - - inputcharstrKeyClearLoop:
291 D1:AF89 CD B8 07 02 call _PutC
292 D1:AF8D 10 FA - - djnz inputcharstrKeyClearLoop
293 D1:AF8F - - - -
294 D1:AF8F E5 - - - push hl
295 D1:AF90 D5 - - - push de
296 D1:AF91 21 D2 AF D1 ld hl, inputcharstrCurColBuf
297 D1:AF95 11 96 05 D0 ld de, CurCol
298 D1:AF99 CD 3D AA D1 call bytecpy
299 D1:AF9D D1 - - - pop de
300 D1:AF9E E1 - - - pop hl
301 D1:AF9F - - - -
302 D1:AF9F D5 - - - push de
303 D1:AFA0 E5 - - - push hl
304 D1:AFA1 21 D2 AF D1 ld hl, inputcharstrCurColBuf
305 D1:AFA5 11 96 05 D0 ld de, CurCol
306 D1:AFA9 CD 3D AA D1 call bytecpy
307 D1:AFAD 21 D3 AF D1 ld hl, inputcharstrCurRowBuf
308 D1:AFB1 11 95 05 D0 ld de, CurRow
309 D1:AFB5 CD 3D AA D1 call bytecpy
310 D1:AFB9 E1 - - - pop hl
311 D1:AFBA D1 - - - pop de
312 D1:AFBB E1 - - - pop hl
313 D1:AFBC E5 - - - push hl
314 D1:AFBD C3 E9 AE D1 jp inputcharstrKeyInput
315 D1:AFC1 - - - -
316 D1:AFC1 - - - - inputcharstrKeyEnter:
317 D1:AFC1 36 00 - - ld (hl), 0
318 D1:AFC3 CD A8 08 02 call _CursorOff
319 D1:AFC7 3E 20 - - ld a, ' '
320 D1:AFC9 CD B4 07 02 call _PutMap
321 D1:AFCD E1 - - - pop hl
322 D1:AFCE D1 - - - pop de
323 D1:AFCF C9 - - - ret
324 D1:AFD0 - - - -
325 D1:AFD0 00 00 - - inputcharstrSizeBuf: .dw $0000
326 D1:AFD2 00 - - - inputcharstrCurColBuf: .db $00
327 D1:AFD3 00 - - - inputcharstrCurRowBuf: .db $00
328 D1:AFD4 - - - -
329 D1:AFD4 - - - - ;;inputnumstr
330 D1:AFD4 - - - - ;;Inputs string of (only numbers) of length [Buffer Size] and puts it in (Destination)
331 D1:AFD4 - - - - ;;Inputs:
332 D1:AFD4 - - - - ;; HL: Destination
333 D1:AFD4 - - - - ;; D[E]: Buffer Size
334 D1:AFD4 - - - - ;;Ouptuts:
335 D1:AFD4 - - - - ;; (HL): String
336 D1:AFD4 - - - - inputnumstr:
337 D1:AFD4 D5 - - - push de
338 D1:AFD5 E5 - - - push hl
339 D1:AFD6 ED 53 D4 B0
D1 - - - ld (inputnumstrSizeBuf), de
340 D1:AFDB E5 - - - push hl
341 D1:AFDC D5 - - - push de
342 D1:AFDD 21 96 05 D0 ld hl, CurCol
343 D1:AFE1 11 D6 B0 D1 ld de, inputnumstrCurColBuf
344 D1:AFE5 CD 3D AA D1 call bytecpy
345 D1:AFE9 21 95 05 D0 ld hl, CurRow
346 D1:AFED 11 D7 B0 D1 ld de, inputnumstrCurRowBuf
347 D1:AFF1 CD 3D AA D1 call bytecpy
348 D1:AFF5 D1 - - - pop de
349 D1:AFF6 E1 - - - pop hl
350 D1:AFF7 - - - -
351 D1:AFF7 CD B0 08 02 call _CursorOn
352 D1:AFFB - - - -
353 D1:AFFB AF - - - xor a
354 D1:AFFC 47 - - - ld b, a
355 D1:AFFD - - - -
356 D1:AFFD - - - - inputnumstrKeyInput:
357 D1:AFFD CD 0B AB D1 call cursorcurunderreset
358 D1:B001 CD 92 AD D1 call inputgetkey
359 D1:B005 - - - -
360 D1:B005 FE 38 - - cp skDel
361 D1:B007 CA 50 B0 D1 jp z, inputnumstrKeyDel
362 D1:B00B FE 0F - - cp skClear
363 D1:B00D CA 70 B0 D1 jp z, inputnumstrKeyClear
364 D1:B011 FE 09 - - cp skEnter
365 D1:B013 CA C5 B0 D1 jp z, inputnumstrKeyEnter
366 D1:B017 - - - -
367 D1:B017 4F - - - ld c, a
368 D1:B018 78 - - - ld a, b
369 D1:B019 D5 - - - push de
370 D1:B01A ED 5B D4 B0
D1 - - - ld de, (inputnumstrSizeBuf)
371 D1:B01F BB - - - cp e
372 D1:B020 D1 - - - pop de
373 D1:B021 28 DA - - jr z, inputnumstrKeyInput
374 D1:B023 79 - - - ld a, c
375 D1:B024 - - - -
376 D1:B024 D6 0A - - sub skAdd
377 D1:B026 38 D5 - - jr c, inputnumstrKeyInput
378 D1:B028 FE 26 - - cp skMath - skAdd + 1
379 D1:B02A 30 D1 - - jr nc, inputnumstrKeyInput
380 D1:B02C - - - -
381 D1:B02C CD EB AA D1 call charnumtoascii
382 D1:B030 FE FF - - cp $FF
383 D1:B032 28 C9 - - jr z, inputnumstrKeyInput
384 D1:B034 - - - -
385 D1:B034 FD CB 05 96 res textScrolled, (iy+textFlags)
386 D1:B038 - - - -
387 D1:B038 CD B8 07 02 call _PutC
388 D1:B03C - - - -
389 D1:B03C 77 - - - ld (hl), a
390 D1:B03D 23 - - - inc hl
391 D1:B03E 04 - - - inc b
392 D1:B03F - - - -
393 D1:B03F FD CB 05 56 bit textScrolled, (iy+textFlags)
394 D1:B043 28 B8 - - jr z, inputnumstrKeyInput
395 D1:B045 E5 - - - push hl
396 D1:B046 21 D7 B0 D1 ld hl, inputnumstrCurRowBuf
397 D1:B04A 7E - - - ld a, (hl)
398 D1:B04B 3D - - - dec a
399 D1:B04C 77 - - - ld (hl), a
400 D1:B04D E1 - - - pop hl
401 D1:B04E 18 AD - - jr inputnumstrKeyInput
402 D1:B050 - - - - inputnumstrkeydel:
403 D1:B050 78 - - - ld a, b
404 D1:B051 FE 00 - - cp 0
405 D1:B053 CA FD AF D1 jp z, inputnumstrKeyInput
406 D1:B057 - - - -
407 D1:B057 3E 20 - - ld a, ' '
408 D1:B059 CD B4 07 02 call _PutMap
409 D1:B05D - - - -
410 D1:B05D E5 - - - push hl
411 D1:B05E 21 96 05 D0 ld hl, CurCol
412 D1:B062 35 - - - dec (hl)
413 D1:B063 E1 - - - pop hl
414 D1:B064 - - - -
415 D1:B064 3E 20 - - ld a, ' '
416 D1:B066 CD B4 07 02 call _PutMap
417 D1:B06A - - - -
418 D1:B06A 2B - - - dec hl
419 D1:B06B 05 - - - dec b
420 D1:B06C C3 FD AF D1 jp inputnumstrKeyInput
421 D1:B070 - - - -
422 D1:B070 - - - - inputnumstrKeyClear:
423 D1:B070 78 - - - ld a, b
424 D1:B071 FE 00 - - cp 0
425 D1:B073 CA FD AF D1 jp z, inputnumstrKeyInput
426 D1:B077 - - - -
427 D1:B077 E5 - - - push hl
428 D1:B078 21 95 05 D0 ld hl, CurRow
429 D1:B07C 4E - - - ld c, (hl)
430 D1:B07D E1 - - - pop hl
431 D1:B07E - - - -
432 D1:B07E E5 - - - push hl
433 D1:B07F D5 - - - push de
434 D1:B080 21 D6 B0 D1 ld hl, inputnumstrCurColBuf
435 D1:B084 11 96 05 D0 ld de, CurCol
436 D1:B088 CD 3D AA D1 call bytecpy
437 D1:B08C 21 D7 B0 D1 ld hl, inputnumstrCurRowBuf
438 D1:B090 11 95 05 D0 ld de, CurRow
439 D1:B094 CD 3D AA D1 call bytecpy
440 D1:B098 D1 - - - pop de
441 D1:B099 E1 - - - pop hl
442 D1:B09A - - - -
443 D1:B09A 3E 20 - - ld a, ' '
444 D1:B09C 04 - - - inc b
445 D1:B09D - - - - inputnumstrKeyClearLoop:
446 D1:B09D CD B8 07 02 call _PutC
447 D1:B0A1 10 FA - - djnz inputnumstrKeyClearLoop
448 D1:B0A3 - - - -
449 D1:B0A3 D5 - - - push de
450 D1:B0A4 E5 - - - push hl
451 D1:B0A5 21 D6 B0 D1 ld hl, inputnumstrCurColBuf
452 D1:B0A9 11 96 05 D0 ld de, CurCol
453 D1:B0AD CD 3D AA D1 call bytecpy
454 D1:B0B1 21 D7 B0 D1 ld hl, inputnumstrCurRowBuf
455 D1:B0B5 11 95 05 D0 ld de, CurRow
456 D1:B0B9 CD 3D AA D1 call bytecpy
457 D1:B0BD E1 - - - pop hl
458 D1:B0BE D1 - - - pop de
459 D1:B0BF E1 - - - pop hl
460 D1:B0C0 E5 - - - push hl
461 D1:B0C1 C3 FD AF D1 jp inputnumstrKeyInput
462 D1:B0C5 - - - -
463 D1:B0C5 - - - - inputnumstrKeyEnter:
464 D1:B0C5 36 00 - - ld (hl), 0
465 D1:B0C7 CD A8 08 02 call _CursorOff
466 D1:B0CB 3E 20 - - ld a, ' '
467 D1:B0CD CD B4 07 02 call _PutMap
468 D1:B0D1 E1 - - - pop hl
469 D1:B0D2 D1 - - - pop de
470 D1:B0D3 C9 - - - ret
471 D1:B0D4 - - - -
472 D1:B0D4 00 00 - - inputnumstrSizeBuf: .dw $0000
473 D1:B0D6 00 - - - inputnumstrCurColBuf: .db $00
474 D1:B0D7 00 - - - inputnumstrCurRowBuf: .db $00
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/std.inc"
Listing for file "FSHa.asm"
72 D1:B0D8 - - - - #include "includes/lib/fsh/fsh.inc"
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/fsh/fsh.inc"
1 D1:B0D8 - - - - #include "includes/lib/fsh/Command.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/fsh/Command.asm"
1 D1:B0D8 - - - - ;;commandfill
2 D1:B0D8 - - - - ;;Fills command mem with byte a
3 D1:B0D8 - - - - ;;Inputs:
4 D1:B0D8 - - - - ;; A: byte
5 D1:B0D8 - - - - commandfill:
6 D1:B0D8 E5 - - - push hl
7 D1:B0D9 C5 - - - push bc
8 D1:B0DA D5 - - - push de
9 D1:B0DB 06 00 - - ld b, 0
10 D1:B0DD 11 00 00 00 ld de, 0
11 D1:B0E1 4F - - - ld c, a
12 D1:B0E2 21 9F EA D0 ld hl, FshCmd
13 D1:B0E6 - - - - commandfillLoop:
14 D1:B0E6 71 - - - ld (hl), c
15 D1:B0E7 23 - - - inc hl
16 D1:B0E8 04 - - - inc b
17 D1:B0E9 13 - - - inc de
18 D1:B0EA 78 - - - ld a, b
19 D1:B0EB FE 40 - - cp FshCmdSize
20 D1:B0ED 38 F7 - - jr c, commandfillLoop
21 D1:B0EF D1 - - - pop de
22 D1:B0F0 C1 - - - pop bc
23 D1:B0F1 E1 - - - pop hl
24 D1:B0F2 C9 - - - ret
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/fsh/fsh.inc"
2 D1:B0F3 - - - - #include "includes/lib/fsh/Parse.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/fsh/Parse.asm"
1 D1:B0F3 - - - - ;;fshparsecommand
2 D1:B0F3 - - - - ;;Inputs:
3 D1:B0F3 - - - - ;; HL: FshCmd
4 D1:B0F3 - - - - ;;b = buf row
5 D1:B0F3 - - - - ;;c = char in row
6 D1:B0F3 - - - - ;de = scratch
7 D1:B0F3 - - - - fshparsecommand:
8 D1:B0F3 E5 - - - push hl
9 D1:B0F4 C5 - - - push bc
10 D1:B0F5 D5 - - - push de
11 D1:B0F6 E5 - - - push hl
12 D1:B0F7 E5 - - - push hl
13 D1:B0F8 21 0A B2 D1 ld hl, fshparsecommandCmd
14 D1:B0FC 06 2D - - ld b, 45
15 D1:B0FE 3E 00 - - ld a, $00
16 D1:B100 CD 5E AA D1 call memset
17 D1:B104 E1 - - - pop hl
18 D1:B105 - - - -
19 D1:B105 01 00 00 00 ld bc, 0
20 D1:B109 11 00 00 00 ld de, 0
21 D1:B10D - - - - fshparsecommandLoop:
22 D1:B10D 7E - - - ld a, (hl)
23 D1:B10E - - - - fshparsecommandCheckSpace:
24 D1:B10E FE 20 - - cp ' ' ;end of word
25 D1:B110 20 0C - - jr nz, fshparsecommandCheckEnd
26 D1:B112 3E 00 - - ld a, $00
27 D1:B114 CD 3D B2 D1 call fshparsecommandCopyChar
28 D1:B118 0E 00 - - ld c, 0
29 D1:B11A 04 - - - inc b
30 D1:B11B 23 - - - inc hl
31 D1:B11C 18 EF - - jr fshparsecommandLoop
32 D1:B11E - - - -
33 D1:B11E - - - - fshparsecommandCheckEnd:
34 D1:B11E FE 00 - - cp $00 ;end of string
35 D1:B120 28 13 - - jr z, fshparsecommandCheckArgStatus
36 D1:B122 - - - -
37 D1:B122 - - - - fshparsecommandLoopEnd:
38 D1:B122 CD 3D B2 D1 call fshparsecommandCopyChar
39 D1:B126 23 - - - inc hl
40 D1:B127 0C - - - inc c
41 D1:B128 - - - -
42 D1:B128 79 - - - ld a, c
43 D1:B129 FE 08 - - cp FshCmdCmdSize
44 D1:B12B 20 E0 - - jr nz, fshparsecommandLoop
45 D1:B12D - - - - ;inc hl
46 D1:B12D 0E 00 - - ld c, 0
47 D1:B12F 04 - - - inc b
48 D1:B130 78 - - - ld a, b
49 D1:B131 FE 05 - - cp 5
50 D1:B133 20 D8 - - jr nz, fshparsecommandLoop
51 D1:B135 - - - - ; ld bc, 0
52 D1:B135 - - - -
53 D1:B135 - - - - fshparsecommandCheckArgStatus:
54 D1:B135 AF - - - xor a
55 D1:B136 21 CD EA D0 ld hl, FshCmdArgFlags
56 D1:B13A 77 - - - ld (hl), a
57 D1:B13B - - - - fshparsecommandCheckArg0:
58 D1:B13B 21 13 B2 D1 ld hl, fshparsecommandArg0
59 D1:B13F 7E - - - ld a, (hl)
60 D1:B140 FE 00 - - cp $00
61 D1:B142 28 27 - - jr z, fshparsecommandCheckArg1
62 D1:B144 21 CD EA D0 ld hl, FshCmdArgFlags
63 D1:B148 CB C6 - - set 0, (hl)
64 D1:B14A 7E - - - ld a, (hl)
65 D1:B14B 21 13 B2 D1 ld hl, fshparsecommandArg0
66 D1:B14F 7E - - - ld a, (hl)
67 D1:B150 D6 30 - - sub '0'
68 D1:B152 FE 0A - - cp '9' - '0' + 1
69 D1:B154 30 15 - - jr nc, fshparsecommandCheckArg1
70 D1:B156 CD D6 AC D1 call strtow
71 D1:B15A 11 13 B2 D1 ld de, fshparsecommandArg0
72 D1:B15E EB - - - ex de, hl
73 D1:B15F 73 - - - ld (hl), e
74 D1:B160 23 - - - inc hl
75 D1:B161 72 - - - ld (hl), d
76 D1:B162 34 - - - inc (hl)
77 D1:B163 36 00 - - ld (hl), $00
78 D1:B165 21 CD EA D0 ld hl, FshCmdArgFlags
79 D1:B169 CB CE - - set 1, (hl)
80 D1:B16B - - - - fshparsecommandCheckArg1:
81 D1:B16B 21 1C B2 D1 ld hl, fshparsecommandArg1
82 D1:B16F 7E - - - ld a, (hl)
83 D1:B170 FE 00 - - cp $00
84 D1:B172 28 26 - - jr z, fshparsecommandCheckArg2
85 D1:B174 21 CD EA D0 ld hl, FshCmdArgFlags
86 D1:B178 CB D6 - - set 2, (hl)
87 D1:B17A 21 1C B2 D1 ld hl, fshparsecommandArg1
88 D1:B17E 7E - - - ld a, (hl)
89 D1:B17F D6 30 - - sub '0'
90 D1:B181 FE 0A - - cp '9' - '0' + 1
91 D1:B183 30 15 - - jr nc, fshparsecommandCheckArg2
92 D1:B185 CD D6 AC D1 call strtow
93 D1:B189 11 1C B2 D1 ld de, fshparsecommandArg1
94 D1:B18D EB - - - ex de, hl
95 D1:B18E 73 - - - ld (hl), e
96 D1:B18F 23 - - - inc hl
97 D1:B190 72 - - - ld (hl), d
98 D1:B191 23 - - - inc hl
99 D1:B192 36 00 - - ld (hl), $00
100 D1:B194 21 CD EA D0 ld hl, FshCmdArgFlags
101 D1:B198 CB DE - - set 3, (hl)
102 D1:B19A - - - - fshparsecommandCheckArg2:
103 D1:B19A 21 25 B2 D1 ld hl, fshparsecommandArg2
104 D1:B19E 7E - - - ld a, (hl)
105 D1:B19F FE 00 - - cp $00
106 D1:B1A1 28 26 - - jr z, fshparsecommandCheckArg3
107 D1:B1A3 21 CD EA D0 ld hl, FshCmdArgFlags
108 D1:B1A7 CB E6 - - set 4, (hl)
109 D1:B1A9 21 25 B2 D1 ld hl, fshparsecommandArg2
110 D1:B1AD 7E - - - ld a, (hl)
111 D1:B1AE D6 30 - - sub '0'
112 D1:B1B0 FE 0A - - cp '9' - '0' + 1
113 D1:B1B2 30 15 - - jr nc, fshparsecommandCheckArg3
114 D1:B1B4 CD D6 AC D1 call strtow
115 D1:B1B8 11 25 B2 D1 ld de, fshparsecommandArg2
116 D1:B1BC EB - - - ex de, hl
117 D1:B1BD 73 - - - ld (hl), e
118 D1:B1BE 23 - - - inc hl
119 D1:B1BF 72 - - - ld (hl), d
120 D1:B1C0 23 - - - inc hl
121 D1:B1C1 36 00 - - ld (hl), $00
122 D1:B1C3 21 CD EA D0 ld hl, FshCmdArgFlags
123 D1:B1C7 CB EE - - set 5, (hl)
124 D1:B1C9 - - - - fshparsecommandCheckArg3:
125 D1:B1C9 21 2E B2 D1 ld hl, fshparsecommandArg3
126 D1:B1CD 7E - - - ld a, (hl)
127 D1:B1CE FE 00 - - cp $00
128 D1:B1D0 28 26 - - jr z, fshparsecommandCopyBack
129 D1:B1D2 21 CD EA D0 ld hl, FshCmdArgFlags
130 D1:B1D6 CB F6 - - set 6, (hl)
131 D1:B1D8 21 2E B2 D1 ld hl, fshparsecommandArg3
132 D1:B1DC 7E - - - ld a, (hl)
133 D1:B1DD D6 30 - - sub '0'
134 D1:B1DF FE 0A - - cp '9' - '0' + 1
135 D1:B1E1 30 15 - - jr nc, fshparsecommandCopyBack
136 D1:B1E3 CD D6 AC D1 call strtow
137 D1:B1E7 11 2E B2 D1 ld de, fshparsecommandArg3
138 D1:B1EB EB - - - ex de, hl
139 D1:B1EC 73 - - - ld (hl), e
140 D1:B1ED 23 - - - inc hl
141 D1:B1EE 72 - - - ld (hl), d
142 D1:B1EF 23 - - - inc hl
143 D1:B1F0 36 00 - - ld (hl), $00
144 D1:B1F2 21 CD EA D0 ld hl, FshCmdArgFlags
145 D1:B1F6 CB FE - - set 7, (hl)
146 D1:B1F8 - - - - fshparsecommandCopyBack:
147 D1:B1F8 E1 - - - pop hl
148 D1:B1F9 C5 - - - push bc
149 D1:B1FA EB - - - ex de, hl
150 D1:B1FB 21 0A B2 D1 ld hl, fshparsecommandCmd
151 D1:B1FF 01 2D 00 00 ld bc, 45
152 D1:B203 ED B0 - - ldir
153 D1:B205 C1 - - - pop bc
154 D1:B206 - - - -
155 D1:B206 D1 - - - pop de
156 D1:B207 C1 - - - pop bc
157 D1:B208 E1 - - - pop hl
158 D1:B209 C9 - - - ret
159 D1:B20A - - - -
160 D1:B20A 00 00 00 00
00 00 00 00
00 - - - fshparsecommandCmd: .db $00, $00, $00, $00, $00, $00, $00, $00, $00
161 D1:B213 00 00 00 00
00 00 00 00
00 - - - fshparsecommandArg0: .db $00, $00, $00, $00, $00, $00, $00, $00, $00
162 D1:B21C 00 00 00 00
00 00 00 00
00 - - - fshparsecommandArg1: .db $00, $00, $00, $00, $00, $00, $00, $00, $00
163 D1:B225 00 00 00 00
00 00 00 00
00 - - - fshparsecommandArg2: .db $00, $00, $00, $00, $00, $00, $00, $00, $00
164 D1:B22E 00 00 00 00
00 00 00 00
00 - - - fshparsecommandArg3: .db $00, $00, $00, $00, $00, $00, $00, $00, $00
165 D1:B237 00 00 00 00
00 00 - - fshparsecommandOverB: .db $00, $00, $00, $00, $00, $00
166 D1:B23D - - - -
167 D1:B23D - - - - fshparsecommandCopyChar:
168 D1:B23D - - - - ;Copy
169 D1:B23D E5 - - - push hl
170 D1:B23E C5 - - - push bc
171 D1:B23F 21 00 00 00 ld hl, 0
172 D1:B243 60 - - - ld h, b
173 D1:B244 2E 09 - - ld l, 9
174 D1:B246 41 - - - ld b, c
175 D1:B247 11 0A B2 D1 ld de, fshparsecommandCmd
176 D1:B24B CD A8 AB D1 call array2d
177 D1:B24F C1 - - - pop bc
178 D1:B250 E1 - - - pop hl
179 D1:B251 - - - - ;push hl
180 D1:B251 - - - - ; ld hl, fshparsecommandCmd+45+1
181 D1:B251 - - - - ; call cpHLDE
182 D1:B251 - - - - ;pop hl
183 D1:B251 - - - - ;pop de
184 D1:B251 - - - - ;ret c
185 D1:B251 - - - - ;push de
186 D1:B251 12 - - - ld (de), a ;ld buffer
187 D1:B252 C9 - - - ret
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/fsh/fsh.inc"
3 D1:B253 - - - - #include "includes/lib/fsh/FshVar.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/fsh/FshVar.asm"
1 D1:B253 - - - - ;;fshvarset
2 D1:B253 - - - - ;;Sets a Word in FshVars.
3 D1:B253 - - - - ;;Inputs:
4 D1:B253 - - - - ;; HL: 16b
5 D1:B253 - - - - ;; DE: Destination Word Relitive to FshVars
6 D1:B253 - - - - fshvarset:
7 D1:B253 C5 - - - push bc
8 D1:B254 01 3F 00 00 ld bc, FshVarsSize / 2 - 1
9 D1:B258 CD 77 A9 D1 call cpBCDE
10 D1:B25C C1 - - - pop bc
11 D1:B25D 38 11 - - jr c, fshvarsetOOBException
12 D1:B25F C5 - - - push bc
13 D1:B260 D5 - - - push de
14 D1:B261 E5 - - - push hl
15 D1:B262 01 1F EA D0 ld bc, FshVars
16 D1:B266 EB - - - ex de, hl
17 D1:B267 29 - - - add hl, hl
18 D1:B268 09 - - - add hl, bc
19 D1:B269 73 - - - ld (hl), e
20 D1:B26A 23 - - - inc hl
21 D1:B26B 72 - - - ld (hl), d
22 D1:B26C E1 - - - pop hl
23 D1:B26D D1 - - - pop de
24 D1:B26E C1 - - - pop bc
25 D1:B26F C9 - - - ret
26 D1:B270 - - - - fshvarsetOOBException:
27 D1:B270 E5 - - - push hl
28 D1:B271 21 95 B3 D1 ld hl, ErrOutOfBoundso
29 D1:B275 CD 50 B3 D1 call ErrSet
30 D1:B279 E1 - - - pop hl
31 D1:B27A C9 - - - ret
32 D1:B27B - - - -
33 D1:B27B - - - - ;;fshvarget
34 D1:B27B - - - - ;;Gets a Word in FshVars.
35 D1:B27B - - - - ;;Inputs:
36 D1:B27B - - - - ;; DE: Destination Word Relitive to FshVars
37 D1:B27B - - - - ;;Outputs:
38 D1:B27B - - - - ;; HL: Word in (DE)
39 D1:B27B - - - - fshvarget:
40 D1:B27B C5 - - - push bc
41 D1:B27C 01 3F 00 00 ld bc, FshVarsSize / 2 - 1
42 D1:B280 CD 77 A9 D1 call cpBCDE
43 D1:B284 C1 - - - pop bc
44 D1:B285 38 14 - - jr c, fshvargetOOBException
45 D1:B287 C5 - - - push bc
46 D1:B288 D5 - - - push de
47 D1:B289 21 00 00 00 ld hl, 0
48 D1:B28D 01 1F EA D0 ld bc, FshVars
49 D1:B291 EB - - - ex de, hl
50 D1:B292 29 - - - add hl, hl
51 D1:B293 09 - - - add hl, bc
52 D1:B294 5E - - - ld e, (hl)
53 D1:B295 23 - - - inc hl
54 D1:B296 56 - - - ld d, (hl)
55 D1:B297 EB - - - ex de, hl
56 D1:B298 D1 - - - pop de
57 D1:B299 C1 - - - pop bc
58 D1:B29A C9 - - - ret
59 D1:B29B - - - - fshvargetOOBException:
60 D1:B29B E5 - - - push hl
61 D1:B29C 21 95 B3 D1 ld hl, ErrOutOfBoundso
62 D1:B2A0 CD 50 B3 D1 call ErrSet
63 D1:B2A4 E1 - - - pop hl
64 D1:B2A5 C9 - - - ret
65 D1:B2A6 - - - - ;;fshvarcpy
66 D1:B2A6 - - - - ;;Copies a word.
67 D1:B2A6 - - - - ;;Inputs:
68 D1:B2A6 - - - - ;; HL: Byte pointer
69 D1:B2A6 - - - - ;; DE: Destination
70 D1:B2A6 - - - - fshvarcpy:
71 D1:B2A6 C5 - - - push bc
72 D1:B2A7 01 3F 00 00 ld bc, FshVarsSize / 2 - 1
73 D1:B2AB CD 77 A9 D1 call cpBCDE
74 D1:B2AF C1 - - - pop bc
75 D1:B2B0 38 2A - - jr c, fshvarcpyOOBException
76 D1:B2B2 C5 - - - push bc
77 D1:B2B3 01 40 00 00 ld bc, FshVarsSize / 2
78 D1:B2B7 CD 72 A9 D1 call cpHLBC
79 D1:B2BB C1 - - - pop bc
80 D1:B2BC 30 1E - - jr nc, fshvarcpyOOBException
81 D1:B2BE D5 - - - push de
82 D1:B2BF E5 - - - push hl
83 D1:B2C0 01 40 00 00 ld bc, FshVarsSize / 2
84 D1:B2C4 CD 77 A9 D1 call cpBCDE
85 D1:B2C8 38 12 - - jr c, fshvarcpyOOBException
86 D1:B2CA 01 1F EA D0 ld bc, FshVars
87 D1:B2CE 29 - - - add hl, hl
88 D1:B2CF 09 - - - add hl, bc
89 D1:B2D0 EB - - - ex de, hl
90 D1:B2D1 29 - - - add hl, hl
91 D1:B2D2 09 - - - add hl, bc
92 D1:B2D3 1A - - - ld a, (de)
93 D1:B2D4 77 - - - ld (hl), a
94 D1:B2D5 13 - - - inc de
95 D1:B2D6 23 - - - inc hl
96 D1:B2D7 1A - - - ld a, (de)
97 D1:B2D8 77 - - - ld (hl), a
98 D1:B2D9 E1 - - - pop hl
99 D1:B2DA D1 - - - pop de
100 D1:B2DB C9 - - - ret
101 D1:B2DC - - - -
102 D1:B2DC - - - - fshvarcpyOOBException:
103 D1:B2DC E5 - - - push hl
104 D1:B2DD 21 95 B3 D1 ld hl, ErrOutOfBoundso
105 D1:B2E1 CD 50 B3 D1 call ErrSet
106 D1:B2E5 E1 - - - pop hl
107 D1:B2E6 C9 - - - ret
108 D1:B2E7 - - - -
109 D1:B2E7 - - - - ;;fshvarreset
110 D1:B2E7 - - - - ;;Fills fshvars with $00
111 D1:B2E7 - - - - fshvarreset:
112 D1:B2E7 E5 - - - push hl
113 D1:B2E8 C5 - - - push bc
114 D1:B2E9 D5 - - - push de
115 D1:B2EA 06 00 - - ld b, 0
116 D1:B2EC 11 00 00 00 ld de, 0
117 D1:B2F0 21 00 00 00 ld hl, 0
118 D1:B2F4 - - - - fshvarfillLoop:
119 D1:B2F4 CD 53 B2 D1 call fshvarset
120 D1:B2F8 04 - - - inc b
121 D1:B2F9 13 - - - inc de
122 D1:B2FA 78 - - - ld a, b
123 D1:B2FB FE 40 - - cp FshVarsSize / 2
124 D1:B2FD 38 F5 - - jr c, fshvarfillLoop
125 D1:B2FF D1 - - - pop de
126 D1:B300 C1 - - - pop bc
127 D1:B301 E1 - - - pop hl
128 D1:B302 C9 - - - ret
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/fsh/fsh.inc"
4 D1:B303 - - - - #include "includes/lib/fsh/Err.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/fsh/Err.asm"
1 D1:B303 - - - - ;;ErrCatch
2 D1:B303 - - - - ;;Checks err bit and jp to err route
3 D1:B303 - - - - ErrCatch:
4 D1:B303 C1 - - - pop bc
5 D1:B304 E5 - - - push hl
6 D1:B305 21 6C A9 D1 ld hl, FshFlags
7 D1:B309 CB 4E - - bit 1, (hl)
8 D1:B30B E1 - - - pop hl
9 D1:B30C C2 12 B3 D1 jp nz, ErrRoute
10 D1:B310 C5 - - - push bc
11 D1:B311 C9 - - - ret
12 D1:B312 - - - -
13 D1:B312 - - - - ;;ErrRoute
14 D1:B312 - - - - ;;Routes err codes.
15 D1:B312 - - - - ErrRoute:
16 D1:B312 - - - -
17 D1:B312 21 6C A9 D1 ld hl, FshFlags
18 D1:B316 CB 8E - - res 1, (hl)
19 D1:B318 - - - -
20 D1:B318 21 CE EA D0 ld hl, FshCmdErrCode
21 D1:B31C - - - -
22 D1:B31C 11 5F B3 D1 ld de, ErrCmdNotFoundo
23 D1:B320 CD 35 AA D1 call bytecmp
24 D1:B324 CA 60 B3 D1 jp z, ErrCmdNotFoundf
25 D1:B328 - - - -
26 D1:B328 11 95 B3 D1 ld de, ErrOutOfBoundso
27 D1:B32C CD 35 AA D1 call bytecmp
28 D1:B330 CA 96 B3 D1 jp z, ErrOutOfBoundsf
29 D1:B334 - - - -
30 D1:B334 11 BB B3 D1 ld de, ErrArgso
31 D1:B338 CD 35 AA D1 call bytecmp
32 D1:B33C CA BC B3 D1 jp z, ErrArgsf
33 D1:B340 - - - -
34 D1:B340 11 E5 B3 D1 ld de, ErrUsageo
35 D1:B344 CD 35 AA D1 call bytecmp
36 D1:B348 CA E6 B3 D1 jp z, ErrUsagef
37 D1:B34C - - - -
38 D1:B34C C3 11 B4 D1 jp ErrDefault
39 D1:B350 - - - -
40 D1:B350 - - - -
41 D1:B350 - - - - ;;ErrSet
42 D1:B350 - - - - ;;Sets all things relating to Err codes
43 D1:B350 - - - - ;;Inputs:
44 D1:B350 - - - - ;; HL: Err_____o
45 D1:B350 - - - - ErrSet:
46 D1:B350 E5 - - - push hl
47 D1:B351 7E - - - ld a, (hl)
48 D1:B352 21 CE EA D0 ld hl, FshCmdErrCode
49 D1:B356 77 - - - ld (hl), a
50 D1:B357 21 6C A9 D1 ld hl, FshFlags
51 D1:B35B CB CE - - set 1, (hl)
52 D1:B35D E1 - - - pop hl
53 D1:B35E C9 - - - ret
54 D1:B35F - - - -
55 D1:B35F - - - - ;;ERR FUNCS-------------------
56 D1:B35F - - - -
57 D1:B35F 01 - - - ErrCmdNotFoundo: .db $01
58 D1:B360 - - - - ErrCmdNotFoundf:
59 D1:B360 21 9F EA D0 ld hl, FshCmd
60 D1:B364 7E - - - ld a, (hl)
61 D1:B365 FE 00 - - cp $00
62 D1:B367 CA DB A8 D1 jp z, Fin
63 D1:B36B 21 83 B3 D1 ld hl, ErrCmdNotFoundt
64 D1:B36F CD C0 07 02 call _PutS
65 D1:B373 21 9F EA D0 ld hl, FshCmd
66 D1:B377 CD C0 07 02 call _PutS
67 D1:B37B CD F0 07 02 call _NewLine
68 D1:B37F C3 DB A8 D1 jp Fin
69 D1:B383 65 72 72 6F
72 3A 4E 6F
20 43 6F 6D
6D 61 6E 64
3A 00 - - ErrCmdNotFoundt: .db "error:No Command:", 0
70 D1:B395 - - - -
71 D1:B395 02 - - - ErrOutOfBoundso: .db $02
72 D1:B396 - - - - ErrOutOfBoundsf:
73 D1:B396 21 A6 B3 D1 ld hl, ErrOutOfBoundst
74 D1:B39A CD C0 07 02 call _PutS
75 D1:B39E CD F0 07 02 call _NewLine
76 D1:B3A2 C3 DB A8 D1 jp Fin
77 D1:B3A6 65 72 72 6F
72 3A 20 4F
75 74 20 4F
66 20 42 6F
75 6E 64 73
00 - - - ErrOutOfBoundst: .db "error: Out Of Bounds", 0
78 D1:B3BB - - - -
79 D1:B3BB 03 - - - ErrArgso: .db $03
80 D1:B3BC - - - - ErrArgsf:
81 D1:B3BC 21 CC B3 D1 ld hl, ErrArgst
82 D1:B3C0 CD C0 07 02 call _PutS
83 D1:B3C4 CD F0 07 02 call _NewLine
84 D1:B3C8 C3 DB A8 D1 jp Fin
85 D1:B3CC 65 72 72 6F
72 3A 20 49
6E 76 61 6C
69 64 20 41
72 67 75 6D
65 6E 74 73
00 - - - ErrArgst: .db "error: Invalid Arguments", 0
86 D1:B3E5 - - - -
87 D1:B3E5 04 - - - ErrUsageo: .db $04
88 D1:B3E6 - - - - ErrUsagef:
89 D1:B3E6 21 02 B4 D1 ld hl, ErrUsaget
90 D1:B3EA CD C0 07 02 call _PutS
91 D1:B3EE 21 9F EA D0 ld hl, FshCmd
92 D1:B3F2 CD 24 B6 D1 call manrouteu
93 D1:B3F6 CD C0 07 02 call _PutS
94 D1:B3FA CD F0 07 02 call _NewLine
95 D1:B3FE C3 DB A8 D1 jp Fin
96 D1:B402 65 72 72 6F
72 3A 20 55
73 61 67 65
3A 20 00 - ErrUsaget: .db "error: Usage: ", 0
97 D1:B411 - - - -
98 D1:B411 - - - - ErrDefault:
99 D1:B411 21 1D B4 D1 ld hl, ErrDefaultt
100 D1:B415 CD C0 07 02 call _PutS
101 D1:B419 C3 F7 A8 D1 jp Exit
102 D1:B41D 65 72 72 6F
72 3A 20 44
65 66 61 75
6C 74 3B 20
45 78 69 74
00 - - - ErrDefaultt: .db "error: Default; Exit", 0
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/fsh/fsh.inc"
5 D1:B432 - - - - #include "includes/lib/fsh/Print.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/fsh/Print.asm"
1 D1:B432 - - - - ;;printfshnamelong
2 D1:B432 - - - - ;;prints Name + Varsv + Version to screen
3 D1:B432 - - - - printfshnamelong:
4 D1:B432 E5 - - - push hl
5 D1:B433 21 FC A8 D1 ld hl, FshName
6 D1:B437 CD C0 07 02 call _PutS
7 D1:B43B 3E 20 - - ld a, ' '
8 D1:B43D CD B8 07 02 call _PutC
9 D1:B441 21 31 A9 D1 ld hl, FshVVars
10 D1:B445 CD C0 07 02 call _PutS
11 D1:B449 3E 20 - - ld a, ' '
12 D1:B44B CD B8 07 02 call _PutC
13 D1:B44F 3E 76 - - ld a, 'v'
14 D1:B451 CD B8 07 02 call _PutC
15 D1:B455 21 35 A9 D1 ld hl, FshVMajor
16 D1:B459 CD C0 07 02 call _PutS
17 D1:B45D 21 3F A9 D1 ld hl, FshVSeparator
18 D1:B461 CD C0 07 02 call _PutS
19 D1:B465 21 37 A9 D1 ld hl, FshVMinor
20 D1:B469 CD C0 07 02 call _PutS
21 D1:B46D 21 3F A9 D1 ld hl, FshVSeparator
22 D1:B471 CD C0 07 02 call _PutS
23 D1:B475 21 39 A9 D1 ld hl, FshVPatch
24 D1:B479 CD C0 07 02 call _PutS
25 D1:B47D 3E 20 - - ld a, ' '
26 D1:B47F CD B8 07 02 call _PutC
27 D1:B483 21 3B A9 D1 ld hl, FshVBuild
28 D1:B487 CD C0 07 02 call _PutS
29 D1:B48B E1 - - - pop hl
30 D1:B48C C9 - - - ret
31 D1:B48D - - - -
32 D1:B48D - - - - ;;printmotd
33 D1:B48D - - - - ;;prints the motd to screen
34 D1:B48D - - - - printmotd:
35 D1:B48D CD 32 B4 D1 call printfshnamelong
36 D1:B491 CD F0 07 02 call _NewLine
37 D1:B495 CD F0 07 02 call _NewLine
38 D1:B499 21 41 A9 D1 ld hl, FshMotd2nd
39 D1:B49D CD C0 07 02 call _PutS
40 D1:B4A1 CD F0 07 02 call _NewLine
41 D1:B4A5 21 57 A9 D1 ld hl, FshMotdHelp
42 D1:B4A9 CD C0 07 02 call _PutS
43 D1:B4AD CD F0 07 02 call _NewLine
44 D1:B4B1 C9 - - - ret
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/fsh/fsh.inc"
6 D1:B4B2 - - - - #include "includes/lib/fsh/Draw.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/fsh/Draw.asm"
1 D1:B4B2 - - - - ;;drawstatusbar
2 D1:B4B2 - - - - ;;draws the FSH status bar
3 D1:B4B2 - - - - drawstatusbar:
4 D1:B4B2 - - - - ;rgbto565(84, 84, 84)
5 D1:B4B2 21 AA 52 00 ld hl, $52AA
6 D1:B4B6 3E 00 - - ld a, 0
7 D1:B4B8 01 1E 00 00 ld bc, 30
8 D1:B4BC CD 72 AB D1 call drawbar
9 D1:B4C0 - - - - ;rgbto565(0, 159, 209)
10 D1:B4C0 21 FA 04 00 ld hl, $04FA
11 D1:B4C4 - - - - ;ld hl, %1111100000000000
12 D1:B4C4 EB DD 6B DD
62 EB 21 02
00 00 11 00
00 00 01 00
00 00 0E 00
3E 1E CD 87
AB D1 - - drawrectfilledM(0, 0, 2, 30)
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/fsh/Draw.asm"
13 D1:B4DE CD 50 1A 02 call _DrawBatteryIndicator
14 D1:B4E2 - - - - ;draw name
15 D1:B4E2 FD CB 32 D6 set fracDrawLFont, (iy + fontFlags)
16 D1:B4E6 3E 06 - - ld a, 6
17 D1:B4E8 32 D5 08 D0 ld (penRow), a
18 D1:B4EC 21 07 00 00 ld hl, 7
19 D1:B4F0 22 D2 08 D0 ld (penCol), hl
20 D1:B4F4 21 AA 52 00 ld hl, $52AA
21 D1:B4F8 22 AA 26 D0 ld (drawBGcolor), hl
22 D1:B4FC 21 FF FF 00 ld hl, $ffff
23 D1:B500 22 AC 26 D0 ld (drawFGcolor), hl
24 D1:B504 21 FC A8 D1 ld hl, FshName
25 D1:B508 CD 34 08 02 call _VPutS
26 D1:B50C 21 FF FF 00 ld hl, $ffff
27 D1:B510 22 AA 26 D0 ld (drawBGcolor), hl
28 D1:B514 21 00 00 00 ld hl, $0000
29 D1:B518 22 AC 26 D0 ld (drawFGcolor), hl
30 D1:B51C C9 - - - ret
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/fsh/fsh.inc"
Listing for file "FSHa.asm"
73 D1:B51D - - - - #include "includes/lib/crypto/crypto.inc"
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/crypto/crypto.inc"
1 D1:B51D - - - - #include "includes/lib/crypto/Rot.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/crypto/Rot.asm"
1 D1:B51D - - - - ;;rotletencrypt
2 D1:B51D - - - - ;;Encrypts a string in rot-n (uses $41 to $5B)
3 D1:B51D - - - - ;;Inputs:
4 D1:B51D - - - - ;; HL: string pointer
5 D1:B51D - - - - ;; A: rot-n
6 D1:B51D - - - - ;;Notes:
7 D1:B51D - - - - ;; Changes string in place.
8 D1:B51D - - - - rotletencrypt:
9 D1:B51D E5 - - - push hl
10 D1:B51E C5 - - - push bc
11 D1:B51F - - - - rotletencryptMod:
12 D1:B51F E5 - - - push hl
13 D1:B520 67 - - - ld h, a
14 D1:B521 2E 19 - - ld l, 'Z' + 1 - 'A' - 1
15 D1:B523 CD 99 A9 D1 call modHL
16 D1:B527 44 - - - ld b, h
17 D1:B528 E1 - - - pop hl
18 D1:B529 - - - - rotletencryptLoop:
19 D1:B529 7E - - - ld a, (hl)
20 D1:B52A FE 00 - - cp a, $00
21 D1:B52C 28 0F - - jr z, rotletencryptEnd
22 D1:B52E FE 20 - - cp a, ' '
23 D1:B530 28 07 - - jr z, rotletencryptLD
24 D1:B532 80 - - - add a, b
25 D1:B533 FE 5C - - cp a, 'Z' + 2
26 D1:B535 38 02 - - jr c , rotletencryptLD
27 D1:B537 D6 1B - - sub a, 'Z' + 2 - 'A'
28 D1:B539 - - - - rotletencryptLD:
29 D1:B539 77 - - - ld (hl), a
30 D1:B53A 23 - - - inc hl
31 D1:B53B 18 EC - - jr rotletencryptLoop
32 D1:B53D - - - - rotletencryptEnd:
33 D1:B53D 36 00 - - ld (hl), $00
34 D1:B53F C1 - - - pop bc
35 D1:B540 E1 - - - pop hl
36 D1:B541 C9 - - - ret
37 D1:B542 - - - -
38 D1:B542 - - - - ;;rotletdecrypt
39 D1:B542 - - - - ;;Decrypts a string in rot-n (uses $41 to $5B)
40 D1:B542 - - - - ;;Inputs:
41 D1:B542 - - - - ;; HL: string pointer
42 D1:B542 - - - - ;; A: rot-n
43 D1:B542 - - - - ;;Notes:
44 D1:B542 - - - - ;; Changes string in place.
45 D1:B542 - - - - rotletdecrypt:
46 D1:B542 E5 - - - push hl
47 D1:B543 C5 - - - push bc
48 D1:B544 - - - - rotletdecryptMod:
49 D1:B544 E5 - - - push hl
50 D1:B545 67 - - - ld h, a
51 D1:B546 2E 19 - - ld l, 'Z' + 1 - 'A' - 1
52 D1:B548 CD 99 A9 D1 call modHL
53 D1:B54C 44 - - - ld b, h
54 D1:B54D E1 - - - pop hl
55 D1:B54E - - - - rotletdecryptLoop:
56 D1:B54E 7E - - - ld a, (hl)
57 D1:B54F FE 00 - - cp a, $00
58 D1:B551 28 0F - - jr z, rotletdecryptEnd
59 D1:B553 FE 20 - - cp a, ' '
60 D1:B555 28 07 - - jr z, rotletdecryptLD
61 D1:B557 90 - - - sub a, b
62 D1:B558 FE 41 - - cp a, 'A'
63 D1:B55A 30 02 - - jr nc , rotletdecryptLD
64 D1:B55C C6 1B - - add a, 'Z' + 2 - 'A'
65 D1:B55E - - - - rotletdecryptLD:
66 D1:B55E 77 - - - ld (hl), a
67 D1:B55F 23 - - - inc hl
68 D1:B560 18 EC - - jr rotletdecryptLoop
69 D1:B562 - - - - rotletdecryptEnd:
70 D1:B562 36 00 - - ld (hl), $00
71 D1:B564 C1 - - - pop bc
72 D1:B565 E1 - - - pop hl
73 D1:B566 C9 - - - ret
74 D1:B567 - - - -
75 D1:B567 - - - - ;;rotasciiencrypt
76 D1:B567 - - - - ;;Encrypts a string in rot-x (uses $00 to $EF)
77 D1:B567 - - - - ;;Inputs:
78 D1:B567 - - - - ;; HL: string pointer
79 D1:B567 - - - - ;; A: x
80 D1:B567 - - - - ;;Notes:
81 D1:B567 - - - - ;; Changes string in place.
82 D1:B567 - - - - rotasciiencrypt:
83 D1:B567 E5 - - - push hl
84 D1:B568 C5 - - - push bc
85 D1:B569 0E 00 - - ld c, 0
86 D1:B56B 4F - - - ld c, a
87 D1:B56C - - - - rotasciiencryptLoop:
88 D1:B56C 7E - - - ld a, (hl)
89 D1:B56D FE 00 - - cp 0
90 D1:B56F 28 13 - - jr z, rotasciiencryptEnd
91 D1:B571 81 - - - add a, c
92 D1:B572 FE 00 - - cp 0
93 D1:B574 20 01 - - jr nz, rotasciiencryptLd
94 D1:B576 3C - - - inc a
95 D1:B577 - - - - rotasciiencryptLd:
96 D1:B577 77 - - - ld (hl), a
97 D1:B578 23 - - - inc hl
98 D1:B579 FE EF - - cp a, $EF
99 D1:B57B 38 EF - - jr c, rotasciiencryptLoop
100 D1:B57D 2B - - - dec hl
101 D1:B57E D6 0F - - sub a, $0F
102 D1:B580 77 - - - ld (hl), a
103 D1:B581 23 - - - inc hl
104 D1:B582 18 E8 - - jr rotasciiencryptLoop
105 D1:B584 - - - - rotasciiencryptEnd:
106 D1:B584 36 00 - - ld (hl), $00
107 D1:B586 C1 - - - pop bc
108 D1:B587 E1 - - - pop hl
109 D1:B588 C9 - - - ret
110 D1:B589 - - - -
111 D1:B589 - - - - ;;rotasciidecrypt
112 D1:B589 - - - - ;;Encrypts a string in rot-x (uses $00 to $EF)
113 D1:B589 - - - - ;;Inputs:
114 D1:B589 - - - - ;; HL: string pointer
115 D1:B589 - - - - ;; A: x
116 D1:B589 - - - - ;;Notes:
117 D1:B589 - - - - ;; Changes string in place.
118 D1:B589 - - - - rotasciidecrypt:
119 D1:B589 E5 - - - push hl
120 D1:B58A C5 - - - push bc
121 D1:B58B 0E 00 - - ld c, 0
122 D1:B58D 4F - - - ld c, a
123 D1:B58E - - - - rotasciidecryptLoop:
124 D1:B58E 7E - - - ld a, (hl)
125 D1:B58F FE 00 - - cp 0
126 D1:B591 28 13 - - jr z, rotasciidecryptEnd
127 D1:B593 91 - - - sub a, c
128 D1:B594 FE 00 - - cp 0
129 D1:B596 20 01 - - jr nz, rotasciidecryptLd
130 D1:B598 3D - - - dec a
131 D1:B599 - - - - rotasciidecryptLd:
132 D1:B599 77 - - - ld (hl), a
133 D1:B59A 23 - - - inc hl
134 D1:B59B FE EF - - cp a, $EF
135 D1:B59D 38 EF - - jr c, rotasciidecryptLoop
136 D1:B59F 2B - - - dec hl
137 D1:B5A0 C6 0F - - add a, $0F
138 D1:B5A2 77 - - - ld (hl), a
139 D1:B5A3 23 - - - inc hl
140 D1:B5A4 18 E8 - - jr rotasciidecryptLoop
141 D1:B5A6 - - - - rotasciidecryptEnd:
142 D1:B5A6 36 00 - - ld (hl), $00
143 D1:B5A8 C1 - - - pop bc
144 D1:B5A9 E1 - - - pop hl
145 D1:B5AA C9 - - - ret
146 D1:B5AB - - - -
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/crypto/crypto.inc"
2 D1:B5AB - - - - #include "includes/lib/crypto/Xor.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/crypto/Xor.asm"
1 D1:B5AB - - - - ;;xorcrypt
2 D1:B5AB - - - - ;;<en><de>crypts a string using xor
3 D1:B5AB - - - - ;;Inputs:
4 D1:B5AB - - - - ;; HL: string pointer
5 D1:B5AB - - - - ;; DE: seed pointer (shorter)
6 D1:B5AB - - - - ;;Notes:
7 D1:B5AB - - - - ;; Changes string in place.
8 D1:B5AB - - - - xorcrypt:
9 D1:B5AB E5 - - - push hl
10 D1:B5AC D5 - - - push de
11 D1:B5AD C5 - - - push bc
12 D1:B5AE CD 3B AC D1 call strlen
13 D1:B5B2 D5 - - - push de
14 D1:B5B3 E5 - - - push hl
15 D1:B5B4 21 00 00 00 ld hl, 0
16 D1:B5B8 60 - - - ld h, b
17 D1:B5B9 69 - - - ld l, c
18 D1:B5BA EB - - - ex de, hl
19 D1:B5BB CD 3B AC D1 call strlen
20 D1:B5BF EB - - - ex de, hl
21 D1:B5C0 7D - - - ld a, l ;C = len(seed) l=len(string)
22 D1:B5C1 91 - - - sub a,c
23 D1:B5C2 D2 CC B5 D1 jp nc, xorcryptNSmaller
24 D1:B5C6 0E 01 - - ld c, $01
25 D1:B5C8 3E 00 - - ld a, 0
26 D1:B5CA 2E 00 - - ld l, 0
27 D1:B5CC - - - - xorcryptNSmaller:
28 D1:B5CC 0D - - - dec c
29 D1:B5CD D2 D3 B5 D1 jp nc, xorcryptNSmaller2
30 D1:B5D1 0E 00 - - ld c, 0
31 D1:B5D3 - - - - xorcryptNSmaller2:
32 D1:B5D3 41 - - - ld b, c
33 D1:B5D4 4D - - - ld c, l ;b=len(seed) c=len(string)
34 D1:B5D5 E1 - - - pop hl
35 D1:B5D6 B7 - - - or a, a
36 D1:B5D7 D1 - - - pop de
37 D1:B5D8 28 2C - - jr z, xorcryptEnd
38 D1:B5DA D5 - - - push de
39 D1:B5DB EB - - - ex de, hl; hl=seed
40 D1:B5DC E1 - - - pop hl
41 D1:B5DD C5 - - - push bc
42 D1:B5DE D5 - - - push de
43 D1:B5DF 11 00 00 00 ld de, 0
44 D1:B5E3 58 - - - ld e, b
45 D1:B5E4 01 00 00 00 ld bc, 0
46 D1:B5E8 4B - - - ld c, e
47 D1:B5E9 09 - - - add hl, bc
48 D1:B5EA D1 - - - pop de
49 D1:B5EB C1 - - - pop bc
50 D1:B5EC 23 - - - inc hl
51 D1:B5ED 36 80 - - ld (hl), %10000000
52 D1:B5EF C5 - - - push bc
53 D1:B5F0 05 - - - dec b
54 D1:B5F1 3E FF - - ld a, $FF
55 D1:B5F3 B8 - - - cp a, b
56 D1:B5F4 28 0B - - jr z, xorcryptPadLoopEnd
57 D1:B5F6 3E 00 - - ld a, $00
58 D1:B5F8 B8 - - - cp a, b
59 D1:B5F9 20 01 - - jr nz, xorcryptPadLoop
60 D1:B5FB 04 - - - inc b
61 D1:B5FC - - - - xorcryptPadLoop:
62 D1:B5FC 23 - - - inc hl
63 D1:B5FD 36 65 - - ld (hl), 'e'
64 D1:B5FF 10 FB - - djnz xorcryptPadLoop
65 D1:B601 - - - - xorcryptPadLoopEnd:
66 D1:B601 C1 - - - pop bc
67 D1:B602 70 - - - ld (hl), b
68 D1:B603 23 - - - inc hl
69 D1:B604 36 00 - - ld (hl), $00
70 D1:B606 - - - - xorcryptEnd:
71 D1:B606 C1 - - - pop bc
72 D1:B607 D1 - - - pop de
73 D1:B608 E1 - - - pop hl
74 D1:B609 - - - - ;push hl
75 D1:B609 - - - - ;xorcryptRandLoop:
76 D1:B609 - - - - ;ld a, (hl)
77 D1:B609 - - - - ;or a, a
78 D1:B609 - - - - ;jr z, xorcryptRandLoopEnd
79 D1:B609 - - - - ;call randomint
80 D1:B609 - - - - ;or a, a
81 D1:B609 - - - - ;jr nz, xorcryptRandLoopLD
82 D1:B609 - - - - ;ld a, '/'
83 D1:B609 - - - - ;xorcryptRandLoopLD:
84 D1:B609 - - - - ;ld (hl), a
85 D1:B609 - - - - ;inc hl
86 D1:B609 - - - - ;jr xorcryptRandLoop
87 D1:B609 - - - - ;xorcryptRandLoopEnd:
88 D1:B609 - - - - ;pop hl
89 D1:B609 CD 7E AD D1 call strxor
90 D1:B60D C9 - - - ret
91 D1:B60E - - - -
Listing for file "/home/pi/Documents/asm/FSH/includes/lib/crypto/crypto.inc"
Listing for file "FSHa.asm"
74 D1:B60E - - - -
75 D1:B60E - - - - #include "includes/man-db.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/man-db.asm"
1 D1:B60E - - - - ;;TODO: move module specific macros to diffrent file
2 D1:B60E - - - - ;;manroute
3 D1:B60E - - - - ;;routes command string to discription
4 D1:B60E - - - - ;;Inputs:
5 D1:B60E - - - - ;; HL: Command String
6 D1:B60E - - - - ;;Outputs:
7 D1:B60E - - - - ;; HL: Command Discription String
8 D1:B60E - - - - manroute:
9 D1:B60E D5 - - - push de
10 D1:B60F - - - - #macro routestrjp(cmdXs, cmdXm)
11 D1:B60F ld de, cmdXs
12 D1:B60F call strcmp
13 D1:B60F ld de, cmdXm
14 D1:B60F jp z, manrouteReturn
15 D1:B60F #endmacro
16 D1:B60F - - - -
17 D1:B60F - - - - #macro subroutestrjp(cmdXs, cmdYs, cmdYm)
18 D1:B60F push hl
19 D1:B60F ld de, cmdXs
20 D1:B60F call strcmp
21 D1:B60F ld hl, 0
22 D1:B60F jr nz, +_
23 D1:B60F ld hl, FshCmdArg1
24 D1:B60F _:
25 D1:B60F ld de, cmdYs
26 D1:B60F call strcmp
27 D1:B60F pop hl
28 D1:B60F ld de, cmdYm
29 D1:B60F jp z, manrouteReturn
30 D1:B60F #endmacro
31 D1:B60F - - - -
32 D1:B60F CD C3 B7 D1 call fshcmdmanroute
33 D1:B613 CD 15 C1 D1 call cryptocmdmanroute
34 D1:B617 - - - - ;Extention Point
35 D1:B617 - - - -
36 D1:B617 21 CE EA D0 ld hl, FshCmdErrCode
37 D1:B61B 36 01 - - ld (hl), $01
38 D1:B61D 11 00 00 00 ld de, $00
39 D1:B621 - - - - manrouteReturn:
40 D1:B621 EB - - - ex de, hl
41 D1:B622 D1 - - - pop de
42 D1:B623 C9 - - - ret
43 D1:B624 - - - -
44 D1:B624 - - - - ;;manrouteu
45 D1:B624 - - - - ;;routes command string to usage
46 D1:B624 - - - - ;;Inputs:
47 D1:B624 - - - - ;; HL: Command String
48 D1:B624 - - - - ;;Outputs:
49 D1:B624 - - - - ;; HL: Command Usage String
50 D1:B624 - - - - manrouteu:
51 D1:B624 D5 - - - push de
52 D1:B625 - - - - #macro routeustrjp(cmdXs, cmdXu)
53 D1:B625 ld de, cmdXs
54 D1:B625 call strcmp
55 D1:B625 ld de, cmdXu
56 D1:B625 jp z, manrouteuReturn
57 D1:B625 #endmacro
58 D1:B625 - - - -
59 D1:B625 - - - - #macro subrouteustrjp(cmdXs, cmdYs, cmdYu)
60 D1:B625 push hl
61 D1:B625 ld de, cmdXs
62 D1:B625 call strcmp
63 D1:B625 ld hl, 0
64 D1:B625 jr nz, +_
65 D1:B625 ld hl, FshCmdArg1
66 D1:B625 _:
67 D1:B625 ld de, cmdYs
68 D1:B625 call strcmp
69 D1:B625 pop hl
70 D1:B625 ld de, cmdYu
71 D1:B625 jp z, manrouteuReturn
72 D1:B625 #endmacro
73 D1:B625 - - - -
74 D1:B625 CD 76 B8 D1 call fshcmdmanrouteu
75 D1:B629 CD 10 C2 D1 call cryptocmdmanrouteu
76 D1:B62D - - - - ;Extention Point
77 D1:B62D - - - -
78 D1:B62D 21 CE EA D0 ld hl, FshCmdErrCode
79 D1:B631 36 01 - - ld (hl), $01
80 D1:B633 11 00 00 00 ld de, $00
81 D1:B637 - - - - manrouteuReturn:
82 D1:B637 EB - - - ex de, hl
83 D1:B638 D1 - - - pop de
84 D1:B639 C9 - - - ret
Listing for file "FSHa.asm"
76 D1:B63A - - - - #include "includes/Command.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/Command.asm"
1 D1:B63A - - - - ;;Commanddecode
2 D1:B63A - - - - ;;Decodes all commands.
3 D1:B63A - - - - ;;Inputs:
4 D1:B63A - - - - ;; HL: Cmd String mem loc
5 D1:B63A - - - - ;; DE: Op code mem loc
6 D1:B63A - - - - ;;Output:
7 D1:B63A - - - - ;; Sets (DE) with command op code
8 D1:B63A - - - - commanddecode:
9 D1:B63A - - - - #macro decodecmdopt(cmdXs, cmdXo)
10 D1:B63A push hl
11 D1:B63A push de
12 D1:B63A ld de, cmdXs
13 D1:B63A call strcmp
14 D1:B63A ld hl, cmdXo
15 D1:B63A pop de
16 D1:B63A call z, wordcpy
17 D1:B63A pop hl
18 D1:B63A #endmacro
19 D1:B63A - - - -
20 D1:B63A CD 5F B6 D1 call fshcmddecode
21 D1:B63E CD D1 C0 D1 call cryptocmddecode
22 D1:B642 - - - - ;Extention Point
23 D1:B642 - - - -
24 D1:B642 C9 - - - ret
25 D1:B643 - - - -
26 D1:B643 - - - - ;;commandroute
27 D1:B643 - - - - ;;Routes all commamds.
28 D1:B643 - - - - ;;Inputs:
29 D1:B643 - - - - ;; HL: Op code mem loc
30 D1:B643 - - - - commandroute:
31 D1:B643 - - - - #macro routeoptjp(cmdXo, cmdXf)
32 D1:B643 ld de, cmdXo
33 D1:B643 call wordcmp
34 D1:B643 jp z, cmdXf
35 D1:B643 #endmacro
36 D1:B643 - - - -
37 D1:B643 CD 3C B7 D1 call fshcmdroute
38 D1:B647 CD FA C0 D1 call cryptocmdroute
39 D1:B64B - - - - ;Extention Point
40 D1:B64B - - - -
41 D1:B64B 21 5F B3 D1 ld hl, ErrCmdNotFoundo
42 D1:B64F 11 CE EA D0 ld de, FshCmdErrCode
43 D1:B653 CD 3D AA D1 call bytecpy
44 D1:B657 CD 50 B3 D1 call ErrSet
45 D1:B65B C3 DF A8 D1 jp Err
46 D1:B65F - - - -
47 D1:B65F - - - - #include "includes/FshCommands/FshCommand.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/FshCommand.asm"
1 D1:B65F - - - - fshcmddecode:
2 D1:B65F E5 D5 11 29
B9 D1 CD 4C
AC D1 21 2E
B9 D1 D1 CC
45 AA D1 E1 decodecmdopt(fshcmdEXIT, fshcmdEXITo)
Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/FshCommand.asm"
3 D1:B673 E5 D5 11 43
B9 D1 CD 4C
AC D1 21 47
B9 D1 D1 CC
45 AA D1 E1 decodecmdopt(fshcmdSET, fshcmdSETo)
4 D1:B687 E5 D5 11 3B
BA D1 CD 4C
AC D1 21 40
BA D1 D1 CC
45 AA D1 E1 decodecmdopt(fshcmdCOPY, fshcmdCOPYo)
5 D1:B69B E5 D5 11 4A
BB D1 CD 4C
AC D1 21 4F
BB D1 D1 CC
45 AA D1 E1 decodecmdopt(fshcmdMOVE, fshcmdMOVEo)
6 D1:B6AF E5 D5 11 61
BC D1 CD 4C
AC D1 21 65
BC D1 D1 CC
45 AA D1 E1 decodecmdopt(fshcmdCLS, fshcmdCLSo)
7 D1:B6C3 E5 D5 11 8E
BC D1 CD 4C
AC D1 21 92
BC D1 D1 CC
45 AA D1 E1 decodecmdopt(fshcmdVAR, fshcmdVARo)
8 D1:B6D7 E5 D5 11 31
BD D1 CD 4C
AC D1 21 36
BD D1 D1 CC
45 AA D1 E1 decodecmdopt(fshcmdVARS, fshcmdVARSo)
9 D1:B6EB E5 D5 11 A2
BD D1 CD 4C
AC D1 21 A8
BD D1 D1 CC
45 AA D1 E1 decodecmdopt(fshcmdSLEEP, fshcmdSLEEPo)
10 D1:B6FF E5 D5 11 F1
BD D1 CD 4C
AC D1 21 F6
BD D1 D1 CC
45 AA D1 E1 decodecmdopt(fshcmdINFO, fshcmdINFOo)
11 D1:B713 E5 D5 11 94
BE D1 CD 4C
AC D1 21 99
BE D1 D1 CC
45 AA D1 E1 decodecmdopt(fshcmdHELP, fshcmdHELPo)
12 D1:B727 E5 D5 11 E8
BF D1 CD 4C
AC D1 21 EC
BF D1 D1 CC
45 AA D1 E1 decodecmdopt(fshcmdMAN, fshcmdMANo)
13 D1:B73B C9 - - - ret
14 D1:B73C - - - -
15 D1:B73C - - - - fshcmdroute:
16 D1:B73C C1 - - - pop bc ;pop the ret loc from stack into bc
17 D1:B73D 11 2E B9 D1
CD 51 AA D1
CA 3F B9 D1 routeoptjp(fshcmdEXITo, fshcmdEXITf)
18 D1:B749 11 47 B9 D1
CD 51 AA D1
CA 86 B9 D1 routeoptjp(fshcmdSETo, fshcmdSETf)
19 D1:B755 11 40 BA D1
CD 51 AA D1
CA 9C BA D1 routeoptjp(fshcmdCOPYo, fshcmdCOPYf)
20 D1:B761 11 4F BB D1
CD 51 AA D1
CA AA BB D1 routeoptjp(fshcmdMOVEo, fshcmdMOVEf)
21 D1:B76D 11 65 BC D1
CD 51 AA D1
CA 7D BC D1 routeoptjp(fshcmdCLSo, fshcmdCLSf)
22 D1:B779 11 92 BC D1
CD 51 AA D1
CA CA BC D1 routeoptjp(fshcmdVARo, fshcmdVARf)
23 D1:B785 11 36 BD D1
CD 51 AA D1
CA 53 BD D1 routeoptjp(fshcmdVARSo, fshcmdVARSf)
24 D1:B791 11 A8 BD D1
CD 51 AA D1
CA DA BD D1 routeoptjp(fshcmdSLEEPo, fshcmdSLEEPf)
25 D1:B79D 11 F6 BD D1
CD 51 AA D1
CA 23 BE D1 routeoptjp(fshcmdINFOo, fshcmdINFOf)
26 D1:B7A9 11 99 BE D1
CD 51 AA D1
CA B6 BE D1 routeoptjp(fshcmdHELPo, fshcmdHELPf)
27 D1:B7B5 11 EC BF D1
CD 51 AA D1
CA 1A C0 D1 routeoptjp(fshcmdMANo, fshcmdMANf)
28 D1:B7C1 C5 - - - push bc ;put ret location back on stack
29 D1:B7C2 C9 - - - ret
30 D1:B7C3 - - - -
31 D1:B7C3 - - - - fshcmdmanroute:
32 D1:B7C3 C1 - - - pop bc
33 D1:B7C4 11 29 B9 D1
CD 4C AC D1
11 30 B9 D1
CA 21 B6 D1 routestrjp(fshcmdEXIT, fshCmdEXITm)
34 D1:B7D4 11 43 B9 D1
CD 4C AC D1
11 49 B9 D1
CA 21 B6 D1 routestrjp(fshcmdSET, fshCmdSETm)
35 D1:B7E4 11 3B BA D1
CD 4C AC D1
11 42 BA D1
CA 21 B6 D1 routestrjp(fshcmdCOPY, fshCmdCOPYm)
36 D1:B7F4 11 4A BB D1
CD 4C AC D1
11 51 BB D1
CA 21 B6 D1 routestrjp(fshcmdMOVE, fshCmdMOVEm)
37 D1:B804 11 61 BC D1
CD 4C AC D1
11 67 BC D1
CA 21 B6 D1 routestrjp(fshcmdCLS, fshCmdCLSm)
38 D1:B814 11 8E BC D1
CD 4C AC D1
11 94 BC D1
CA 21 B6 D1 routestrjp(fshcmdVAR, fshCmdVARm)
39 D1:B824 11 31 BD D1
CD 4C AC D1
11 38 BD D1
CA 21 B6 D1 routestrjp(fshcmdVARS, fshCmdVARSm)
40 D1:B834 11 A2 BD D1
CD 4C AC D1
11 AA BD D1
CA 21 B6 D1 routestrjp(fshcmdSLEEP, fshCmdSLEEPm)
41 D1:B844 11 F1 BD D1
CD 4C AC D1
11 F8 BD D1
CA 21 B6 D1 routestrjp(fshcmdINFO, fshCmdINFOm)
42 D1:B854 11 94 BE D1
CD 4C AC D1
11 9B BE D1
CA 21 B6 D1 routestrjp(fshcmdHELP, fshCmdHELPm)
43 D1:B864 11 E8 BF D1
CD 4C AC D1
11 EE BF D1
CA 21 B6 D1 routestrjp(fshcmdMAN, fshCmdMANm)
44 D1:B874 C5 - - - push bc
45 D1:B875 C9 - - - ret
46 D1:B876 - - - -
47 D1:B876 - - - - fshcmdmanrouteu:
48 D1:B876 C1 - - - pop bc
49 D1:B877 11 29 B9 D1
CD 4C AC D1
11 3A B9 D1
CA 37 B6 D1 routeustrjp(fshcmdEXIT, fshCmdEXITu)
50 D1:B887 11 43 B9 D1
CD 4C AC D1
11 64 B9 D1
CA 37 B6 D1 routeustrjp(fshcmdSET, fshCmdSETu)
51 D1:B897 11 3B BA D1
CD 4C AC D1
11 70 BA D1
CA 37 B6 D1 routeustrjp(fshcmdCOPY, fshCmdCOPYu)
52 D1:B8A7 11 4A BB D1
CD 4C AC D1
11 7E BB D1
CA 37 B6 D1 routeustrjp(fshcmdMOVE, fshCmdMOVEu)
53 D1:B8B7 11 61 BC D1
CD 4C AC D1
11 79 BC D1
CA 37 B6 D1 routeustrjp(fshcmdCLS, fshCmdCLSu)
54 D1:B8C7 11 8E BC D1
CD 4C AC D1
11 B5 BC D1
CA 37 B6 D1 routeustrjp(fshcmdVAR, fshCmdVARu)
55 D1:B8D7 11 31 BD D1
CD 4C AC D1
11 4E BD D1
CA 37 B6 D1 routeustrjp(fshcmdVARS, fshCmdVARSu)
56 D1:B8E7 11 A2 BD D1
CD 4C AC D1
11 D4 BD D1
CA 37 B6 D1 routeustrjp(fshcmdSLEEP, fshCmdSLEEPu)
57 D1:B8F7 11 F1 BD D1
CD 4C AC D1
11 1E BE D1
CA 37 B6 D1 routeustrjp(fshcmdINFO, fshCmdINFOu)
58 D1:B907 11 94 BE D1
CD 4C AC D1
11 B1 BE D1
CA 37 B6 D1 routeustrjp(fshcmdHELP, fshCmdHELPu)
59 D1:B917 11 E8 BF D1
CD 4C AC D1
11 0C C0 D1
CA 37 B6 D1 routeustrjp(fshcmdMAN, fshCmdMANu)
60 D1:B927 C5 - - - push bc
61 D1:B928 C9 - - - ret
62 D1:B929 - - - -
63 D1:B929 - - - - #include "includes/FshCommands/FshCommands.inc"
Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/FshCommands.inc"
1 D1:B929 - - - - #include "includes/FshCommands/EXIT.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/EXIT.asm"
1 D1:B929 45 58 49 54
00 - - - fshcmdEXIT: .db "EXIT", 0
2 D1:B92E FF 00 - - fshcmdEXITo: .dw $00FF
3 D1:B930 45 78 69 74
73 20 46 73
68 00 - - fshcmdEXITm: .db "Exits Fsh", 0
4 D1:B93A 45 58 49 54
00 - - - fshcmdEXITu: .db "EXIT", 0
5 D1:B93F C3 E3 A8 D1 fshcmdEXITf: JP Cleanup
Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/FshCommands.inc"
2 D1:B943 - - - - #include "includes/FshCommands/SET.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/SET.asm"
1 D1:B943 53 45 54 00 fshcmdSET: .db "SET", 0
2 D1:B947 01 00 - - fshcmdSETo: .dw $0001
3 D1:B949 53 65 74 73
20 61 20 76
61 6C 75 65
20 69 6E 20
46 53 48 20
6D 65 6D 6F
72 79 00 - fshcmdSETm: .db "Sets a value in FSH memory", 0
4 D1:B964 53 45 54 20
3C 64 65 73
74 69 6E 61
74 69 6F 6E
20 61 64 64
72 65 73 73
3E 20 3C 76
61 6C 75 65
3E 00 - - fshcmdSETu: .db "SET <destination address> <value>", 0
5 D1:B986 - - - - fshcmdSETf:
6 D1:B986 - - - - fshcmdSETfArg0:
7 D1:B986 21 CD EA D0 ld hl, FshCmdArgFlags
8 D1:B98A CB 4E - - bit 1, (hl)
9 D1:B98C 20 34 - - jr nz, fshcmdSETfArg1
10 D1:B98E CB 46 - - bit 0, (hl)
11 D1:B990 28 0C - - jr z, fshcmdSETfArg0Get
12 D1:B992 21 E5 B3 D1 ld hl, ErrUsageo
13 D1:B996 CD 50 B3 D1 call ErrSet
14 D1:B99A CD 03 B3 D1 call ErrCatch
15 D1:B99E - - - - fshcmdSETfArg0Get:
16 D1:B99E 21 25 BA D1 ld hl, fshcmdSETfDIndex
17 D1:B9A2 CD 14 AB D1 call printprompt
18 D1:B9A6 21 1F BA D1 ld hl, fshcmdSETfInputBuffer
19 D1:B9AA 11 03 00 00 ld de, 3
20 D1:B9AE CD D4 AF D1 call inputnumstr
21 D1:B9B2 CD D6 AC D1 call strtow
22 D1:B9B6 11 A8 EA D0 ld de, FshCmdArg0
23 D1:B9BA EB - - - ex de, hl
24 D1:B9BB 73 - - - ld (hl), e
25 D1:B9BC 23 - - - inc hl
26 D1:B9BD 72 - - - ld (hl), d
27 D1:B9BE CD F0 07 02 call _NewLine
28 D1:B9C2 - - - - fshcmdSETfArg1:
29 D1:B9C2 21 CD EA D0 ld hl, FshCmdArgFlags
30 D1:B9C6 CB 5E - - bit 3, (hl)
31 D1:B9C8 20 34 - - jr nz, fshcmdSETfExe
32 D1:B9CA CB 56 - - bit 2, (hl)
33 D1:B9CC 28 0C - - jr z, fshcmdSETfArg1Get
34 D1:B9CE 21 E5 B3 D1 ld hl, ErrUsageo
35 D1:B9D2 CD 50 B3 D1 call ErrSet
36 D1:B9D6 CD 03 B3 D1 call ErrCatch
37 D1:B9DA - - - - fshcmdSETfArg1Get:
38 D1:B9DA 21 33 BA D1 ld hl, fshcmdSETfDValue
39 D1:B9DE CD 14 AB D1 call printprompt
40 D1:B9E2 21 1F BA D1 ld hl, fshcmdSETfInputBuffer
41 D1:B9E6 11 05 00 00 ld de, 5
42 D1:B9EA CD D4 AF D1 call inputnumstr
43 D1:B9EE CD D6 AC D1 call strtow
44 D1:B9F2 EB - - - ex de, hl
45 D1:B9F3 21 B1 EA D0 ld hl, FshCmdArg1
46 D1:B9F7 73 - - - ld (hl), e
47 D1:B9F8 23 - - - inc hl
48 D1:B9F9 72 - - - ld (hl), d
49 D1:B9FA CD F0 07 02 call _NewLine
50 D1:B9FE - - - - fshcmdSETfExe:
51 D1:B9FE 21 A8 EA D0 ld hl, FshCmdArg0
52 D1:BA02 11 00 00 00 ld de, 0
53 D1:BA06 5E - - - ld e, (hl)
54 D1:BA07 23 - - - inc hl
55 D1:BA08 56 - - - ld d, (hl)
56 D1:BA09 D5 - - - push de
57 D1:BA0A 21 B1 EA D0 ld hl, FshCmdArg1
58 D1:BA0E 5E - - - ld e, (hl)
59 D1:BA0F 23 - - - inc hl
60 D1:BA10 56 - - - ld d, (hl)
61 D1:BA11 EB - - - ex de, hl
62 D1:BA12 D1 - - - pop de
63 D1:BA13 CD 53 B2 D1 call fshvarset
64 D1:BA17 CD 03 B3 D1 call ErrCatch
65 D1:BA1B C3 DB A8 D1 jp Fin
66 D1:BA1F - - - -
67 D1:BA1F 00 00 00 00
00 00 - - fshcmdSETfInputBuffer: .db $00, $00, $00, $00, $00, $00
68 D1:BA25 44 65 73 74
69 6E 61 74
69 6F 6E 3D
20 00 - - fshcmdSETfDIndex: .db "Destination= ", 0
69 D1:BA33 56 61 6C 75
65 3D 20 00 fshcmdSETfDValue: .db "Value= ", 0
Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/FshCommands.inc"
3 D1:BA3B - - - - #include "includes/FshCommands/COPY.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/COPY.asm"
1 D1:BA3B 43 4F 50 59
00 - - - fshcmdCOPY: .db "COPY", 0
2 D1:BA40 02 00 - - fshcmdCOPYo: .dw $0002
3 D1:BA42 43 6F 70 79
73 20 61 20
76 61 6C 75
65 20 69 6E
20 46 53 48
20 6D 65 6D
6F 72 79 20
74 6F 20 61
6E 6F 74 68
65 72 20 61
64 64 65 73
73 00 - - fshcmdCOPYm: .db "Copys a value in FSH memory to another addess", 0
4 D1:BA70 43 4F 50 59
20 3C 73 6F
75 72 63 65
20 61 64 64
72 65 73 73
3E 20 3C 64
65 73 74 69
6E 61 74 69
6F 6E 20 61
64 64 72 65
73 73 3E 00 fshcmdCOPYu: .db "COPY <source address> <destination address>", 0
5 D1:BA9C - - - - fshcmdCOPYf:
6 D1:BA9C - - - - fshcmdCOPYfArg0:
7 D1:BA9C 21 CD EA D0 ld hl, FshCmdArgFlags
8 D1:BAA0 CB 4E - - bit 1, (hl)
9 D1:BAA2 20 31 - - jr nz, fshcmdCOPYfArg1
10 D1:BAA4 CB 46 - - bit 0, (hl)
11 D1:BAA6 28 0C - - jr z, fshcmdCOPYfArg0Get
12 D1:BAA8 21 E5 B3 D1 ld hl, ErrUsageo
13 D1:BAAC CD 50 B3 D1 call ErrSet
14 D1:BAB0 CD 03 B3 D1 call ErrCatch
15 D1:BAB4 - - - - fshcmdCOPYfArg0Get:
16 D1:BAB4 21 33 BB D1 ld hl, fshcmdCOPYfDSource
17 D1:BAB8 CD 14 AB D1 call printprompt
18 D1:BABC 21 2F BB D1 ld hl, fshcmdCOPYfInputBuffer
19 D1:BAC0 11 03 00 00 ld de, 3
20 D1:BAC4 CD D4 AF D1 call inputnumstr
21 D1:BAC8 CD 79 AC D1 call strtob
22 D1:BACC 21 A8 EA D0 ld hl, FshCmdArg0
23 D1:BAD0 77 - - - ld (hl), a
24 D1:BAD1 CD F0 07 02 call _NewLine
25 D1:BAD5 - - - - fshcmdCOPYfArg1:
26 D1:BAD5 21 CD EA D0 ld hl, FshCmdArgFlags
27 D1:BAD9 CB 5E - - bit 3, (hl)
28 D1:BADB 20 31 - - jr nz, fshcmdCOPYfExe
29 D1:BADD CB 56 - - bit 2, (hl)
30 D1:BADF 28 0C - - jr z, fshcmdCOPYfArg1Get
31 D1:BAE1 21 E5 B3 D1 ld hl, ErrUsageo
32 D1:BAE5 CD 50 B3 D1 call ErrSet
33 D1:BAE9 CD 03 B3 D1 call ErrCatch
34 D1:BAED - - - - fshcmdCOPYfArg1Get:
35 D1:BAED 21 33 BB D1 ld hl, fshcmdCOPYfDSource
36 D1:BAF1 CD 14 AB D1 call printprompt
37 D1:BAF5 21 2F BB D1 ld hl, fshcmdCOPYfInputBuffer
38 D1:BAF9 11 03 00 00 ld de, 3
39 D1:BAFD CD D4 AF D1 call inputnumstr
40 D1:BB01 CD 79 AC D1 call strtob
41 D1:BB05 21 B1 EA D0 ld hl, FshCmdArg1
42 D1:BB09 77 - - - ld (hl), a
43 D1:BB0A CD F0 07 02 call _NewLine
44 D1:BB0E - - - - fshcmdCOPYfExe:
45 D1:BB0E 21 A8 EA D0 ld hl, FshCmdArg0
46 D1:BB12 11 00 00 00 ld de, 0
47 D1:BB16 5E - - - ld e, (hl)
48 D1:BB17 EB - - - ex de, hl
49 D1:BB18 E5 - - - push hl
50 D1:BB19 21 B1 EA D0 ld hl, FshCmdArg1
51 D1:BB1D 11 00 00 00 ld de, 0
52 D1:BB21 5E - - - ld e, (hl)
53 D1:BB22 E1 - - - pop hl
54 D1:BB23 CD A6 B2 D1 call fshvarcpy
55 D1:BB27 CD 03 B3 D1 call ErrCatch
56 D1:BB2B C3 DB A8 D1 jp Fin
57 D1:BB2F - - - -
58 D1:BB2F 00 00 00 00 fshcmdCOPYfInputBuffer: .db $00, $00, $00, $00
59 D1:BB33 53 6F 75 72
63 65 3D 20
00 - - - fshcmdCOPYfDSource: .db "Source= ", 0
60 D1:BB3C 44 65 73 74
69 6E 61 74
69 6F 6E 3D
20 00 - - fshcmdCOPYfDDestination: .db "Destination= ", 0
Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/FshCommands.inc"
4 D1:BB4A - - - - #include "includes/FshCommands/MOVE.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/MOVE.asm"
1 D1:BB4A 4D 4F 56 45
00 - - - fshcmdMOVE: .db "MOVE", 0
2 D1:BB4F 03 00 - - fshcmdMOVEo: .dw $0003
3 D1:BB51 4D 6F 76 65
20 61 20 76
61 6C 75 65
20 69 6E 20
46 53 48 20
6D 65 6D 6F
72 79 20 74
6F 20 61 6E
6F 74 68 65
72 20 61 64
64 65 73 73
00 - - - fshcmdMOVEm: .db "Move a value in FSH memory to another addess", 0
4 D1:BB7E 4D 4F 56 45
20 3C 73 6F
75 72 63 65
20 61 64 64
72 65 73 73
3E 20 3C 64
65 73 74 69
6E 61 74 69
6F 6E 20 61
64 64 72 65
73 73 3E 00 fshcmdMOVEu: .db "MOVE <source address> <destination address>", 0
5 D1:BBAA - - - - fshcmdMOVEf:
6 D1:BBAA - - - - fshcmdMOVEfArg0:
7 D1:BBAA 21 CD EA D0 ld hl, FshCmdArgFlags
8 D1:BBAE CB 4E - - bit 1, (hl)
9 D1:BBB0 20 31 - - jr nz, fshcmdMOVEfArg1
10 D1:BBB2 CB 46 - - bit 0, (hl)
11 D1:BBB4 28 0C - - jr z, fshcmdMOVEfArg0Get
12 D1:BBB6 21 E5 B3 D1 ld hl, ErrUsageo
13 D1:BBBA CD 50 B3 D1 call ErrSet
14 D1:BBBE CD 03 B3 D1 call ErrCatch
15 D1:BBC2 - - - - fshcmdMOVEfArg0Get:
16 D1:BBC2 21 4A BC D1 ld hl, fshcmdMOVEfDSource
17 D1:BBC6 CD 14 AB D1 call printprompt
18 D1:BBCA 21 46 BC D1 ld hl, fshcmdMOVEfInputBuffer
19 D1:BBCE 11 03 00 00 ld de, 3
20 D1:BBD2 CD D4 AF D1 call inputnumstr
21 D1:BBD6 CD 79 AC D1 call strtob
22 D1:BBDA 21 A8 EA D0 ld hl, FshCmdArg0
23 D1:BBDE 77 - - - ld (hl), a
24 D1:BBDF CD F0 07 02 call _NewLine
25 D1:BBE3 - - - - fshcmdMOVEfArg1:
26 D1:BBE3 21 CD EA D0 ld hl, FshCmdArgFlags
27 D1:BBE7 CB 5E - - bit 3, (hl)
28 D1:BBE9 20 31 - - jr nz, fshcmdMOVEfExe
29 D1:BBEB CB 56 - - bit 2, (hl)
30 D1:BBED 28 0C - - jr z, fshcmdMOVEfArg1Get
31 D1:BBEF 21 E5 B3 D1 ld hl, ErrUsageo
32 D1:BBF3 CD 50 B3 D1 call ErrSet
33 D1:BBF7 CD 03 B3 D1 call ErrCatch
34 D1:BBFB - - - - fshcmdMOVEfArg1Get:
35 D1:BBFB 21 53 BC D1 ld hl, fshcmdMOVEfDDestination
36 D1:BBFF CD 14 AB D1 call printprompt
37 D1:BC03 21 46 BC D1 ld hl, fshcmdMOVEfInputBuffer
38 D1:BC07 11 03 00 00 ld de, 3
39 D1:BC0B CD D4 AF D1 call inputnumstr
40 D1:BC0F CD 79 AC D1 call strtob
41 D1:BC13 21 B1 EA D0 ld hl, FshCmdArg1
42 D1:BC17 77 - - - ld (hl), a
43 D1:BC18 CD F0 07 02 call _NewLine
44 D1:BC1C - - - - fshcmdMOVEfExe:
45 D1:BC1C 21 A8 EA D0 ld hl, FshCmdArg0
46 D1:BC20 11 00 00 00 ld de, 0
47 D1:BC24 5E - - - ld e, (hl)
48 D1:BC25 EB - - - ex de, hl
49 D1:BC26 E5 - - - push hl
50 D1:BC27 21 B1 EA D0 ld hl, FshCmdArg1
51 D1:BC2B 11 00 00 00 ld de, 0
52 D1:BC2F 5E - - - ld e, (hl)
53 D1:BC30 E1 - - - pop hl
54 D1:BC31 CD A6 B2 D1 call fshvarcpy
55 D1:BC35 EB - - - ex de, hl
56 D1:BC36 21 00 00 00 ld hl, 0
57 D1:BC3A CD 53 B2 D1 call fshvarset
58 D1:BC3E CD 03 B3 D1 call ErrCatch
59 D1:BC42 C3 DB A8 D1 jp Fin
60 D1:BC46 - - - -
61 D1:BC46 00 00 00 00 fshcmdMOVEfInputBuffer: .db $00, $00, $00, $00
62 D1:BC4A 53 6F 75 72
63 65 3D 20
00 - - - fshcmdMOVEfDSource: .db "Source= ", 0
63 D1:BC53 44 65 73 74
69 6E 61 74
69 6F 6E 3D
20 00 - - fshcmdMOVEfDDestination: .db "Destination= ", 0
Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/FshCommands.inc"
5 D1:BC61 - - - - #include "includes/FshCommands/CLS.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/CLS.asm"
1 D1:BC61 43 4C 53 00 fshcmdCLS: .db "CLS", 0
2 D1:BC65 10 00 - - fshcmdCLSo: .dw $0010
3 D1:BC67 43 6C 65 61
72 73 20 74
68 65 20 73
63 72 65 65
6E 00 - - fshcmdCLSm: .db "Clears the screen", 0
4 D1:BC79 43 4C 53 00 fshcmdCLSu: .db "CLS", 0
5 D1:BC7D - - - - fshcmdCLSf:
6 D1:BC7D CD 08 08 02 call _ClrLCDFull
7 D1:BC81 AF - - - xor a
8 D1:BC82 32 95 05 D0 ld (CurRow), a
9 D1:BC86 32 96 05 D0 ld (CurCol), a
10 D1:BC8A C3 DB A8 D1 jp Fin
Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/FshCommands.inc"
6 D1:BC8E - - - - #include "includes/FshCommands/VAR.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/VAR.asm"
1 D1:BC8E 56 41 52 00 fshcmdVAR: .db "VAR", 0
2 D1:BC92 11 00 - - fshcmdVARo: .dw $0011
3 D1:BC94 44 69 73 70
6C 61 79 73
20 61 20 76
61 6C 75 65
20 66 72 6F
6D 20 46 53
48 20 6D 65
6D 6F 72 79
00 - - - fshcmdVARm: .db "Displays a value from FSH memory", 0
4 D1:BCB5 56 41 52 20
3C 73 6F 75
72 63 65 20
61 64 64 72
65 73 73 3E
00 - - - fshcmdVARu: .db "VAR <source address>", 0
5 D1:BCCA - - - - fshcmdVARf:
6 D1:BCCA - - - - fshcmdVARfArg0:
7 D1:BCCA 21 CD EA D0 ld hl, FshCmdArgFlags
8 D1:BCCE CB 4E - - bit 1, (hl)
9 D1:BCD0 20 34 - - jr nz, fshcmdVARfExe
10 D1:BCD2 CB 46 - - bit 0, (hl)
11 D1:BCD4 28 0C - - jr z, fshcmdVARfArg0Get
12 D1:BCD6 21 E5 B3 D1 ld hl, ErrUsageo
13 D1:BCDA CD 50 B3 D1 call ErrSet
14 D1:BCDE CD 03 B3 D1 call ErrCatch
15 D1:BCE2 - - - - fshcmdVARfArg0Get:
16 D1:BCE2 21 29 BD D1 ld hl, fshcmdVARfDIndex
17 D1:BCE6 CD 14 AB D1 call printprompt
18 D1:BCEA 21 25 BD D1 ld hl, fshcmdVARfInputBuffer
19 D1:BCEE 11 03 00 00 ld de, 3
20 D1:BCF2 CD D4 AF D1 call inputnumstr
21 D1:BCF6 CD D6 AC D1 call strtow
22 D1:BCFA 11 A8 EA D0 ld de, FshCmdArg0
23 D1:BCFE EB - - - ex de, hl
24 D1:BCFF 73 - - - ld (hl), e
25 D1:BD00 23 - - - inc hl
26 D1:BD01 72 - - - ld (hl), d
27 D1:BD02 CD F0 07 02 call _NewLine
28 D1:BD06 - - - - fshcmdVARfExe:
29 D1:BD06 21 A8 EA D0 ld hl, FshCmdArg0
30 D1:BD0A 11 00 00 00 ld de, 0
31 D1:BD0E 5E - - - ld e, (hl)
32 D1:BD0F 23 - - - inc hl
33 D1:BD10 56 - - - ld d, (hl)
34 D1:BD11 CD 7B B2 D1 call fshvarget
35 D1:BD15 CD 03 B3 D1 call ErrCatch
36 D1:BD19 CD BC 07 02 call _DispHL_s
37 D1:BD1D CD F0 07 02 call _NewLine
38 D1:BD21 C3 DB A8 D1 jp Fin
39 D1:BD25 - - - -
40 D1:BD25 00 00 00 00 fshcmdVARfInputBuffer: .db $00, $00, $00, $00
41 D1:BD29 49 6E 64 65
78 3D 20 00 fshcmdVARfDIndex: .db "Index= ", 0
Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/FshCommands.inc"
7 D1:BD31 - - - - #include "includes/FshCommands/VARS.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/VARS.asm"
1 D1:BD31 56 41 52 53
00 - - - fshcmdVARS: .db "VARS", 0
2 D1:BD36 12 00 - - fshcmdVARSo: .dw $0012
3 D1:BD38 44 69 73 70
6C 61 79 73
20 61 6C 6C
20 46 73 68
20 56 61 72
73 00 - - fshcmdVARSm: .db "Displays all Fsh Vars", 0
4 D1:BD4E 56 41 52 53
00 - - - fshcmdVARSu: .db "VARS", 0
5 D1:BD53 - - - - fshcmdVARSf:
6 D1:BD53 21 CD EA D0 ld hl, FshCmdArgFlags
7 D1:BD57 CB 46 - - bit 0, (hl)
8 D1:BD59 28 0C - - jr z, fshcmdVARSfExe
9 D1:BD5B 21 E5 B3 D1 ld hl, ErrUsageo
10 D1:BD5F CD 50 B3 D1 call ErrSet
11 D1:BD63 CD 03 B3 D1 call ErrCatch
12 D1:BD67 - - - - fshcmdVARSfExe:
13 D1:BD67 06 00 - - ld b, 0
14 D1:BD69 0E 00 - - ld c, 0
15 D1:BD6B 11 00 00 00 ld de, 0
16 D1:BD6F - - - - fshcmdVARSfLoop:
17 D1:BD6F CD 7B B2 D1 call fshvarget
18 D1:BD73 7C - - - ld a, h
19 D1:BD74 CD B8 07 02 call _PutC
20 D1:BD78 7D - - - ld a, l
21 D1:BD79 CD B8 07 02 call _PutC
22 D1:BD7D 79 - - - ld a, c
23 D1:BD7E 0C - - - inc c
24 D1:BD7F FE 07 - - cp 7
25 D1:BD81 20 0E - - jr nz, fshcmdVARSfLoopU
26 D1:BD83 E5 - - - push hl
27 D1:BD84 C5 - - - push bc
28 D1:BD85 D5 - - - push de
29 D1:BD86 CD F0 07 02 call _NewLine
30 D1:BD8A D1 - - - pop de
31 D1:BD8B C1 - - - pop bc
32 D1:BD8C E1 - - - pop hl
33 D1:BD8D 0E 00 - - ld c, 0
34 D1:BD8F 18 06 - - jr fshcmdVARSfLoopEnd
35 D1:BD91 - - - - fshcmdVARSfLoopU:
36 D1:BD91 3E 5F - - ld a, '_'
37 D1:BD93 CD B8 07 02 call _PutC
38 D1:BD97 - - - - fshcmdVARSfLoopEnd:
39 D1:BD97 04 - - - inc b
40 D1:BD98 13 - - - inc de
41 D1:BD99 78 - - - ld a, b
42 D1:BD9A FE 40 - - cp FshVarsSize / 2
43 D1:BD9C 38 D1 - - jr c, fshcmdVARSfLoop
44 D1:BD9E C3 DB A8 D1 jp Fin
Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/FshCommands.inc"
8 D1:BDA2 - - - - #include "includes/FshCommands/SLEEP.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/SLEEP.asm"
1 D1:BDA2 53 4C 45 45
50 00 - - fshcmdSLEEP: .db "SLEEP", 0
2 D1:BDA8 16 00 - - fshcmdSLEEPo: .dw $0016
3 D1:BDAA 50 75 74 73
20 74 68 65
20 63 61 6C
63 75 6C 61
74 6F 72 20
69 6E 74 6F
20 73 6C 65
65 70 20 6D
6F 64 65 20
28 41 50 44
29 00 - - fshcmdSLEEPm: .db "Puts the calculator into sleep mode (APD)", 0
4 D1:BDD4 53 4C 45 45
50 00 - - fshcmdSLEEPu: .db "SLEEP", 0
5 D1:BDDA - - - - fshcmdSLEEPf:
6 D1:BDDA F3 - - - di
7 D1:BDDB CD 38 11 02 call _EnableAPD
8 D1:BDDF 3E 01 - - ld a,1
9 D1:BDE1 21 90 05 D0 ld hl,apdSubTimer
10 D1:BDE5 77 - - - ld (hl),a
11 D1:BDE6 23 - - - inc hl
12 D1:BDE7 77 - - - ld (hl),a
13 D1:BDE8 FD CB 08 DE set apdRunning,(iy+apdFlags)
14 D1:BDEC FB - - - ei
15 D1:BDED C3 DB A8 D1 jp Fin
Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/FshCommands.inc"
9 D1:BDF1 - - - - #include "includes/FshCommands/INFO.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/INFO.asm"
1 D1:BDF1 49 4E 46 4F
00 - - - fshcmdINFO: .db "INFO", 0
2 D1:BDF6 20 00 - - fshcmdINFOo: .dw $0020
3 D1:BDF8 44 69 73 70
6C 61 79 73
20 53 79 65
74 65 6D 20
49 6E 66 6F
72 6D 61 74
69 6F 6E 20
61 6E 64 20
53 74 61 74
73 00 - - fshcmdINFOm: .db "Displays Syetem Information and Stats", 0
4 D1:BE1E 49 4E 46 4F
00 - - - fshcmdINFOu: .db "INFO", 0
5 D1:BE23 - - - - fshcmdINFOf:
6 D1:BE23 21 CD EA D0 ld hl, FshCmdArgFlags
7 D1:BE27 CB 46 - - bit 0, (hl)
8 D1:BE29 28 0C - - jr z, fshcmdINFOfExe
9 D1:BE2B 21 E5 B3 D1 ld hl, ErrUsageo
10 D1:BE2F CD 50 B3 D1 call ErrSet
11 D1:BE33 CD 03 B3 D1 call ErrCatch
12 D1:BE37 - - - - fshcmdINFOfExe:
13 D1:BE37 CD 08 08 02 call _ClrLCDFull
14 D1:BE3B AF - - - xor a
15 D1:BE3C 32 95 05 D0 ld (CurRow), a
16 D1:BE40 32 96 05 D0 ld (CurCol), a
17 D1:BE44 - - - -
18 D1:BE44 CD 32 B4 D1 call printfshnamelong
19 D1:BE48 CD F0 07 02 call _NewLine
20 D1:BE4C - - - -
21 D1:BE4C 21 06 A9 D1 ld hl, FshBy
22 D1:BE50 CD C0 07 02 call _PutS
23 D1:BE54 CD F0 07 02 call _NewLine
24 D1:BE58 - - - -
25 D1:BE58 21 10 A9 D1 ld hl, FshSite
26 D1:BE5C CD C0 07 02 call _PutS
27 D1:BE60 CD F0 07 02 call _NewLine
28 D1:BE64 - - - -
29 D1:BE64 CD F0 07 02 call _NewLine
30 D1:BE68 21 8C BE D1 ld hl, fshcmdINFOfSPS1
31 D1:BE6C CD C0 07 02 call _PutS
32 D1:BE70 3E 27 - - ld a, $27
33 D1:BE72 CD B8 07 02 call _PutC
34 D1:BE76 21 2B A9 D1 ld hl, PS1
35 D1:BE7A CD C0 07 02 call _PutS
36 D1:BE7E 3E 27 - - ld a, $27
37 D1:BE80 CD B8 07 02 call _PutC
38 D1:BE84 CD F0 07 02 call _NewLine
39 D1:BE88 - - - -
40 D1:BE88 C3 DB A8 D1 jp Fin
41 D1:BE8C - - - -
42 D1:BE8C 50 53 31 CE
CE CE 3A 00 fshcmdINFOfSPS1: .db "PS1", $CE, $CE, $CE, ":", 0
Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/FshCommands.inc"
10 D1:BE94 - - - - #include "includes/FshCommands/HELP.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/HELP.asm"
1 D1:BE94 48 45 4C 50
00 - - - fshcmdHELP: .db "HELP", 0
2 D1:BE99 21 00 - - fshcmdHELPo: .dw $0021
3 D1:BE9B 44 69 73 70
6C 61 79 73
20 61 6C 6C
20 63 6F 6D
6D 61 6E 64
73 00 - - fshcmdHELPm: .db "Displays all commands", 0
4 D1:BEB1 48 45 4C 50
00 - - - fshcmdHELPu: .db "HELP", 0
5 D1:BEB6 - - - - fshcmdHELPf:
6 D1:BEB6 21 CD EA D0 ld hl, FshCmdArgFlags
7 D1:BEBA CB 46 - - bit 0, (hl)
8 D1:BEBC 28 0C - - jr z, fshcmdHELPfExe
9 D1:BEBE 21 E5 B3 D1 ld hl, ErrUsageo
10 D1:BEC2 CD 50 B3 D1 call ErrSet
11 D1:BEC6 CD 03 B3 D1 call ErrCatch
12 D1:BECA - - - - fshcmdHELPfExe:
13 D1:BECA 21 AF BF D1 ld hl, fshcmdHELPfLine1
14 D1:BECE CD C0 07 02 call _PutS
15 D1:BED2 CD F0 07 02 call _NewLine
16 D1:BED6 - - - -
17 D1:BED6 - - - - #macro fshcmdHELPmRow1(cmdXs)
18 D1:BED6 xor a
19 D1:BED6 ld (curCol), a
20 D1:BED6 ld hl, cmdXs
21 D1:BED6 call _PutS
22 D1:BED6 call _NewLine
23 D1:BED6 #endmacro
24 D1:BED6 - - - - #macro fshcmdHELPmRow2(cmdXs, cmdYs)
25 D1:BED6 xor a
26 D1:BED6 ld (curCol), a
27 D1:BED6 ld hl, cmdXs
28 D1:BED6 call _PutS
29 D1:BED6 ld a, 9
30 D1:BED6 ld (curcol), a
31 D1:BED6 ld hl, cmdYs
32 D1:BED6 call _PutS
33 D1:BED6 call _NewLine
34 D1:BED6 #endmacro
35 D1:BED6 - - - - #macro fshcmdHELPmRow3(cmdXs, cmdYs, cmdZs)
36 D1:BED6 xor a
37 D1:BED6 ld (curCol), a
38 D1:BED6 ld hl, cmdXs
39 D1:BED6 call _PutS
40 D1:BED6 ld a, 9
41 D1:BED6 ld (curcol), a
42 D1:BED6 ld hl, cmdYs
43 D1:BED6 call _PutS
44 D1:BED6 ld a, 19
45 D1:BED6 ld (curcol), a
46 D1:BED6 ld hl, cmdZs
47 D1:BED6 call _PutS
48 D1:BED6 call _NewLine
49 D1:BED6 #endmacro
50 D1:BED6 - - - -
51 D1:BED6 AF 32 96 05
D0 21 29 B9
D1 CD C0 07
02 3E 09 32
96 05 D0 21
43 B9 D1 CD
C0 07 02 3E
13 32 96 05
D0 21 3B BA
D1 CD C0 07
02 CD F0 07
02 - - - fshcmdHELPmRow3(fshcmdEXIT, fshcmdSET, fshcmdCOPY)
Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/HELP.asm"
52 D1:BF03 AF 32 96 05
D0 21 4A BB
D1 CD C0 07
02 3E 09 32
96 05 D0 21
61 BC D1 CD
C0 07 02 3E
13 32 96 05
D0 21 8E BC
D1 CD C0 07
02 CD F0 07
02 - - - fshcmdHELPmRow3(fshcmdMOVE, fshcmdCLS, fshcmdVAR)
53 D1:BF30 AF 32 96 05
D0 21 31 BD
D1 CD C0 07
02 3E 09 32
96 05 D0 21
A2 BD D1 CD
C0 07 02 3E
13 32 96 05
D0 21 F1 BD
D1 CD C0 07
02 CD F0 07
02 - - - fshcmdHELPmRow3(fshcmdVARS, fshcmdSLEEP, fshcmdINFO)
54 D1:BF5D AF 32 96 05
D0 21 94 BE
D1 CD C0 07
02 3E 09 32
96 05 D0 21
E8 BF D1 CD
C0 07 02 CD
F0 07 02 - fshcmdHELPmRow2(fshcmdHELP, fshcmdMAN)
55 D1:BF7C AF 32 96 05
D0 21 0B C3
D1 CD C0 07
02 3E 09 32
96 05 D0 21
C1 C6 D1 CD
C0 07 02 CD
F0 07 02 - fshcmdHELPmRow2(cryptocmdENCRYPT, cryptocmdDECRYPT)
56 D1:BF9B - - - - ; Extention Point
57 D1:BF9B - - - -
58 D1:BF9B CD F0 07 02 call _NewLine
59 D1:BF9F 21 C3 BF D1 ld hl, fshcmdHELPfLine2
60 D1:BFA3 CD C0 07 02 call _PutS
61 D1:BFA7 CD F0 07 02 call _NewLine
62 D1:BFAB C3 DB A8 D1 jp Fin
63 D1:BFAF - - - -
64 D1:BFAF 41 76 61 69
6C 61 62 6C
65 20 43 6F
6D 6D 61 6E
64 73 3A 00 fshcmdHELPfLine1: .db "Available Commands:", 0
65 D1:BFC3 54 79 70 65
20 27 4D 41
4E 27 20 61
6E 64 20 63
6F 6D 6D 61
6E 64 20 66
6F 72 20 6D
6F 72 65 20
69 6E 66 6F
00 - - - fshcmdHELPfLine2: .db "Type 'MAN' and command for more info", 0
Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/FshCommands.inc"
11 D1:BFE8 - - - - #include "includes/FshCommands/MAN.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/MAN.asm"
1 D1:BFE8 4D 41 4E 00 fshcmdMAN: .db "MAN", 0
2 D1:BFEC 22 00 - - fshcmdMANo: .dw $0022
3 D1:BFEE 44 69 73 70
6C 61 79 73
20 4D 41 4E
20 74 65 78
74 20 66 6F
72 20 63 6F
6D 6D 61 6E
64 00 - - fshcmdMANm: .db "Displays MAN text for command", 0
4 D1:C00C 4D 41 4E 20
3C 63 6F 6D
6D 61 6E 64
3E 00 - - fshcmdMANu: .db "MAN <command>", 0
5 D1:C01A - - - - fshcmdMANf:
6 D1:C01A - - - - fshcmdMANfCheckArgs:
7 D1:C01A 21 CD EA D0 ld hl, FshCmdArgFlags
8 D1:C01E CB 46 - - bit 0, (hl)
9 D1:C020 28 10 - - jr z, fshcmdMANfArg0Get
10 D1:C022 CB 4E - - bit 1, (hl)
11 D1:C024 28 24 - - jr z, fshcmdMANfExe
12 D1:C026 21 E5 B3 D1 ld hl, ErrUsageo
13 D1:C02A CD 50 B3 D1 call ErrSet
14 D1:C02E CD 03 B3 D1 call ErrCatch
15 D1:C032 - - - - fshcmdMANfArg0Get:
16 D1:C032 21 C7 C0 D1 ld hl, fshcmdMANfPrompt
17 D1:C036 CD 14 AB D1 call printprompt
18 D1:C03A - - - -
19 D1:C03A 21 A8 EA D0 ld hl, FshCmdArg0
20 D1:C03E 11 08 00 00 ld de, FshCmdCmdSize
21 D1:C042 CD 9C AD D1 call inputstr
22 D1:C046 CD F0 07 02 call _NewLine
23 D1:C04A - - - -
24 D1:C04A - - - - fshcmdMANfExe:
25 D1:C04A 21 A8 EA D0 ld hl, FshCmdArg0
26 D1:C04E 11 9F EA D0 ld de, FshCmd
27 D1:C052 CD 5F AC D1 call strcpy
28 D1:C056 - - - -
29 D1:C056 21 B6 C0 D1 ld hl, fshcmdMANfPrefix
30 D1:C05A CD C0 07 02 call _PutS
31 D1:C05E - - - -
32 D1:C05E 21 9F EA D0 ld hl, FshCmd
33 D1:C062 CD C0 07 02 call _PutS
34 D1:C066 CD F0 07 02 call _NewLine
35 D1:C06A CD F0 07 02 call _NewLine
36 D1:C06E - - - -
37 D1:C06E 21 9F EA D0 ld hl, FshCmd
38 D1:C072 CD 0E B6 D1 call manroute
39 D1:C076 11 00 00 00 ld de, $00
40 D1:C07A CD 6D A9 D1 call cpHLDE
41 D1:C07E CA DF A8 D1 jp z, Err
42 D1:C082 - - - -
43 D1:C082 CD C0 07 02 call _PutS
44 D1:C086 CD F0 07 02 call _NewLine
45 D1:C08A CD F0 07 02 call _NewLine
46 D1:C08E - - - -
47 D1:C08E 21 BF C0 D1 ld hl, fshcmdMANfUsage
48 D1:C092 CD C0 07 02 call _PutS
49 D1:C096 - - - -
50 D1:C096 21 9F EA D0 ld hl, FshCmd
51 D1:C09A CD 24 B6 D1 call manrouteu
52 D1:C09E 11 00 00 00 ld de, $00
53 D1:C0A2 CD 6D A9 D1 call cpHLDE
54 D1:C0A6 CA DF A8 D1 jp z, Err
55 D1:C0AA CD C0 07 02 call _PutS
56 D1:C0AE CD F0 07 02 call _NewLine
57 D1:C0B2 - - - -
58 D1:C0B2 C3 DB A8 D1 jp Fin
59 D1:C0B6 - - - -
60 D1:C0B6 4D 41 4E 2D
44 42 DF 20
00 - - - fshcmdMANfPrefix: .db "MAN-DB", $DF, ' ', 0
61 D1:C0BF 55 73 61 67
65 3A 20 00 fshcmdMANfUsage: .db "Usage: ",0
62 D1:C0C7 43 6F 6D 6D
61 6E 64 3D
20 00 - - fshcmdMANfPrompt: .db "Command= ", 0
Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/FshCommands.inc"
Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/FshCommand.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/Command.asm"
48 D1:C0D1 - - - - #include "includes/CryptoCommands/CryptoCommand.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/CryptoCommand.asm"
1 D1:C0D1 - - - - cryptocmddecode:
2 D1:C0D1 E5 D5 11 0B
C3 D1 CD 4C
AC D1 21 13
C3 D1 D1 CC
45 AA D1 E1 decodecmdopt(cryptocmdENCRYPT, cryptocmdENCRYPTo)
Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/CryptoCommand.asm"
3 D1:C0E5 E5 D5 11 C1
C6 D1 CD 4C
AC D1 21 C9
C6 D1 D1 CC
45 AA D1 E1 decodecmdopt(cryptocmdDECRYPT, cryptocmdDECRYPTo)
4 D1:C0F9 C9 - - - ret
5 D1:C0FA - - - -
6 D1:C0FA - - - - cryptocmdroute:
7 D1:C0FA C1 - - - pop bc
8 D1:C0FB 11 13 C3 D1
CD 51 AA D1
CA 83 C3 D1 routeoptjp(cryptocmdENCRYPTo, cryptocmdENCRYPTf)
9 D1:C107 11 C9 C6 D1
CD 51 AA D1
CA 39 C7 D1 routeoptjp(cryptocmdDECRYPTo, cryptocmdDECRYPTf)
10 D1:C113 C5 - - - push bc
11 D1:C114 C9 - - - ret
12 D1:C115 - - - -
13 D1:C115 - - - - cryptocmdmanroute:
14 D1:C115 C1 - - - pop bc
15 D1:C116 E5 11 0B C3
D1 CD 4C AC
D1 21 00 00
00 20 04 21
B1 EA D0 11
0C C4 D1 CD
4C AC D1 E1
11 10 C4 D1
CA 21 B6 D1 subroutestrjp(cryptocmdENCRYPT, cryptocmdROT, cryptocmdROTm)
16 D1:C13A E5 11 C1 C6
D1 CD 4C AC
D1 21 00 00
00 20 04 21
B1 EA D0 11
C2 C7 D1 CD
4C AC D1 E1
11 C6 C7 D1
CA 21 B6 D1 subroutestrjp(cryptocmdDECRYPT, cryptocmdunROT, cryptocmdunROTm)
17 D1:C15E - - - -
18 D1:C15E E5 11 0B C3
D1 CD 4C AC
D1 21 00 00
00 20 04 21
B1 EA D0 11
1A C5 D1 CD
4C AC D1 E1
11 1E C5 D1
CA 21 B6 D1 subroutestrjp(cryptocmdENCRYPT, cryptocmdXOR, cryptocmdXORm)
19 D1:C182 E5 11 C1 C6
D1 CD 4C AC
D1 21 00 00
00 20 04 21
B1 EA D0 11
C9 C8 D1 CD
4C AC D1 E1
11 CD C8 D1
CA 21 B6 D1 subroutestrjp(cryptocmdDECRYPT, cryptocmdunXOR, cryptocmdunXORm)
20 D1:C1A6 - - - -
21 D1:C1A6 E5 11 0B C3
D1 CD 4C AC
D1 21 00 00
00 20 04 21
B1 EA D0 11
19 C6 D1 CD
4C AC D1 E1
11 1E C6 D1
CA 21 B6 D1 subroutestrjp(cryptocmdENCRYPT, cryptocmdHELP, cryptocmdHELPm)
22 D1:C1CA E5 11 C1 C6
D1 CD 4C AC
D1 21 00 00
00 20 04 21
B1 EA D0 11
DE C9 D1 CD
4C AC D1 E1
11 E3 C9 D1
CA 21 B6 D1 subroutestrjp(cryptocmdDECRYPT, cryptocmdunHELP, cryptocmdunHELPm)
23 D1:C1EE - - - -
24 D1:C1EE 11 0B C3 D1
CD 4C AC D1
11 15 C3 D1
CA 21 B6 D1 routestrjp(cryptocmdENCRYPT, cryptocmdENCRYPTm)
25 D1:C1FE 11 C1 C6 D1
CD 4C AC D1
11 CB C6 D1
CA 21 B6 D1 routestrjp(cryptocmdDECRYPT, cryptocmdDECRYPTm)
26 D1:C20E - - - -
27 D1:C20E C5 - - - push bc
28 D1:C20F C9 - - - ret
29 D1:C210 - - - -
30 D1:C210 - - - -
31 D1:C210 - - - - cryptocmdmanrouteu:
32 D1:C210 C1 - - - pop bc
33 D1:C211 E5 11 0B C3
D1 CD 4C AC
D1 21 00 00
00 20 04 21
B1 EA D0 11
0C C4 D1 CD
4C AC D1 E1
11 47 C4 D1
CA 37 B6 D1 subrouteustrjp(cryptocmdENCRYPT, cryptocmdROT, cryptocmdROTu)
34 D1:C235 E5 11 C1 C6
D1 CD 4C AC
D1 21 00 00
00 20 04 21
B1 EA D0 11
C2 C7 D1 CD
4C AC D1 E1
11 FD C7 D1
CA 37 B6 D1 subrouteustrjp(cryptocmdDECRYPT, cryptocmdunROT, cryptocmdunROTu)
35 D1:C259 - - - -
36 D1:C259 E5 11 0B C3
D1 CD 4C AC
D1 21 00 00
00 20 04 21
B1 EA D0 11
1A C5 D1 CD
4C AC D1 E1
11 40 C5 D1
CA 37 B6 D1 subrouteustrjp(cryptocmdENCRYPT, cryptocmdXOR, cryptocmdXORu)
37 D1:C27D E5 11 C1 C6
D1 CD 4C AC
D1 21 00 00
00 20 04 21
B1 EA D0 11
C9 C8 D1 CD
4C AC D1 E1
11 EF C8 D1
CA 37 B6 D1 subrouteustrjp(cryptocmdDECRYPT, cryptocmdunXOR, cryptocmdunXORu)
38 D1:C2A1 - - - -
39 D1:C2A1 E5 11 0B C3
D1 CD 4C AC
D1 21 00 00
00 20 04 21
B1 EA D0 11
19 C6 D1 CD
4C AC D1 E1
11 2F C6 D1
CA 37 B6 D1 subrouteustrjp(cryptocmdENCRYPT, cryptocmdHELP, cryptocmdHELPu)
40 D1:C2C5 E5 11 C1 C6
D1 CD 4C AC
D1 21 00 00
00 20 04 21
B1 EA D0 11
DE C9 D1 CD
4C AC D1 E1
11 F4 C9 D1
CA 37 B6 D1 subrouteustrjp(cryptocmdDECRYPT, cryptocmdunHELP, cryptocmdunHELPu)
41 D1:C2E9 - - - -
42 D1:C2E9 11 0B C3 D1
CD 4C AC D1
11 5E C3 D1
CA 37 B6 D1 routeustrjp(cryptocmdENCRYPT, cryptocmdENCRYPTu)
43 D1:C2F9 11 C1 C6 D1
CD 4C AC D1
11 14 C7 D1
CA 37 B6 D1 routeustrjp(cryptocmdDECRYPT, cryptocmdDECRYPTu)
44 D1:C309 - - - -
45 D1:C309 C5 - - - push bc
46 D1:C30A C9 - - - ret
47 D1:C30B - - - -
48 D1:C30B - - - - #include "includes/CryptoCommands/CryptoCommands.inc"
Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/CryptoCommands.inc"
1 D1:C30B - - - - #include "includes/CryptoCommands/ENCRYPT.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/ENCRYPT.asm"
1 D1:C30B 45 4E 43 52
59 50 54 00 cryptocmdENCRYPT: .db "ENCRYPT", 0
2 D1:C313 01 01 - - cryptocmdENCRYPTo: .dw $0101
3 D1:C315 45 6E 63 72
79 70 74 73
20 61 20 73
74 72 69 6E
67 20 75 73
69 6E 67 20
61 20 63 79
70 68 65 72
2E 20 73 65
65 20 27 45
4E 43 52 59
50 54 20 48
45 4C 50 27
20 66 6F 72
20 69 6E 66
6F 20 6F 6E
20 63 79 70
68 65 72 73
00 - - - cryptocmdENCRYPTm: .db "Encrypts a string using a cypher. see 'ENCRYPT HELP' for info on cyphers", 0
4 D1:C35E 45 4E 43 52
59 50 54 20
3C 43 72 79
70 74 20 43
6F 6D 6D 61
6E 64 3E 20
3C 43 72 79
70 74 20 41
72 67 73 3E
00 - - - cryptocmdENCRYPTu: .db "ENCRYPT <Crypt Command> <Crypt Args>", 0
5 D1:C383 - - - - cryptocmdENCRYPTf:
6 D1:C383 - - - - cryptocmdENCRYPTfArg0:
7 D1:C383 21 CD EA D0 ld hl, FshCmdArgFlags
8 D1:C387 CB 46 - - bit 0, (hl)
9 D1:C389 28 10 - - jr z, cryptocmdENCRYPTfArg0Get
10 D1:C38B CB 4E - - bit 1, (hl)
11 D1:C38D 28 24 - - jr z, cryptocmdENCRYPTfExe
12 D1:C38F 21 E5 B3 D1 ld hl, ErrUsageo
13 D1:C393 CD 50 B3 D1 call ErrSet
14 D1:C397 CD 03 B3 D1 call ErrCatch
15 D1:C39B - - - - cryptocmdENCRYPTfArg0Get:
16 D1:C39B 21 03 C4 D1 ld hl, cryptocmdENCRYPTfSCypher
17 D1:C39F CD 14 AB D1 call printprompt
18 D1:C3A3 21 A8 EA D0 ld hl, FshCmdArg0
19 D1:C3A7 11 2C 00 00 ld de, FshCmdInptSize
20 D1:C3AB CD 9C AD D1 call inputstr
21 D1:C3AF CD F0 07 02 call _NewLine
22 D1:C3B3 - - - - cryptocmdENCRYPTfExe:
23 D1:C3B3 - - - -
24 D1:C3B3 - - - - #macro cryptocmdENCRYPTcmpjp(cmdX, cmdXf)
25 D1:C3B3 ld hl, FshCmdArg0
26 D1:C3B3 ld de, CmdX
27 D1:C3B3 call strcmp
28 D1:C3B3 jp z, cmdXf
29 D1:C3B3 #endmacro
30 D1:C3B3 - - - -
31 D1:C3B3 21 A8 EA D0
11 0C C4 D1
CD 4C AC D1
CA 66 C4 D1 cryptocmdENCRYPTcmpjp(cryptocmdROT, cryptocmdROTf)
Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/ENCRYPT.asm"
32 D1:C3C3 21 A8 EA D0
11 1A C5 D1
CD 4C AC D1
CA 5C C5 D1 cryptocmdENCRYPTcmpjp(cryptocmdXOR, cryptocmdXORf)
33 D1:C3D3 21 A8 EA D0
11 19 C6 D1
CD 4C AC D1
CA 3C C6 D1 cryptocmdENCRYPTcmpjp(cryptocmdHELP, cryptocmdHELPf)
34 D1:C3E3 - - - -
35 D1:C3E3 21 A8 EA D0 ld hl, FshCmdArg0
36 D1:C3E7 11 9F EA D0 ld de, FshCmd
37 D1:C3EB CD 5F AC D1 call strcpy
38 D1:C3EF - - - -
39 D1:C3EF 21 5F B3 D1 ld hl, ErrCmdNotFoundo
40 D1:C3F3 11 CE EA D0 ld de, FshCmdErrCode
41 D1:C3F7 CD 3D AA D1 call bytecpy
42 D1:C3FB CD 50 B3 D1 call ErrSet
43 D1:C3FF C3 DF A8 D1 jp Err
44 D1:C403 - - - -
45 D1:C403 43 79 70 68
65 72 3D 20
00 - - - cryptocmdENCRYPTfSCypher: .db "Cypher= ", 0
Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/CryptoCommands.inc"
2 D1:C40C - - - - #include "includes/CryptoCommands/ROT.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/ROT.asm"
1 D1:C40C 52 4F 54 00 cryptocmdROT: .db "ROT", 0
2 D1:C410 52 4F 54 3A
20 43 79 70
68 65 72 2C
20 72 6F 74
61 74 65 73
20 74 68 65
20 61 6C 70
68 61 62 65
74 20 61 6E
64 20 65 6E
63 6F 64 65
73 20 61 20
73 74 72 69
6E 67 00 - cryptocmdROTm: .db "ROT: Cypher, rotates the alphabet and encodes a string", 0
3 D1:C447 45 4E 43 52
59 50 54 20
52 4F 54 20
3C 73 68 69
66 74 23 3E
20 3C 6D 65
73 73 61 67
65 3E 00 - cryptocmdROTu: .db "ENCRYPT ROT <shift#> <message>", 0
4 D1:C466 - - - - cryptocmdROTf:
5 D1:C466 - - - - cryptocmdROTfArg1:
6 D1:C466 21 CD EA D0 ld hl, FshCmdArgFlags
7 D1:C46A CB 5E - - bit 3, (hl)
8 D1:C46C 20 32 - - jr nz, cryptocmdROTfArg2
9 D1:C46E CB 56 - - bit 2, (hl)
10 D1:C470 28 0C - - jr z, cryptocmdROTfArg1Get
11 D1:C472 21 E5 B3 D1 ld hl, ErrUsageo
12 D1:C476 CD 50 B3 D1 call ErrSet
13 D1:C47A CD 03 B3 D1 call ErrCatch
14 D1:C47E - - - - cryptocmdROTfArg1Get:
15 D1:C47E 21 FF C4 D1 ld hl, cryptocmdROTfDShift
16 D1:C482 CD 14 AB D1 call printprompt
17 D1:C486 21 B1 EA D0 ld hl, FshCmdArg1
18 D1:C48A 11 03 00 00 ld de, 3
19 D1:C48E CD D4 AF D1 call inputnumstr
20 D1:C492 CD D6 AC D1 call strtow
21 D1:C496 11 B1 EA D0 ld de, FshCmdArg1
22 D1:C49A EB - - - ex de, hl
23 D1:C49B 73 - - - ld (hl), e
24 D1:C49C CD F0 07 02 call _NewLine
25 D1:C4A0 - - - - cryptocmdROTfArg2:
26 D1:C4A0 21 BA EA D0 ld hl, FshCmdArg2
27 D1:C4A4 11 D1 EA D0 ld de, FshScratch
28 D1:C4A8 CD 5F AC D1 call strcpy
29 D1:C4AC 21 CD EA D0 ld hl, FshCmdArgFlags
30 D1:C4B0 CB 66 - - bit 4, (hl)
31 D1:C4B2 28 10 - - jr z, cryptocmdROTfArg2Get
32 D1:C4B4 CB 6E - - bit 5, (hl)
33 D1:C4B6 28 24 - - jr z, cryptocmdROTfExe
34 D1:C4B8 21 E5 B3 D1 ld hl, ErrUsageo
35 D1:C4BC CD 50 B3 D1 call ErrSet
36 D1:C4C0 CD 03 B3 D1 call ErrCatch
37 D1:C4C4 - - - - cryptocmdROTfArg2Get:
38 D1:C4C4 21 07 C5 D1 ld hl, cryptocmdROTfDMessage
39 D1:C4C8 CD 14 AB D1 call printprompt
40 D1:C4CC 21 D1 EA D0 ld hl, FshScratch
41 D1:C4D0 11 10 00 00 ld de, FshScratchSize - 4
42 D1:C4D4 CD C0 AE D1 call inputcharstr
43 D1:C4D8 CD F0 07 02 call _NewLine
44 D1:C4DC - - - - cryptocmdROTfExe:
45 D1:C4DC 21 B1 EA D0 ld hl, FshCmdArg1
46 D1:C4E0 7E - - - ld a, (hl)
47 D1:C4E1 21 D1 EA D0 ld hl, FshScratch
48 D1:C4E5 CD 1D B5 D1 call rotletencrypt
49 D1:C4E9 E5 - - - push hl
50 D1:C4EA 21 11 C5 D1 ld hl, cryptocmdROTfDResult
51 D1:C4EE CD C0 07 02 call _PutS
52 D1:C4F2 E1 - - - pop hl
53 D1:C4F3 CD C0 07 02 call _PutS
54 D1:C4F7 CD F0 07 02 call _NewLine
55 D1:C4FB C3 DB A8 D1 jp Fin
56 D1:C4FF - - - -
57 D1:C4FF 53 68 69 66
74 3D 20 00 cryptocmdROTfDShift: .db "Shift= ", 0
58 D1:C507 4D 65 73 73
61 67 65 3D
20 00 - - cryptocmdROTfDMessage: .db "Message= ", 0
59 D1:C511 52 65 73 75
6C 74 3A 20
00 - - - cryptocmdROTfDResult: .db "Result: ", 0
Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/CryptoCommands.inc"
3 D1:C51A - - - - #include "includes/CryptoCommands/XOR.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/XOR.asm"
1 D1:C51A 58 4F 52 00 cryptocmdXOR: .db "XOR", 0
2 D1:C51E 58 4F 52 3A
20 43 79 70
68 65 72 2C
20 61 6E 64
20 65 6E 63
6F 64 65 73
20 61 20 73
74 72 69 6E
67 00 - - cryptocmdXORm: .db "XOR: Cypher, and encodes a string", 0
3 D1:C540 45 4E 43 52
59 50 54 20
58 4F 52 20
3C 6B 65 79
3E 20 3C 6D
65 73 73 61
67 65 3E 00 cryptocmdXORu: .db "ENCRYPT XOR <key> <message>", 0
4 D1:C55C - - - - cryptocmdXORf:
5 D1:C55C - - - - cryptocmdXORfArg1:
6 D1:C55C 21 CD EA D0 ld hl, FshCmdArgFlags
7 D1:C560 CB 56 - - bit 2, (hl)
8 D1:C562 28 10 - - jr z, cryptocmdXORfArg1Get
9 D1:C564 CB 5E - - bit 3, (hl)
10 D1:C566 28 24 - - jr z, cryptocmdXORfArg2
11 D1:C568 21 E5 B3 D1 ld hl, ErrUsageo
12 D1:C56C CD 50 B3 D1 call ErrSet
13 D1:C570 CD 03 B3 D1 call ErrCatch
14 D1:C574 - - - - cryptocmdXORfArg1Get:
15 D1:C574 21 00 C6 D1 ld hl, cryptocmdXORfDKey
16 D1:C578 CD 14 AB D1 call printprompt
17 D1:C57C 21 B1 EA D0 ld hl, FshCmdArg1
18 D1:C580 11 08 00 00 ld de, FshCmdCmdSize
19 D1:C584 CD 9C AD D1 call inputstr
20 D1:C588 CD F0 07 02 call _NewLine
21 D1:C58C - - - - cryptocmdXORfArg2:
22 D1:C58C 21 BA EA D0 ld hl, FshCmdArg2
23 D1:C590 11 D1 EA D0 ld de, FshScratch
24 D1:C594 CD 5F AC D1 call strcpy
25 D1:C598 21 CD EA D0 ld hl, FshCmdArgFlags
26 D1:C59C CB 66 - - bit 4, (hl)
27 D1:C59E 28 10 - - jr z, cryptocmdXORfArg2Get
28 D1:C5A0 CB 6E - - bit 5, (hl)
29 D1:C5A2 28 24 - - jr z, cryptocmdXORfExe
30 D1:C5A4 21 E5 B3 D1 ld hl, ErrUsageo
31 D1:C5A8 CD 50 B3 D1 call ErrSet
32 D1:C5AC CD 03 B3 D1 call ErrCatch
33 D1:C5B0 - - - - cryptocmdXORfArg2Get:
34 D1:C5B0 21 06 C6 D1 ld hl, cryptocmdXORfDMessage
35 D1:C5B4 CD 14 AB D1 call printprompt
36 D1:C5B8 21 D1 EA D0 ld hl, FshScratch
37 D1:C5BC 11 09 00 00 ld de, FshScratchSize - 1 / 2
38 D1:C5C0 CD C0 AE D1 call inputcharstr
39 D1:C5C4 CD F0 07 02 call _NewLine
40 D1:C5C8 - - - - cryptocmdXORfExe:
41 D1:C5C8 21 D1 EA D0 ld hl, FshScratch
42 D1:C5CC 11 B1 EA D0 ld de, FshCmdArg1
43 D1:C5D0 CD AB B5 D1 call xorcrypt
44 D1:C5D4 21 10 C6 D1 ld hl, cryptocmdXORfDResult
45 D1:C5D8 CD C0 07 02 call _PutS
46 D1:C5DC 21 D1 EA D0 ld hl, FshScratch
47 D1:C5E0 - - - - cryptocmdXORfPrint:
48 D1:C5E0 7E - - - ld a, (hl)
49 D1:C5E1 B7 - - - or a, a
50 D1:C5E2 28 14 - - jr z, cryptocmdXORfPrintEnd
51 D1:C5E4 E5 - - - push hl
52 D1:C5E5 CD B5 AB D1 call bytetohexstr
53 D1:C5E9 7E - - - ld a, (hl)
54 D1:C5EA CD B8 07 02 call _PutC
55 D1:C5EE 23 - - - inc hl
56 D1:C5EF 7E - - - ld a, (hl)
57 D1:C5F0 CD B8 07 02 call _PutC
58 D1:C5F4 E1 - - - pop hl
59 D1:C5F5 23 - - - inc hl
60 D1:C5F6 18 E8 - - jr cryptocmdXORfPrint
61 D1:C5F8 - - - - cryptocmdXORfPrintEnd:
62 D1:C5F8 CD F0 07 02 call _NewLine
63 D1:C5FC C3 DB A8 D1 jp Fin
64 D1:C600 - - - -
65 D1:C600 4B 65 79 3D
20 00 - - cryptocmdXORfDKey: .db "Key= ", 0
66 D1:C606 4D 65 73 73
61 67 65 3D
20 00 - - cryptocmdXORfDMessage: .db "Message= ", 0
67 D1:C610 52 65 73 75
6C 74 3A 20
00 - - - cryptocmdXORfDResult: .db "Result: ", 0
Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/CryptoCommands.inc"
4 D1:C619 - - - - #include "includes/CryptoCommands/HELP.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/HELP.asm"
1 D1:C619 48 45 4C 50
00 - - - cryptocmdHELP: .db "HELP", 0
2 D1:C61E 48 65 6C 70
20 66 6F 72
20 63 79 70
68 65 72 73
00 - - - cryptocmdHELPm: .db "Help for cyphers", 0
3 D1:C62F 45 4E 43 52
59 50 54 20
48 45 4C 50
00 - - - cryptocmdHELPu: .db "ENCRYPT HELP", 0
4 D1:C63C - - - - cryptocmdHELPf:
5 D1:C63C 21 CD EA D0 ld hl, FshCmdArgFlags
6 D1:C640 CB 56 - - bit 2, (hl)
7 D1:C642 28 0C - - jr z, cryptocmdHELPfExe
8 D1:C644 21 E5 B3 D1 ld hl, ErrUsageo
9 D1:C648 CD 50 B3 D1 call ErrSet
10 D1:C64C CD 03 B3 D1 call ErrCatch
11 D1:C650 - - - - cryptocmdHELPfExe:
12 D1:C650 21 AE C6 D1 ld hl, cryptocmdHELPfLine1
13 D1:C654 CD C0 07 02 call _PutS
14 D1:C658 CD F0 07 02 call _NewLine
15 D1:C65C - - - -
16 D1:C65C - - - - #macro cryptocmdHELPmRow1(cmdXs)
17 D1:C65C xor a
18 D1:C65C ld (curCol), a
19 D1:C65C ld hl, cmdXs
20 D1:C65C call _PutS
21 D1:C65C call _NewLine
22 D1:C65C #endmacro
23 D1:C65C - - - - #macro cryptocmdHELPmRowU(cmdXs, cmdXu)
24 D1:C65C xor a
25 D1:C65C ld (curCol), a
26 D1:C65C ld hl, cmdXs
27 D1:C65C call _PutS
28 D1:C65C ld a, ':'
29 D1:C65C call _PutC
30 D1:C65C ld a, ' '
31 D1:C65C call _PutC
32 D1:C65C ld hl, cmdXu
33 D1:C65C call _PutS
34 D1:C65C call _NewLine
35 D1:C65C #endmacro
36 D1:C65C - - - - #macro cryptocmdHELPmRow2(cmdXs, cmdYs)
37 D1:C65C xor a
38 D1:C65C ld (curCol), a
39 D1:C65C ld hl, cmdXs
40 D1:C65C call _PutS
41 D1:C65C ld a, 9
42 D1:C65C ld (curcol), a
43 D1:C65C ld hl, cmdYs
44 D1:C65C call _PutS
45 D1:C65C call _NewLine
46 D1:C65C #endmacro
47 D1:C65C - - - - #macro cryptocmdHELPmRow3(cmdXs, cmdYs, cmdZs)
48 D1:C65C xor a
49 D1:C65C ld (curCol), a
50 D1:C65C ld hl, cmdXs
51 D1:C65C call _PutS
52 D1:C65C ld a, 9
53 D1:C65C ld (curcol), a
54 D1:C65C ld hl, cmdYs
55 D1:C65C call _PutS
56 D1:C65C ld a, 19
57 D1:C65C ld (curcol), a
58 D1:C65C ld hl, cmdZs
59 D1:C65C call _PutS
60 D1:C65C call _NewLine
61 D1:C65C #endmacro
62 D1:C65C - - - -
63 D1:C65C AF 32 96 05
D0 21 0C C4
D1 CD C0 07
02 3E 3A CD
B8 07 02 3E
20 CD B8 07
02 21 47 C4
D1 CD C0 07
02 CD F0 07
02 - - - cryptocmdHELPmRowU(cryptocmdROT, cryptocmdROTu)
Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/HELP.asm"
64 D1:C681 AF 32 96 05
D0 21 1A C5
D1 CD C0 07
02 3E 3A CD
B8 07 02 3E
20 CD B8 07
02 21 40 C5
D1 CD C0 07
02 CD F0 07
02 - - - cryptocmdHELPmRowU(cryptocmdXOR, cryptocmdXORu)
65 D1:C6A6 - - - -
66 D1:C6A6 CD F0 07 02 call _NewLine
67 D1:C6AA C3 DB A8 D1 jp Fin
68 D1:C6AE - - - -
69 D1:C6AE 41 76 61 69
6C 61 62 6C
65 20 43 72
79 70 74 6F
73 3A 00 - cryptocmdHELPfLine1: .db "Available Cryptos:", 0
Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/CryptoCommands.inc"
5 D1:C6C1 - - - -
6 D1:C6C1 - - - - #include "includes/CryptoCommands/DECRYPT.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/DECRYPT.asm"
1 D1:C6C1 44 45 43 52
59 50 54 00 cryptocmdDECRYPT: .db "DECRYPT", 0
2 D1:C6C9 02 01 - - cryptocmdDECRYPTo: .dw $0102
3 D1:C6CB 44 65 63 72
79 70 74 73
20 61 20 73
74 72 69 6E
67 20 75 73
69 6E 67 20
61 20 63 79
70 68 65 72
2E 20 73 65
65 20 27 44
45 43 52 59
50 54 20 48
45 4C 50 27
20 66 6F 72
20 69 6E 66
6F 20 6F 6E
20 63 79 70
68 65 72 73
00 - - - cryptocmdDECRYPTm: .db "Decrypts a string using a cypher. see 'DECRYPT HELP' for info on cyphers", 0
4 D1:C714 44 45 43 52
59 50 54 20
3C 43 72 79
70 74 20 43
6F 6D 6D 61
6E 64 3E 20
3C 43 72 79
70 74 20 41
72 67 73 3E
00 - - - cryptocmdDECRYPTu: .db "DECRYPT <Crypt Command> <Crypt Args>", 0
5 D1:C739 - - - - cryptocmdDECRYPTf:
6 D1:C739 - - - - cryptocmdDECRYPTfArg0:
7 D1:C739 21 CD EA D0 ld hl, FshCmdArgFlags
8 D1:C73D CB 46 - - bit 0, (hl)
9 D1:C73F 28 10 - - jr z, cryptocmdDECRYPTfArg0Get
10 D1:C741 CB 4E - - bit 1, (hl)
11 D1:C743 28 24 - - jr z, cryptocmdDECRYPTfExe
12 D1:C745 21 E5 B3 D1 ld hl, ErrUsageo
13 D1:C749 CD 50 B3 D1 call ErrSet
14 D1:C74D CD 03 B3 D1 call ErrCatch
15 D1:C751 - - - - cryptocmdDECRYPTfArg0Get:
16 D1:C751 21 B9 C7 D1 ld hl, cryptocmdDECRYPTfSCypher
17 D1:C755 CD 14 AB D1 call printprompt
18 D1:C759 21 A8 EA D0 ld hl, FshCmdArg0
19 D1:C75D 11 2C 00 00 ld de, FshCmdInptSize
20 D1:C761 CD 9C AD D1 call inputstr
21 D1:C765 CD F0 07 02 call _NewLine
22 D1:C769 - - - - cryptocmdDECRYPTfExe:
23 D1:C769 - - - -
24 D1:C769 - - - - #macro cryptocmdDECRYPTcmpjp(cmdX, cmdXf)
25 D1:C769 ld hl, FshCmdArg0
26 D1:C769 ld de, CmdX
27 D1:C769 call strcmp
28 D1:C769 jp z, cmdXf
29 D1:C769 #endmacro
30 D1:C769 - - - -
31 D1:C769 21 A8 EA D0
11 C2 C7 D1
CD 4C AC D1
CA 12 C8 D1 cryptocmdDECRYPTcmpjp(cryptocmdunROT, cryptocmdunROTf)
Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/DECRYPT.asm"
32 D1:C779 21 A8 EA D0
11 C9 C8 D1
CD 4C AC D1
CA 01 C9 D1 cryptocmdDECRYPTcmpjp(cryptocmdunXOR, cryptocmdunXORf)
33 D1:C789 21 A8 EA D0
11 DE C9 D1
CD 4C AC D1
CA 01 CA D1 cryptocmdDECRYPTcmpjp(cryptocmdunHELP, cryptocmdunHELPf)
34 D1:C799 - - - -
35 D1:C799 21 A8 EA D0 ld hl, FshCmdArg0
36 D1:C79D 11 9F EA D0 ld de, FshCmd
37 D1:C7A1 CD 5F AC D1 call strcpy
38 D1:C7A5 - - - -
39 D1:C7A5 21 5F B3 D1 ld hl, ErrCmdNotFoundo
40 D1:C7A9 11 CE EA D0 ld de, FshCmdErrCode
41 D1:C7AD CD 3D AA D1 call bytecpy
42 D1:C7B1 CD 50 B3 D1 call ErrSet
43 D1:C7B5 C3 DF A8 D1 jp Err
44 D1:C7B9 - - - -
45 D1:C7B9 43 79 70 68
65 72 3D 20
00 - - - cryptocmdDECRYPTfSCypher: .db "Cypher= ", 0
Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/CryptoCommands.inc"
7 D1:C7C2 - - - - #include "includes/CryptoCommands/unROT.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/unROT.asm"
1 D1:C7C2 52 4F 54 00 cryptocmdunROT: .db "ROT", 0
2 D1:C7C6 52 4F 54 3A
20 43 79 70
68 65 72 2C
20 72 6F 74
61 74 65 73
20 74 68 65
20 61 6C 70
68 61 62 65
74 20 61 6E
64 20 44 65
63 6F 64 65
73 20 61 20
73 74 72 69
6E 67 00 - cryptocmdunROTm: .db "ROT: Cypher, rotates the alphabet and Decodes a string", 0
3 D1:C7FD 44 45 43 52
59 50 54 20
52 4F 54 20
3C 73 68 69
66 74 23 3E
00 - - - cryptocmdunROTu: .db "DECRYPT ROT <shift#>", 0
4 D1:C812 - - - - cryptocmdunROTf:
5 D1:C812 - - - - cryptocmdunROTfArg1:
6 D1:C812 21 CD EA D0 ld hl, FshCmdArgFlags
7 D1:C816 CB 5E - - bit 3, (hl)
8 D1:C818 20 32 - - jr nz, cryptocmdunROTfArg2
9 D1:C81A CB 56 - - bit 2, (hl)
10 D1:C81C 28 0C - - jr z, cryptocmdunROTfArg1Get
11 D1:C81E 21 E5 B3 D1 ld hl, ErrUsageo
12 D1:C822 CD 50 B3 D1 call ErrSet
13 D1:C826 CD 03 B3 D1 call ErrCatch
14 D1:C82A - - - - cryptocmdunROTfArg1Get:
15 D1:C82A 21 AB C8 D1 ld hl, cryptocmdunROTfDShift
16 D1:C82E CD 14 AB D1 call printprompt
17 D1:C832 21 B1 EA D0 ld hl, FshCmdArg1
18 D1:C836 11 03 00 00 ld de, 3
19 D1:C83A CD D4 AF D1 call inputnumstr
20 D1:C83E CD D6 AC D1 call strtow
21 D1:C842 11 B1 EA D0 ld de, FshCmdArg1
22 D1:C846 EB - - - ex de, hl
23 D1:C847 73 - - - ld (hl), e
24 D1:C848 CD F0 07 02 call _NewLine
25 D1:C84C - - - - cryptocmdunROTfArg2:
26 D1:C84C 21 BA EA D0 ld hl, FshCmdArg2
27 D1:C850 11 D1 EA D0 ld de, FshScratch
28 D1:C854 CD 5F AC D1 call strcpy
29 D1:C858 21 CD EA D0 ld hl, FshCmdArgFlags
30 D1:C85C CB 66 - - bit 4, (hl)
31 D1:C85E 28 10 - - jr z, cryptocmdunROTfArg2Get
32 D1:C860 CB 6E - - bit 5, (hl)
33 D1:C862 28 24 - - jr z, cryptocmdunROTfExe
34 D1:C864 21 E5 B3 D1 ld hl, ErrUsageo
35 D1:C868 CD 50 B3 D1 call ErrSet
36 D1:C86C CD 03 B3 D1 call ErrCatch
37 D1:C870 - - - - cryptocmdunROTfArg2Get:
38 D1:C870 21 B3 C8 D1 ld hl, cryptocmdunROTfDMessage
39 D1:C874 CD 14 AB D1 call printprompt
40 D1:C878 21 D1 EA D0 ld hl, FshScratch
41 D1:C87C 11 10 00 00 ld de, FshScratchSize - 4
42 D1:C880 CD C0 AE D1 call inputcharstr
43 D1:C884 CD F0 07 02 call _NewLine
44 D1:C888 - - - - cryptocmdunROTfExe:
45 D1:C888 21 B1 EA D0 ld hl, FshCmdArg1
46 D1:C88C 7E - - - ld a, (hl)
47 D1:C88D 21 D1 EA D0 ld hl, FshScratch
48 D1:C891 CD 42 B5 D1 call rotletdecrypt
49 D1:C895 E5 - - - push hl
50 D1:C896 21 C0 C8 D1 ld hl, cryptocmdunROTfDResult
51 D1:C89A CD C0 07 02 call _PutS
52 D1:C89E E1 - - - pop hl
53 D1:C89F CD C0 07 02 call _PutS
54 D1:C8A3 CD F0 07 02 call _NewLine
55 D1:C8A7 C3 DB A8 D1 jp Fin
56 D1:C8AB - - - -
57 D1:C8AB 53 68 69 66
74 3D 20 00 cryptocmdunROTfDShift: .db "Shift= ", 0
58 D1:C8B3 43 79 70 68
65 72 54 65
78 74 3D 20
00 - - - cryptocmdunROTfDMessage: .db "CypherText= ", 0
59 D1:C8C0 52 65 73 75
6C 74 3A 20
00 - - - cryptocmdunROTfDResult: .db "Result: ", 0
Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/CryptoCommands.inc"
8 D1:C8C9 - - - - #include "includes/CryptoCommands/unXOR.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/unXOR.asm"
1 D1:C8C9 58 4F 52 00 cryptocmdunXOR: .db "XOR", 0
2 D1:C8CD 58 4F 52 3A
20 43 79 70
68 65 72 2C
20 61 6E 64
20 64 65 63
6F 64 65 73
20 61 20 73
74 72 69 6E
67 00 - - cryptocmdunXORm: .db "XOR: Cypher, and decodes a string", 0
3 D1:C8EF 44 45 43 52
59 50 54 20
58 4F 52 20
3C 6B 65 79
3E 00 - - cryptocmdunXORu: .db "DECRYPT XOR <key>", 0
4 D1:C901 - - - - cryptocmdunXORf:
5 D1:C901 - - - - cryptocmdunXORfArg1:
6 D1:C901 21 CD EA D0 ld hl, FshCmdArgFlags
7 D1:C905 CB 56 - - bit 2, (hl)
8 D1:C907 28 10 - - jr z, cryptocmdunXORfArg1Get
9 D1:C909 CB 5E - - bit 3, (hl)
10 D1:C90B 28 24 - - jr z, cryptocmdunXORfArg2
11 D1:C90D 21 E5 B3 D1 ld hl, ErrUsageo
12 D1:C911 CD 50 B3 D1 call ErrSet
13 D1:C915 CD 03 B3 D1 call ErrCatch
14 D1:C919 - - - - cryptocmdunXORfArg1Get:
15 D1:C919 21 AE C9 D1 ld hl, cryptocmdunXORfDKey
16 D1:C91D CD 14 AB D1 call printprompt
17 D1:C921 21 B1 EA D0 ld hl, FshCmdArg1
18 D1:C925 11 08 00 00 ld de, FshCmdCmdSize
19 D1:C929 CD 9C AD D1 call inputstr
20 D1:C92D CD F0 07 02 call _NewLine
21 D1:C931 - - - - cryptocmdunXORfArg2:
22 D1:C931 21 BA EA D0 ld hl, FshCmdArg2
23 D1:C935 11 D1 EA D0 ld de, FshScratch
24 D1:C939 CD 5F AC D1 call strcpy
25 D1:C93D 21 CD EA D0 ld hl, FshCmdArgFlags
26 D1:C941 CB 66 - - bit 4, (hl)
27 D1:C943 20 45 - - jr nz, cryptocmdunXORfExe
28 D1:C945 - - - - cryptocmdunXORfArg2Get:
29 D1:C945 21 CE C9 D1 ld hl, cryptocmdunXORfStringPBuffer
30 D1:C949 06 0F - - ld b, $0F
31 D1:C94B 3E 00 - - ld a, $00
32 D1:C94D CD 5E AA D1 call memset
33 D1:C951 21 B4 C9 D1 ld hl, cryptocmdunXORfDMessage
34 D1:C955 CD 14 AB D1 call printprompt
35 D1:C959 21 D1 EA D0 ld hl, FshScratch
36 D1:C95D 11 10 00 00 ld de, FshScratchSize - 4
37 D1:C961 CD 9C AD D1 call inputstr
38 D1:C965 01 CE C9 D1 ld bc, cryptocmdunXORfStringPBuffer
39 D1:C969 - - - - cryptocmdunXORfArg2GetLoop:
40 D1:C969 7E - - - ld a, (hl)
41 D1:C96A B7 - - - or a, a
42 D1:C96B 28 19 - - jr z, cryptocmdunXORfArg2GetLoopEnd
43 D1:C96D 32 CA C9 D1 ld (cryptocmdunXORfStringBuffer), a
44 D1:C971 23 - - - inc hl
45 D1:C972 7E - - - ld a, (hl)
46 D1:C973 32 CB C9 D1 ld (cryptocmdunXORfStringBuffer + 1), a
47 D1:C977 E5 - - - push hl
48 D1:C978 21 CA C9 D1 ld hl, cryptocmdunXORfStringBuffer
49 D1:C97C CD 0F AC D1 call hexToA
50 D1:C980 E1 - - - pop hl
51 D1:C981 02 - - - ld (bc), a
52 D1:C982 23 - - - inc hl
53 D1:C983 03 - - - inc bc
54 D1:C984 18 E3 - - jr cryptocmdunXORfArg2GetLoop
55 D1:C986 - - - - cryptocmdunXORfArg2GetLoopEnd:
56 D1:C986 CD F0 07 02 call _NewLine
57 D1:C98A - - - - cryptocmdunXORfExe:
58 D1:C98A 21 CE C9 D1 ld hl, cryptocmdunXORfStringPBuffer
59 D1:C98E 11 B1 EA D0 ld de, FshCmdArg1
60 D1:C992 CD AB B5 D1 call xorcrypt
61 D1:C996 21 C1 C9 D1 ld hl, cryptocmdunXORfDResult
62 D1:C99A CD C0 07 02 call _PutS
63 D1:C99E 21 CE C9 D1 ld hl, cryptocmdunXORfStringPBuffer
64 D1:C9A2 CD C0 07 02 call _PutS
65 D1:C9A6 CD F0 07 02 call _NewLine
66 D1:C9AA C3 DB A8 D1 jp Fin
67 D1:C9AE - - - -
68 D1:C9AE 4B 65 79 3D
20 00 - - cryptocmdunXORfDKey: .db "Key= ", 0
69 D1:C9B4 43 79 70 68
65 72 54 65
78 74 3D 20
00 - - - cryptocmdunXORfDMessage: .db "CypherText= ", 0
70 D1:C9C1 52 65 73 75
6C 74 3A 20
00 - - - cryptocmdunXORfDResult: .db "Result: ", 0
71 D1:C9CA 00 00 00 00 cryptocmdunXORfStringBuffer: .db $00, $00, $00, $00
72 D1:C9CE 00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00 cryptocmdunXORfStringPBuffer: .db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/CryptoCommands.inc"
9 D1:C9DE - - - - #include "includes/CryptoCommands/unHELP.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/unHELP.asm"
1 D1:C9DE 48 45 4C 50
00 - - - cryptocmdunHELP: .db "HELP", 0
2 D1:C9E3 48 65 6C 70
20 66 6F 72
20 63 79 70
68 65 72 73
00 - - - cryptocmdunHELPm: .db "Help for cyphers", 0
3 D1:C9F4 44 45 43 52
59 50 54 20
48 45 4C 50
00 - - - cryptocmdunHELPu: .db "DECRYPT HELP", 0
4 D1:CA01 - - - - cryptocmdunHELPf:
5 D1:CA01 21 CD EA D0 ld hl, FshCmdArgFlags
6 D1:CA05 CB 56 - - bit 2, (hl)
7 D1:CA07 28 0C - - jr z, cryptocmdunHELPfExe
8 D1:CA09 21 E5 B3 D1 ld hl, ErrUsageo
9 D1:CA0D CD 50 B3 D1 call ErrSet
10 D1:CA11 CD 03 B3 D1 call ErrCatch
11 D1:CA15 - - - - cryptocmdunHELPfExe:
12 D1:CA15 21 73 CA D1 ld hl, cryptocmdunHELPfLine1
13 D1:CA19 CD C0 07 02 call _PutS
14 D1:CA1D CD F0 07 02 call _NewLine
15 D1:CA21 - - - -
16 D1:CA21 - - - - #macro cryptocmdunHELPmRow1(cmdXs)
17 D1:CA21 xor a
18 D1:CA21 ld (curCol), a
19 D1:CA21 ld hl, cmdXs
20 D1:CA21 call _PutS
21 D1:CA21 call _NewLine
22 D1:CA21 #endmacro
23 D1:CA21 - - - - #macro cryptocmdunHELPmRowU(cmdXs, cmdXu)
24 D1:CA21 xor a
25 D1:CA21 ld (curCol), a
26 D1:CA21 ld hl, cmdXs
27 D1:CA21 call _PutS
28 D1:CA21 ld a, ':'
29 D1:CA21 call _PutC
30 D1:CA21 ld a, ' '
31 D1:CA21 call _PutC
32 D1:CA21 ld hl, cmdXu
33 D1:CA21 call _PutS
34 D1:CA21 call _NewLine
35 D1:CA21 #endmacro
36 D1:CA21 - - - - #macro cryptocmdunHELPmRow2(cmdXs, cmdYs)
37 D1:CA21 xor a
38 D1:CA21 ld (curCol), a
39 D1:CA21 ld hl, cmdXs
40 D1:CA21 call _PutS
41 D1:CA21 ld a, 9
42 D1:CA21 ld (curcol), a
43 D1:CA21 ld hl, cmdYs
44 D1:CA21 call _PutS
45 D1:CA21 call _NewLine
46 D1:CA21 #endmacro
47 D1:CA21 - - - - #macro cryptocmdunHELPmRow3(cmdXs, cmdYs, cmdZs)
48 D1:CA21 xor a
49 D1:CA21 ld (curCol), a
50 D1:CA21 ld hl, cmdXs
51 D1:CA21 call _PutS
52 D1:CA21 ld a, 9
53 D1:CA21 ld (curcol), a
54 D1:CA21 ld hl, cmdYs
55 D1:CA21 call _PutS
56 D1:CA21 ld a, 19
57 D1:CA21 ld (curcol), a
58 D1:CA21 ld hl, cmdZs
59 D1:CA21 call _PutS
60 D1:CA21 call _NewLine
61 D1:CA21 #endmacro
62 D1:CA21 - - - -
63 D1:CA21 AF 32 96 05
D0 21 C2 C7
D1 CD C0 07
02 3E 3A CD
B8 07 02 3E
20 CD B8 07
02 21 FD C7
D1 CD C0 07
02 CD F0 07
02 - - - cryptocmdunHELPmRowU(cryptocmdunROT, cryptocmdunROTu)
Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/unHELP.asm"
64 D1:CA46 AF 32 96 05
D0 21 C9 C8
D1 CD C0 07
02 3E 3A CD
B8 07 02 3E
20 CD B8 07
02 21 EF C8
D1 CD C0 07
02 CD F0 07
02 - - - cryptocmdunHELPmRowU(cryptocmdunXOR, cryptocmdunXORu)
65 D1:CA6B - - - -
66 D1:CA6B CD F0 07 02 call _NewLine
67 D1:CA6F C3 DB A8 D1 jp Fin
68 D1:CA73 - - - -
69 D1:CA73 41 76 61 69
6C 61 62 6C
65 20 43 72
79 70 74 6F
73 3A 00 - cryptocmdunHELPfLine1: .db "Available Cryptos:", 0
Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/CryptoCommands.inc"
Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/CryptoCommand.asm"
Listing for file "/home/pi/Documents/asm/FSH/includes/Command.asm"
Listing for file "FSHa.asm"
77 D1:CA86 - - - -
78 D1:CA86 - - - - .end