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" 4 00:0000 - - - - #include "includes/macros/command.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/macros/command.asm" 1 00:0000 - - - - ;;decodecmdopt 2 00:0000 - - - - ;;compares cmdXs to command input and conditionally sets opt to optcode 3 00:0000 - - - - ;;Inputs: 4 00:0000 - - - - ;; HL: cmd string input 5 00:0000 - - - - ;; DE: op code mem location 6 00:0000 - - - - #macro decodecmdopt(cmdXs, cmdXo) 7 00:0000 push hl 8 00:0000 push de 9 00:0000 ld de, cmdXs 10 00:0000 call strcmp 11 00:0000 ld hl, cmdXo 12 00:0000 pop de 13 00:0000 call z, bytecpy 14 00:0000 pop hl 15 00:0000 #endmacro 16 00:0000 - - - - 17 00:0000 - - - - #macro routeoptjp(cmdXo, cmdXf) 18 00:0000 ld de, cmdXo 19 00:0000 call bytecmp 20 00:0000 jp z, cmdXf 21 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 99 B4 D1 CALL drawstatusbar 17 D1:A899 - - - - 18 D1:A899 CD CE B2 D1 CALL fshvarreset 19 D1:A89D - - - - 20 D1:A89D CD 74 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 BF B0 D1 CALL commandfill 26 D1:A8A7 - - - - 27 D1:A8A7 21 2B A9 D1 LD HL, PS1 28 D1:A8AB CD FB AA 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 83 AD D1 CALL inputstr 33 D1:A8BB - - - - 34 D1:A8BB 21 9F EA D0 LD HL, FshCmd 35 D1:A8BF CD DA 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 CC EA D0 LD DE, FshCmdOP 42 D1:A8CF CD 1F B6 D1 CALL commanddecode 43 D1:A8D3 - - - - 44 D1:A8D3 - - - - Route: 45 D1:A8D3 21 CC EA D0 LD HL, FshCmdOP 46 D1:A8D7 C3 28 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 F9 B2 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 30 00 - - FshVPatch: .db "0", 0 10 D1:A93B 34 39 30 00 FshVBuild: .db "490", 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/Mem.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/Mem.asm" 1 D1:AA45 - - - - ;;memset 2 D1:AA45 - - - - ;;Fills B amount of bytes from hl with a 3 D1:AA45 - - - - ;;Inputs: 4 D1:AA45 - - - - ;; HL: start 5 D1:AA45 - - - - ;; B: how many bytes 6 D1:AA45 - - - - ;; A: Byte 7 D1:AA45 - - - - memset: 8 D1:AA45 E5 - - - push hl 9 D1:AA46 C5 - - - push bc 10 D1:AA47 - - - - memsetLoop: 11 D1:AA47 77 - - - ld (hl), a 12 D1:AA48 23 - - - inc hl 13 D1:AA49 10 FC - - djnz memsetLoop 14 D1:AA4B C1 - - - pop bc 15 D1:AA4C E1 - - - pop hl 16 D1:AA4D C9 - - - ret Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/std.inc" 5 D1:AA4E - - - - #include "includes/lib/std/Char.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/Char.asm" 1 D1:AA4E - - - - #include "includes/tables/CSC.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/tables/CSC.asm" 1 D1:AA4E - - - - charMapCSC: 2 D1:AA4E 22 57 52 4D 48 FF FF - .DB "\"WRMH", $FF, $FF 3 D1:AA55 3F 5B 56 51 4C 47 FF FF .DB Lquestion, Ltheta, "VQLG", $FF, $FF 4 D1:AA5D 3A 5A 55 50 4B 46 43 FF .DB ":ZUPKFC", $FF 5 D1:AA65 20 59 54 4F 4A 45 42 FF .DB " YTOJEB", $FF 6 D1:AA6D FF 58 53 4E 49 44 41 - .DB $FF, "XSNIDA" 7 D1:AA74 - - - - 8 D1:AA74 - - - - numsymMapCSC 9 D1:AA74 2B 2D 2A 2F 5E FF FF - .DB "+-*/^", $FF, $FF 10 D1:AA7B 5F 33 36 39 29 C1 5D FF .DB "_369)", $C1, "]", $FF 11 D1:AA83 2E 32 35 38 28 7B 7D 3B .DB ".258({};" 12 D1:AA8B 30 31 34 37 2C 20 3C 3E 7C FF - - .DB "0147, <>|", $FF 13 D1:AA95 05 21 40 23 25 26 - - .DB $05, "!@#%&" 14 D1:AA9B - - - - 15 D1:AA9B - - - - numMapCSC 16 D1:AA9B FF FF FF FF FF FF FF - .DB $FF, $FF, $FF, $FF, $FF, $FF, $FF 17 D1:AAA2 FF 33 36 39 FF FF FF FF .DB $FF, "369", $FF, $FF, $FF, $FF 18 D1:AAAA FF 32 35 38 FF FF FF FF .DB $FF, "258", $FF, $FF, $FF, $FF 19 D1:AAB2 30 31 34 37 FF FF FF FF FF FF - - .DB "0147", $FF, $FF, $FF, $FF, $FF, $FF 20 D1:AABC 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:AAC2 - - - - ;;chartoascii 3 D1:AAC2 - - - - ;;Converts a char to "ascii" 4 D1:AAC2 - - - - ;;Inputs: 5 D1:AAC2 - - - - ;; A: char code (csc) 6 D1:AAC2 - - - - ;;Outputs: 7 D1:AAC2 - - - - ;; A: ascii char 8 D1:AAC2 - - - - chartoascii: 9 D1:AAC2 E5 - - - push hl 10 D1:AAC3 21 00 00 00 ld hl, 0 11 D1:AAC7 26 00 - - ld h, 0 12 D1:AAC9 6F - - - ld l, a 13 D1:AACA 11 4E AA D1 ld de, charMapCSC 14 D1:AACE 19 - - - add hl, de 15 D1:AACF 7E - - - ld a, (hl) 16 D1:AAD0 E1 - - - pop hl 17 D1:AAD1 C9 - - - ret 18 D1:AAD2 - - - - 19 D1:AAD2 - - - - ;;Charnumtoascii 20 D1:AAD2 - - - - ;;Converts a char to "ascii" 21 D1:AAD2 - - - - ;;Inputs: 22 D1:AAD2 - - - - ;; A: char code (csc) 23 D1:AAD2 - - - - ;;Outputs: 24 D1:AAD2 - - - - ;; A: ascii char 25 D1:AAD2 - - - - charnumtoascii: 26 D1:AAD2 E5 - - - push hl 27 D1:AAD3 21 00 00 00 ld hl, 0 28 D1:AAD7 26 00 - - ld h, 0 29 D1:AAD9 6F - - - ld l, a 30 D1:AADA 11 9B AA D1 ld de, numMapCSC 31 D1:AADE 19 - - - add hl, de 32 D1:AADF 7E - - - ld a, (hl) 33 D1:AAE0 E1 - - - pop hl 34 D1:AAE1 C9 - - - ret 35 D1:AAE2 - - - - 36 D1:AAE2 - - - - ;;charnumsymtoascii 37 D1:AAE2 - - - - ;;Converts a char to "ascii" 38 D1:AAE2 - - - - ;;Inputs: 39 D1:AAE2 - - - - ;; A: char code (csc) 40 D1:AAE2 - - - - ;;Outputs: 41 D1:AAE2 - - - - ;; A: ascii char 42 D1:AAE2 - - - - charnumsymtoascii: 43 D1:AAE2 E5 - - - push hl 44 D1:AAE3 21 00 00 00 ld hl, 0 45 D1:AAE7 26 00 - - ld h, 0 46 D1:AAE9 6F - - - ld l, a 47 D1:AAEA 11 74 AA D1 ld de, numsymMapCSC 48 D1:AAEE 19 - - - add hl, de 49 D1:AAEF 7E - - - ld a, (hl) 50 D1:AAF0 E1 - - - pop hl 51 D1:AAF1 C9 - - - ret Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/std.inc" 6 D1:AAF2 - - - - #include "includes/lib/std/Cursor.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/Cursor.asm" 1 D1:AAF2 - - - - ;;cursorcharunderreset 2 D1:AAF2 - - - - ;;Sets curUnder to 0 3 D1:AAF2 - - - - cursorcurunderreset: 4 D1:AAF2 E5 - - - push hl 5 D1:AAF3 21 99 05 D0 ld hl, curUnder 6 D1:AAF7 36 20 - - ld (hl), ' ' 7 D1:AAF9 E1 - - - pop hl 8 D1:AAFA C9 - - - ret Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/std.inc" 7 D1:AAFB - - - - #include "includes/lib/std/Print.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/Print.asm" 1 D1:AAFB - - - - ;;printprompt 2 D1:AAFB - - - - ;;Sets curcol to 0 and prints prompt 3 D1:AAFB - - - - ;;Inputs: 4 D1:AAFB - - - - ;; HL: Prompt String Location 5 D1:AAFB - - - - printprompt: 6 D1:AAFB E5 - - - push hl 7 D1:AAFC AF - - - xor a 8 D1:AAFD 32 96 05 D0 ld (CurCol), a 9 D1:AB01 CD C0 07 02 call _PutS 10 D1:AB05 E1 - - - pop hl 11 D1:AB06 C9 - - - ret Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/std.inc" 8 D1:AB07 - - - - #include "includes/lib/std/Draw.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/Draw.asm" 1 D1:AB07 - - - - ;;drawpixel 2 D1:AB07 - - - - ;;Sets a pixel to specified color (565) 3 D1:AB07 - - - - ;;Inputs: 4 D1:AB07 - - - - ;; HL: color 5 D1:AB07 - - - - ;; DE: vRam location 6 D1:AB07 - - - - drawpixel: 7 D1:AB07 E5 - - - push hl 8 D1:AB08 D5 - - - push de 9 D1:AB09 EB - - - ex de, hl 10 D1:AB0A 73 - - - ld (hl), e 11 D1:AB0B 23 - - - inc hl 12 D1:AB0C 72 - - - ld (hl), d 13 D1:AB0D D1 - - - pop de 14 D1:AB0E E1 - - - pop hl 15 D1:AB0F C9 - - - ret 16 D1:AB10 - - - - 17 D1:AB10 - - - - ;;drawpixelxy 18 D1:AB10 - - - - ;;Sets a pixel to specified color 19 D1:AB10 - - - - ;;Inputs: 20 D1:AB10 - - - - ;; HL: color 21 D1:AB10 - - - - ;; DE: x 22 D1:AB10 - - - - ;; A: y 23 D1:AB10 - - - - drawpixelxy 24 D1:AB10 D5 - - - push de 25 D1:AB11 E5 - - - push hl 26 D1:AB12 EB - - - ex de, hl 27 D1:AB13 29 - - - add hl, hl 28 D1:AB14 E5 - - - push hl 29 D1:AB15 21 80 02 00 ld hl, 640 30 D1:AB19 CD 87 A9 D1 call mulAbyHL 31 D1:AB1D EB - - - ex de, hl 32 D1:AB1E E1 - - - pop hl 33 D1:AB1F 19 - - - add hl, de 34 D1:AB20 11 00 00 D4 ld de, vRam 35 D1:AB24 19 - - - add hl, de 36 D1:AB25 EB - - - ex de, hl 37 D1:AB26 E1 - - - pop hl 38 D1:AB27 CD 07 AB D1 call drawpixel 39 D1:AB2B D1 - - - pop de 40 D1:AB2C C9 - - - ret 41 D1:AB2D - - - - 42 D1:AB2D - - - - ;;drawrow 43 D1:AB2D - - - - ;;Draws a row on lcd 44 D1:AB2D - - - - ;;Inputs: 45 D1:AB2D - - - - ;; A: y 46 D1:AB2D - - - - ;; HL: color 47 D1:AB2D - - - - drawrow: 48 D1:AB2D E5 - - - push hl 49 D1:AB2E C5 - - - push bc 50 D1:AB2F E5 - - - push hl 51 D1:AB30 21 E0 01 00 ld hl, lcdHeight * 2 52 D1:AB34 CD 87 A9 D1 call mulAbyHL 53 D1:AB38 11 00 00 D4 ld de, vRam 54 D1:AB3C 19 - - - add hl, de 55 D1:AB3D EB - - - ex de, hl 56 D1:AB3E E1 - - - pop hl 57 D1:AB3F 01 40 01 00 ld bc, lcdWidth 58 D1:AB43 - - - - drawrowLoop: 59 D1:AB43 CD 07 AB D1 call drawpixel 60 D1:AB47 13 - - - inc de 61 D1:AB48 13 - - - inc de 62 D1:AB49 0B - - - dec bc 63 D1:AB4A E5 - - - push hl 64 D1:AB4B 21 00 00 00 ld hl, 0 65 D1:AB4F CD 72 A9 D1 call cpHLBC 66 D1:AB53 E1 - - - pop hl 67 D1:AB54 20 ED - - jr nz, drawrowLoop 68 D1:AB56 C1 - - - pop bc 69 D1:AB57 E1 - - - pop hl 70 D1:AB58 C9 - - - ret 71 D1:AB59 - - - - 72 D1:AB59 - - - - ;;drawbar 73 D1:AB59 - - - - ;;Loops drawing row 74 D1:AB59 - - - - ;;Inputs: 75 D1:AB59 - - - - ;; A: y 76 D1:AB59 - - - - ;; [B]C: height 77 D1:AB59 - - - - ;; HL: color 78 D1:AB59 - - - - drawbar: 79 D1:AB59 C5 - - - push bc 80 D1:AB5A - - - - drawbarLoop: 81 D1:AB5A CD 2D AB D1 call drawrow 82 D1:AB5E 0B - - - dec bc 83 D1:AB5F 3C - - - inc a 84 D1:AB60 E5 - - - push hl 85 D1:AB61 21 00 00 00 ld hl, 0 86 D1:AB65 CD 72 A9 D1 call cpHLBC 87 D1:AB69 E1 - - - pop hl 88 D1:AB6A 20 EE - - jr nz, drawbarLoop 89 D1:AB6C C1 - - - pop bc 90 D1:AB6D C9 - - - ret 91 D1:AB6E - - - - 92 D1:AB6E - - - - ;;drawrectfilled 93 D1:AB6E - - - - ;;Draws a rectangle from coordinates (Slow) 94 D1:AB6E - - - - ;;Inputs: 95 D1:AB6E - - - - ;; DE: x 96 D1:AB6E - - - - ;; C: y 97 D1:AB6E - - - - ;; HL: width 98 D1:AB6E - - - - ;; A: height 99 D1:AB6E - - - - ;; IXH+IXL: color 100 D1:AB6E - - - - drawrectfilled: 101 D1:AB6E 19 - - - add hl, de 102 D1:AB6F 81 - - - add a, c 103 D1:AB70 47 - - - ld b, a 104 D1:AB71 - - - - drawrectfilledLoopY: 105 D1:AB71 D5 - - - push de 106 D1:AB72 - - - - drawrectfilledLoopX: 107 D1:AB72 E5 - - - push hl 108 D1:AB73 C5 - - - push bc 109 D1:AB74 EB - - - ex de, hl 110 D1:AB75 DD 54 - - ld d, ixh 111 D1:AB77 DD 5D - - ld e, ixl 112 D1:AB79 EB - - - ex de, hl 113 D1:AB7A 79 - - - ld a, c 114 D1:AB7B CD 10 AB D1 call drawpixelxy 115 D1:AB7F C1 - - - pop bc 116 D1:AB80 E1 - - - pop hl 117 D1:AB81 13 - - - inc de 118 D1:AB82 CD 6D A9 D1 call cpHLDE 119 D1:AB86 20 EA - - jr nz, drawrectfilledLoopX 120 D1:AB88 D1 - - - pop de 121 D1:AB89 0C - - - inc c 122 D1:AB8A 78 - - - ld a, b 123 D1:AB8B B9 - - - cp c 124 D1:AB8C 20 E3 - - jr nz, drawrectfilledLoopY 125 D1:AB8E C9 - - - ret Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/std.inc" 9 D1:AB8F - - - - #include "includes/lib/std/Array.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/Array.asm" 1 D1:AB8F - - - - ;;array2d 2 D1:AB8F - - - - ;;gets the address of 2d array 3 D1:AB8F - - - - ;;Inputs: 4 D1:AB8F - - - - ;; H: y 5 D1:AB8F - - - - ;; L: x width 6 D1:AB8F - - - - ;; B: x 7 D1:AB8F - - - - ;; DE: Array start 8 D1:AB8F - - - - ;;Outputs: 9 D1:AB8F - - - - ;; DE: Array loc address 10 D1:AB8F - - - - array2d: 11 D1:AB8F E5 - - - push hl 12 D1:AB90 ED 6C - - mlt hl 13 D1:AB92 19 - - - add hl, de 14 D1:AB93 11 00 00 00 ld de, 0 15 D1:AB97 58 - - - ld e, b 16 D1:AB98 19 - - - add hl, de 17 D1:AB99 EB - - - ex de, hl 18 D1:AB9A E1 - - - pop hl 19 D1:AB9B C9 - - - ret Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/std.inc" 10 D1:AB9C - - - - #include "includes/lib/std/Hex.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/Hex.asm" 1 D1:AB9C - - - - ;;bytetohexstr 2 D1:AB9C - - - - ;;converts byte to hex string 3 D1:AB9C - - - - ;;Inputs: 4 D1:AB9C - - - - ;; A: input byte 5 D1:AB9C - - - - ;;Outputs: 6 D1:AB9C - - - - ;; hl: output string location 7 D1:AB9C - - - - bytetohexstr: 8 D1:AB9C E5 - - - push hl 9 D1:AB9D C5 - - - push bc 10 D1:AB9E 01 00 00 00 ld bc, 0 11 D1:ABA2 4F - - - ld c, a 12 D1:ABA3 06 0F - - ld b, $0F 13 D1:ABA5 A0 - - - and a, b 14 D1:ABA6 47 - - - ld b, a 15 D1:ABA7 79 - - - ld a, c 16 D1:ABA8 48 - - - ld c, b 17 D1:ABA9 06 00 - - ld b, 0 18 D1:ABAB 21 E5 AB D1 ld hl, hexLUT 19 D1:ABAF 09 - - - add hl, bc 20 D1:ABB0 46 - - - ld b, (hl) 21 D1:ABB1 21 E2 AB D1 ld hl, bytetohexstrBuf + 1 22 D1:ABB5 70 - - - ld (hl), b 23 D1:ABB6 C1 - - - pop bc 24 D1:ABB7 C5 - - - push bc 25 D1:ABB8 01 00 00 00 ld bc, 0 26 D1:ABBC CB 3F - - srl a 27 D1:ABBE CB 3F - - srl a 28 D1:ABC0 CB 3F - - srl a 29 D1:ABC2 CB 3F - - srl a 30 D1:ABC4 47 - - - ld b, a 31 D1:ABC5 79 - - - ld a, c 32 D1:ABC6 48 - - - ld c, b 33 D1:ABC7 06 00 - - ld b, 0 34 D1:ABC9 21 E5 AB D1 ld hl, hexLUT 35 D1:ABCD 09 - - - add hl, bc 36 D1:ABCE 46 - - - ld b, (hl) 37 D1:ABCF 21 E1 AB D1 ld hl, bytetohexstrBuf 38 D1:ABD3 70 - - - ld (hl), b 39 D1:ABD4 C1 - - - pop bc 40 D1:ABD5 21 E3 AB D1 ld hl, bytetohexstrBuf + 2 41 D1:ABD9 36 00 - - ld (hl), $00 42 D1:ABDB E1 - - - pop hl 43 D1:ABDC 21 E1 AB D1 ld hl, bytetohexstrBuf 44 D1:ABE0 C9 - - - ret 45 D1:ABE1 - - - - 46 D1:ABE1 00 00 00 00 bytetohexstrBuf: .db $00, $00, $00, $00 47 D1:ABE5 - - - - 48 D1:ABE5 - - - - #include "includes/tables/hexLUT.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/tables/hexLUT.asm" 1 D1:ABE5 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:ABF6 - - - - 50 D1:ABF6 - - - - ;;hexToA 51 D1:ABF6 - - - - ;;Converts a hexadecimal string to a number. 52 D1:ABF6 - - - - ;;Inputs: 53 D1:ABF6 - - - - ;; HL: String pointer 54 D1:ABF6 - - - - ;;Outputs: 55 D1:ABF6 - - - - ;; A: Value 56 D1:ABF6 - - - - hexToA: 57 D1:ABF6 C5 - - - push bc 58 D1:ABF7 E5 - - - push hl 59 D1:ABF8 06 00 - - ld b, 0 60 D1:ABFA 7E - - - _: ld a, (hl) 61 D1:ABFB B7 - - - or a 62 D1:ABFC 28 11 - - jr z, hexToA_ret 63 D1:ABFE CB 10 CB 10 CB 10 CB 10 rl b \ rl b \ rl b \ rl b 64 D1:AC06 CD 13 AC D1 call hexToA_doConvert 65 D1:AC0A B0 - - - or b 66 D1:AC0B 47 - - - ld b, a 67 D1:AC0C 23 - - - inc hl 68 D1:AC0D 18 EB - - jr -_ 69 D1:AC0F - - - - hexToA_ret: 70 D1:AC0F 78 - - - ld a, b 71 D1:AC10 E1 - - - pop hl 72 D1:AC11 C1 - - - pop bc 73 D1:AC12 C9 - - - ret 74 D1:AC13 - - - - 75 D1:AC13 - - - - hexToA_doConvert: 76 D1:AC13 FE 61 - - cp 'a' ; Convert to lowercase 77 D1:AC15 38 02 - - jr c, _ 78 D1:AC17 D6 20 - - sub 'a' - 'A' 79 D1:AC19 FE 41 - - _: cp 'A' ; Close gap between numbers and letter 80 D1:AC1B 38 02 - - jr c, _ 81 D1:AC1D D6 07 - - sub 'A'-('9'+1) 82 D1:AC1F D6 30 - - _: sub '0' ; To number 83 D1:AC21 C9 - - - ret Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/std.inc" 11 D1:AC22 - - - - 12 D1:AC22 - - - - #include "includes/lib/std/String.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/String.asm" 1 D1:AC22 - - - - ;;strlen 2 D1:AC22 - - - - ;;Determines the length of a zero delimited string. 3 D1:AC22 - - - - ;;Inputs: 4 D1:AC22 - - - - ;; HL: String pointer 5 D1:AC22 - - - - ;;Outputs: 6 D1:AC22 - - - - ;; BC: String length 7 D1:AC22 - - - - strlen: 8 D1:AC22 F5 - - - push af 9 D1:AC23 E5 - - - push hl 10 D1:AC24 AF - - - xor a 11 D1:AC25 47 - - - ld b, a 12 D1:AC26 4F - - - ld c, a 13 D1:AC27 ED B1 - - cpir 14 D1:AC29 - - - - ; bc = -bc 15 D1:AC29 AF 91 4F 9F 90 47 - - xor a \ sub c \ ld c, a \ sbc a, a \ sub b \ ld b, a 16 D1:AC2F 0B - - - dec bc 17 D1:AC30 E1 - - - pop hl 18 D1:AC31 F1 - - - pop af 19 D1:AC32 C9 - - - ret 20 D1:AC33 - - - - 21 D1:AC33 - - - - ;;strcmp 22 D1:AC33 - - - - ;;Determines if two strings are equal, and checks alphabetical sort order. 23 D1:AC33 - - - - ;;Inputs: 24 D1:AC33 - - - - ;; HL: String pointer 25 D1:AC33 - - - - ;; DE: String pointer 26 D1:AC33 - - - - ;;Outputs: 27 D1:AC33 - - - - ;; Z: Set if equal, reset if not equal 28 D1:AC33 - - - - ;; C: Set if string HL is alphabetically earlier than string DE 29 D1:AC33 - - - - strcmp: 30 D1:AC33 E5 - - - push hl 31 D1:AC34 D5 - - - push de 32 D1:AC35 - - - - strcmpLoop: 33 D1:AC35 1A - - - ld a, (de) 34 D1:AC36 B7 - - - or a 35 D1:AC37 28 07 - - jr z, strCmpEnd 36 D1:AC39 BE - - - cp (hl) 37 D1:AC3A 20 06 - - jr nz, strcmpExit 38 D1:AC3C 23 - - - inc hl 39 D1:AC3D 13 - - - inc de 40 D1:AC3E 18 F5 - - jr strcmpLoop 41 D1:AC40 - - - - strcmpEnd: 42 D1:AC40 7E - - - ld a, (hl) 43 D1:AC41 B7 - - - or a 44 D1:AC42 - - - - strcmpExit: 45 D1:AC42 3F - - - ccf 46 D1:AC43 D1 - - - pop de 47 D1:AC44 E1 - - - pop hl 48 D1:AC45 C9 - - - ret 49 D1:AC46 - - - - 50 D1:AC46 - - - - ;;strcpy 51 D1:AC46 - - - - ;;Copies a string. 52 D1:AC46 - - - - ;;Inputs: 53 D1:AC46 - - - - ;; HL: String pointer 54 D1:AC46 - - - - ;; DE: Destination 55 D1:AC46 - - - - ;;Notes: 56 D1:AC46 - - - - ;; This will trample into undefined territory if you try to copy a string into some 57 D1:AC46 - - - - ;;allocated memory it won't fit in. 58 D1:AC46 - - - - strcpy: 59 D1:AC46 D5 - - - push de 60 D1:AC47 E5 - - - push hl 61 D1:AC48 EB - - - ex de, hl 62 D1:AC49 1A - - - _: ld a, (de) 63 D1:AC4A 77 - - - ld (hl), a 64 D1:AC4B B7 - - - or a 65 D1:AC4C 28 04 - - jr z, _ 66 D1:AC4E 23 13 - - inc hl \ inc de 67 D1:AC50 18 F7 - - jr -_ 68 D1:AC52 E1 - - - _: pop hl 69 D1:AC53 D1 - - - pop de 70 D1:AC54 C9 - - - ret 71 D1:AC55 - - - - 72 D1:AC55 - - - - ;;strchr 73 D1:AC55 - - - - ;;Returns a pointer on the first occurence of a character in a string. 74 D1:AC55 - - - - ;;Inputs: 75 D1:AC55 - - - - ;; HL: Haystack 76 D1:AC55 - - - - ;; B: Needle 77 D1:AC55 - - - - ;;Outputs: 78 D1:AC55 - - - - ;; HL: Pointer to first occurence of character 79 D1:AC55 - - - - ;; Z: Set if character found 80 D1:AC55 - - - - ;; A: Destroyed 81 D1:AC55 - - - - strchr: 82 D1:AC55 - - - - strchrLoop: 83 D1:AC55 7E - - - ld a, (hl) 84 D1:AC56 B7 - - - or a 85 D1:AC57 28 05 - - jr z, strchrNoCharFound 86 D1:AC59 B8 - - - cp b 87 D1:AC5A C8 - - - ret z 88 D1:AC5B 23 - - - inc hl 89 D1:AC5C 18 F7 - - jr strchrLoop 90 D1:AC5E - - - - strchrNoCharFound: 91 D1:AC5E 3C - - - inc a 92 D1:AC5F C9 - - - ret 93 D1:AC60 - - - - 94 D1:AC60 - - - - ;;strtob 95 D1:AC60 - - - - ;;Converts a string to a byte 96 D1:AC60 - - - - ;;Inputs: 97 D1:AC60 - - - - ;; HL: string pointer 98 D1:AC60 - - - - ;;Outputs: 99 D1:AC60 - - - - ;; A: byte 100 D1:AC60 - - - - strtob: 101 D1:AC60 C5 - - - push bc 102 D1:AC61 D5 - - - push de 103 D1:AC62 0E 00 - - ld c, 0 104 D1:AC64 - - - - strtobNumFind: 105 D1:AC64 7E - - - ld a, (hl) 106 D1:AC65 FE 00 - - cp $00 107 D1:AC67 CA B9 AC D1 jp z, strtobEXIT 108 D1:AC6B 0E 00 - - ld c, 0 109 D1:AC6D D6 31 - - sub '1' 110 D1:AC6F FE 3A - - cp '9' + 1 111 D1:AC71 38 03 - - jr c, strtobNumWhile 112 D1:AC73 23 - - - inc hl 113 D1:AC74 18 EE - - jr strtobNumFind 114 D1:AC76 - - - - strtobNumWhile: 115 D1:AC76 E5 - - - push hl 116 D1:AC77 - - - - strtobNumWhileLoop: 117 D1:AC77 79 - - - ld a, c 118 D1:AC78 FE 03 - - cp 3 119 D1:AC7A D2 8B AC D1 jp nc, strtobConvert 120 D1:AC7E 7E - - - ld a, (hl) 121 D1:AC7F D6 2F - - sub '0' - 1 122 D1:AC81 38 08 - - jr c, strtobConvert 123 D1:AC83 FE 3A - - cp '9' + 1 124 D1:AC85 30 04 - - jr nc, strtobConvert 125 D1:AC87 23 - - - inc hl 126 D1:AC88 0C - - - inc c 127 D1:AC89 18 EC - - jr strtobNumWhileLoop 128 D1:AC8B - - - - strtobConvert: 129 D1:AC8B 2B - - - dec hl 130 D1:AC8C 7E - - - ld a, (hl) 131 D1:AC8D D6 30 - - sub '0' 132 D1:AC8F 4F - - - ld c, a 133 D1:AC90 2B - - - dec hl 134 D1:AC91 D1 - - - pop de 135 D1:AC92 CD 6D A9 D1 call cpHLDE 136 D1:AC96 DA B9 AC D1 jp c, strtobExit 137 D1:AC9A 7E - - - ld a, (hl) 138 D1:AC9B D6 30 - - sub '0' 139 D1:AC9D 06 0A - - ld b, 10 140 D1:AC9F CD 7F A9 D1 call mulAbyB 141 D1:ACA3 81 - - - add a, c 142 D1:ACA4 4F - - - ld c, a 143 D1:ACA5 2B - - - dec hl 144 D1:ACA6 CD 6D A9 D1 call cpHLDE 145 D1:ACAA DA B9 AC D1 jp c, strtobExit 146 D1:ACAE 7E - - - ld a, (hl) 147 D1:ACAF D6 30 - - sub '0' 148 D1:ACB1 06 64 - - ld b, 100 149 D1:ACB3 CD 7F A9 D1 call mulAbyB 150 D1:ACB7 81 - - - add a, c 151 D1:ACB8 4F - - - ld c, a 152 D1:ACB9 - - - - strtobExit: 153 D1:ACB9 79 - - - ld a, c 154 D1:ACBA D1 - - - pop de 155 D1:ACBB C1 - - - pop bc 156 D1:ACBC C9 - - - ret 157 D1:ACBD - - - - 158 D1:ACBD - - - - ;;strtow 159 D1:ACBD - - - - ;;Converts a string to a byte 160 D1:ACBD - - - - ;;Inputs: 161 D1:ACBD - - - - ;; HL: string pointer 162 D1:ACBD - - - - ;;Outputs: 163 D1:ACBD - - - - ;; HL: byte 164 D1:ACBD - - - - strtow: 165 D1:ACBD C5 - - - push bc 166 D1:ACBE D5 - - - push de 167 D1:ACBF 01 00 00 00 ld bc, 0 168 D1:ACC3 - - - - strtowNumFind: 169 D1:ACC3 7E - - - ld a, (hl) 170 D1:ACC4 FE 00 - - cp $00 171 D1:ACC6 CA 5C AD D1 jp z, strtowEXIT 172 D1:ACCA 0E 00 - - ld c, 0 173 D1:ACCC D6 31 - - sub '1' 174 D1:ACCE FE 3A - - cp '9' + 1 175 D1:ACD0 38 03 - - jr c, strtowNumWhile 176 D1:ACD2 23 - - - inc hl 177 D1:ACD3 18 EE - - jr strtowNumFind 178 D1:ACD5 - - - - strtowNumWhile: 179 D1:ACD5 E5 - - - push hl 180 D1:ACD6 - - - - strtowNumWhileLoop: 181 D1:ACD6 79 - - - ld a, c 182 D1:ACD7 FE 05 - - cp 5 183 D1:ACD9 D2 EA AC D1 jp nc, strtowConvert 184 D1:ACDD 7E - - - ld a, (hl) 185 D1:ACDE D6 2F - - sub '0' - 1 186 D1:ACE0 38 08 - - jr c, strtowConvert 187 D1:ACE2 FE 3A - - cp '9' + 1 188 D1:ACE4 30 04 - - jr nc, strtowConvert 189 D1:ACE6 23 - - - inc hl 190 D1:ACE7 0C - - - inc c 191 D1:ACE8 18 EC - - jr strtowNumWhileLoop 192 D1:ACEA - - - - strtowConvert: 193 D1:ACEA 01 00 00 00 ld bc, 0 194 D1:ACEE 2B - - - dec hl 195 D1:ACEF 7E - - - ld a, (hl) 196 D1:ACF0 D6 30 - - sub '0' 197 D1:ACF2 01 00 00 00 ld bc, 0 198 D1:ACF6 4F - - - ld c, a 199 D1:ACF7 2B - - - dec hl 200 D1:ACF8 - - - - 201 D1:ACF8 D1 - - - pop de 202 D1:ACF9 CD 6D A9 D1 call cpHLDE 203 D1:ACFD DA 5C AD D1 jp c, strtowExit 204 D1:AD01 7E - - - ld a, (hl) 205 D1:AD02 D6 30 - - sub '0' 206 D1:AD04 E5 - - - push hl 207 D1:AD05 21 0A 00 00 ld hl, 10 208 D1:AD09 CD 87 A9 D1 call mulAbyHL 209 D1:AD0D 09 - - - add hl, bc 210 D1:AD0E 44 - - - ld b, h 211 D1:AD0F 4D - - - ld c, l 212 D1:AD10 E1 - - - pop hl 213 D1:AD11 2B - - - dec hl 214 D1:AD12 - - - - 215 D1:AD12 CD 6D A9 D1 call cpHLDE 216 D1:AD16 DA 5C AD D1 jp c, strtowExit 217 D1:AD1A 7E - - - ld a, (hl) 218 D1:AD1B D6 30 - - sub '0' 219 D1:AD1D E5 - - - push hl 220 D1:AD1E 21 64 00 00 ld hl, 100 221 D1:AD22 CD 87 A9 D1 call mulAbyHL 222 D1:AD26 09 - - - add hl, bc 223 D1:AD27 44 - - - ld b, h 224 D1:AD28 4D - - - ld c, l 225 D1:AD29 E1 - - - pop hl 226 D1:AD2A 2B - - - dec hl 227 D1:AD2B - - - - 228 D1:AD2B CD 6D A9 D1 call cpHLDE 229 D1:AD2F DA 5C AD D1 jp c, strtowExit 230 D1:AD33 7E - - - ld a, (hl) 231 D1:AD34 D6 30 - - sub '0' 232 D1:AD36 E5 - - - push hl 233 D1:AD37 21 E8 03 00 ld hl, 1000 234 D1:AD3B CD 87 A9 D1 call mulAbyHL 235 D1:AD3F 09 - - - add hl, bc 236 D1:AD40 44 - - - ld b, h 237 D1:AD41 4D - - - ld c, l 238 D1:AD42 E1 - - - pop hl 239 D1:AD43 2B - - - dec hl 240 D1:AD44 - - - - 241 D1:AD44 CD 6D A9 D1 call cpHLDE 242 D1:AD48 DA 5C AD D1 jp c, strtowExit 243 D1:AD4C 7E - - - ld a, (hl) 244 D1:AD4D D6 30 - - sub '0' 245 D1:AD4F E5 - - - push hl 246 D1:AD50 21 10 27 00 ld hl, 10000 247 D1:AD54 CD 87 A9 D1 call mulAbyHL 248 D1:AD58 09 - - - add hl, bc 249 D1:AD59 44 - - - ld b, h 250 D1:AD5A 4D - - - ld c, l 251 D1:AD5B E1 - - - pop hl 252 D1:AD5C - - - - 253 D1:AD5C - - - - strtowExit: 254 D1:AD5C 21 00 00 00 ld hl, 0 255 D1:AD60 60 - - - ld h, b 256 D1:AD61 69 - - - ld l, c 257 D1:AD62 D1 - - - pop de 258 D1:AD63 C1 - - - pop bc 259 D1:AD64 C9 - - - ret 260 D1:AD65 - - - - 261 D1:AD65 - - - - ;;strxor 262 D1:AD65 - - - - ;;xor 2 strings together 263 D1:AD65 - - - - ;;Inputs: 264 D1:AD65 - - - - ;; HL: string 1 265 D1:AD65 - - - - ;; DE: string 2 266 D1:AD65 - - - - ;;Outputs: 267 D1:AD65 - - - - ;; HL: Xor String Pointer 268 D1:AD65 - - - - strxor: 269 D1:AD65 E5 - - - push hl 270 D1:AD66 D5 - - - push de 271 D1:AD67 EB - - - ex de, hl 272 D1:AD68 - - - - strxorLoop: 273 D1:AD68 1A - - - ld a, (de) 274 D1:AD69 B7 - - - or a, a 275 D1:AD6A 28 0A - - jr z, strxorEnd 276 D1:AD6C AE - - - xor (hl) 277 D1:AD6D B7 - - - or a, a 278 D1:AD6E 20 01 - - jr nz, strxorLoopLD 279 D1:AD70 7E - - - ld a, (hl) 280 D1:AD71 - - - - strxorLoopLD: 281 D1:AD71 12 - - - ld (de), a 282 D1:AD72 13 - - - inc de 283 D1:AD73 23 - - - inc hl 284 D1:AD74 18 F2 - - jr strxorLoop 285 D1:AD76 - - - - strxorEnd: 286 D1:AD76 D1 - - - pop de 287 D1:AD77 E1 - - - pop hl 288 D1:AD78 C9 - - - ret 289 D1:AD79 - - - - 290 D1:AD79 - - - - 291 D1:AD79 - - - - ;;toLower [Strings] 292 D1:AD79 - - - - ;;Converts every alpha character of a string to lowercase. 293 D1:AD79 - - - - ;;Inputs: 294 D1:AD79 - - - - ;; HL: Pointer to string 295 D1:AD79 - - - - ;;Notes: 296 D1:AD79 - - - - ;; This modifies the string in-place. 297 D1:AD79 - - - - ;toLower: 298 D1:AD79 - - - - ; push af \ push hl 299 D1:AD79 - - - - ; ld a, (hl) 300 D1:AD79 - - - - ; or a 301 D1:AD79 - - - - ; jr z, toLowerExit 302 D1:AD79 - - - - ; call isAlphaNum 303 D1:AD79 - - - - ; jr nc, toLowerNotUpperAlpha 304 D1:AD79 - - - - ; cp 'a' 305 D1:AD79 - - - - ; jr nc, toLowerNotUpperAlpha 306 D1:AD79 - - - - ; add a, 'a' - 'A' 307 D1:AD79 - - - - ; ld (hl), a 308 D1:AD79 - - - - ;toLowerNotUpperAlpha: 309 D1:AD79 - - - - ; inc hl 310 D1:AD79 - - - - ; jr toLower + 2 311 D1:AD79 - - - - ;toLowerExit: 312 D1:AD79 - - - - ; pop hl \ pop af 313 D1:AD79 - - - - ; ret 314 D1:AD79 - - - - 315 D1:AD79 - - - - ;;toUpper [Strings] 316 D1:AD79 - - - - ;;Converts every alpha character of a string to uppercase. 317 D1:AD79 - - - - ;;Inputs: 318 D1:AD79 - - - - ;; HL: Pointer to string 319 D1:AD79 - - - - ;;Notes: 320 D1:AD79 - - - - ;; This modifies the string in-place. 321 D1:AD79 - - - - ;toUpper: 322 D1:AD79 - - - - ; push af \ push hl 323 D1:AD79 - - - - ; ld a, (hl) 324 D1:AD79 - - - - ; or a 325 D1:AD79 - - - - ; jr z, toUpperExit 326 D1:AD79 - - - - ; call isAlphaNum 327 D1:AD79 - - - - ; jr nc, toUpperNotLowerAlpha 328 D1:AD79 - - - - ; cp 'a' 329 D1:AD79 - - - - ; jr c, toUpperNotLowerAlpha 330 D1:AD79 - - - - ; sub 'a' - 'A' 331 D1:AD79 - - - - ; ld (hl), a 332 D1:AD79 - - - - ;toUpperNotLowerAlpha: 333 D1:AD79 - - - - ; inc hl 334 D1:AD79 - - - - ; jr toUpper + 2 335 D1:AD79 - - - - ;toUpperExit: 336 D1:AD79 - - - - ; pop hl \ pop af 337 D1:AD79 - - - - ; ret Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/std.inc" 13 D1:AD79 - - - - 14 D1:AD79 - - - - #include "includes/lib/std/Input.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/Input.asm" 1 D1:AD79 - - - - ;;inputgetkey 2 D1:AD79 - - - - ;;Gets keycode 3 D1:AD79 - - - - ;;Outputs: 4 D1:AD79 - - - - ;; A: keycode 5 D1:AD79 - - - - ;;Destroys: 6 D1:AD79 - - - - ;; DE 7 D1:AD79 - - - - inputgetkey: 8 D1:AD79 EB - - - ex de, hl 9 D1:AD7A CD 4C 01 02 call _GetCSC 10 D1:AD7E EB - - - ex de, hl 11 D1:AD7F B7 - - - or a 12 D1:AD80 28 F7 - - jr z, inputgetkey 13 D1:AD82 C9 - - - ret 14 D1:AD83 - - - - 15 D1:AD83 - - - - ;;inputstr 16 D1:AD83 - - - - ;;Inputs string of length [Buffer Size] and puts it in (Destination) 17 D1:AD83 - - - - ;;Inputs: 18 D1:AD83 - - - - ;; HL: Destination 19 D1:AD83 - - - - ;; D[E]: Buffer Size 20 D1:AD83 - - - - ;;Ouptuts: 21 D1:AD83 - - - - ;; (HL): String 22 D1:AD83 - - - - inputstr: 23 D1:AD83 D5 - - - push de 24 D1:AD84 E5 - - - push hl 25 D1:AD85 ED 53 A3 AE D1 - - - ld (inputstrSizeBuf), de 26 D1:AD8A E5 - - - push hl 27 D1:AD8B D5 - - - push de 28 D1:AD8C 21 96 05 D0 ld hl, CurCol 29 D1:AD90 11 A5 AE D1 ld de, inputstrCurColBuf 30 D1:AD94 CD 3D AA D1 call bytecpy 31 D1:AD98 21 95 05 D0 ld hl, CurRow 32 D1:AD9C 11 A6 AE D1 ld de, inputstrCurRowBuf 33 D1:ADA0 CD 3D AA D1 call bytecpy 34 D1:ADA4 D1 - - - pop de 35 D1:ADA5 E1 - - - pop hl 36 D1:ADA6 - - - - 37 D1:ADA6 FD CB 12 9E res Shift2nd, (IY + ShiftFlags) 38 D1:ADAA CD B0 08 02 call _CursorOn 39 D1:ADAE - - - - 40 D1:ADAE AF - - - xor a 41 D1:ADAF 47 - - - ld b, a 42 D1:ADB0 - - - - inputstrKeyInput: 43 D1:ADB0 CD F2 AA D1 call cursorcurunderreset 44 D1:ADB4 CD 79 AD D1 call inputgetkey 45 D1:ADB8 - - - - 46 D1:ADB8 FE 36 - - cp sk2nd 47 D1:ADBA CA 11 AE D1 jp z, inputstrKey2nd 48 D1:ADBE FE 38 - - cp skDel 49 D1:ADC0 CA 1F AE D1 jp z, inputstrKeyDel 50 D1:ADC4 FE 0F - - cp skClear 51 D1:ADC6 CA 3F AE D1 jp z, inputstrKeyClear 52 D1:ADCA FE 09 - - cp skEnter 53 D1:ADCC CA 8F AE D1 jp z, inputstrKeyEnter 54 D1:ADD0 - - - - 55 D1:ADD0 4F - - - ld c, a 56 D1:ADD1 78 - - - ld a, b 57 D1:ADD2 D5 - - - push de 58 D1:ADD3 ED 5B A3 AE D1 - - - ld de, (inputstrSizeBuf) 59 D1:ADD8 BB - - - cp e 60 D1:ADD9 D1 - - - pop de 61 D1:ADDA 28 D4 - - jr z, inputstrKeyInput 62 D1:ADDC 79 - - - ld a, c 63 D1:ADDD - - - - 64 D1:ADDD D6 0A - - sub skAdd 65 D1:ADDF 38 CF - - jr c, inputstrKeyInput 66 D1:ADE1 FE 26 - - cp skMath - skAdd + 1 67 D1:ADE3 30 CB - - jr nc, inputstrKeyInput 68 D1:ADE5 - - - - 69 D1:ADE5 FD CB 12 5E bit Shift2nd, (IY + ShiftFlags) ; TIOS BASED 70 D1:ADE9 CC C2 AA D1 call z, chartoascii 71 D1:ADED C4 E2 AA D1 call nz, charnumsymtoascii 72 D1:ADF1 - - - - 73 D1:ADF1 FE FF - - cp $FF 74 D1:ADF3 28 BB - - jr z, inputstrKeyInput 75 D1:ADF5 - - - - 76 D1:ADF5 FD CB 05 96 res textScrolled, (iy+textFlags) 77 D1:ADF9 - - - - 78 D1:ADF9 CD B8 07 02 call _PutC 79 D1:ADFD - - - - 80 D1:ADFD 77 - - - ld (hl), a 81 D1:ADFE 23 - - - inc hl 82 D1:ADFF 04 - - - inc b 83 D1:AE00 - - - - 84 D1:AE00 FD CB 05 56 bit textScrolled, (iy+textFlags) 85 D1:AE04 28 AA - - jr z, inputstrKeyInput 86 D1:AE06 E5 - - - push hl 87 D1:AE07 21 A6 AE D1 ld hl, inputstrCurRowBuf 88 D1:AE0B 7E - - - ld a, (hl) 89 D1:AE0C 3D - - - dec a 90 D1:AE0D 77 - - - ld (hl), a 91 D1:AE0E E1 - - - pop hl 92 D1:AE0F 18 9F - - jr inputstrKeyInput 93 D1:AE11 - - - - inputstrKey2nd: 94 D1:AE11 E5 - - - push hl 95 D1:AE12 21 92 00 D0 ld hl, Flags + ShiftFlags 96 D1:AE16 7E - - - ld a, (hl) 97 D1:AE17 EE 08 - - xor 1 << Shift2nd ; Toggle state of Shift2nd flag 98 D1:AE19 77 - - - ld (hl), a 99 D1:AE1A E1 - - - pop hl 100 D1:AE1B C3 B0 AD D1 jp inputstrKeyInput 101 D1:AE1F - - - - inputstrKeyDel: 102 D1:AE1F 78 - - - ld a, b 103 D1:AE20 FE 00 - - cp 0 104 D1:AE22 CA B0 AD D1 jp z, inputstrKeyInput 105 D1:AE26 - - - - 106 D1:AE26 3E 20 - - ld a, ' ' 107 D1:AE28 CD B4 07 02 call _PutMap 108 D1:AE2C - - - - 109 D1:AE2C E5 - - - push hl 110 D1:AE2D 21 96 05 D0 ld hl, CurCol 111 D1:AE31 35 - - - dec (hl) 112 D1:AE32 E1 - - - pop hl 113 D1:AE33 - - - - 114 D1:AE33 3E 20 - - ld a, ' ' 115 D1:AE35 CD B4 07 02 call _PutMap 116 D1:AE39 - - - - 117 D1:AE39 2B - - - dec hl 118 D1:AE3A 05 - - - dec b 119 D1:AE3B C3 B0 AD D1 jp inputstrKeyInput 120 D1:AE3F - - - - 121 D1:AE3F - - - - inputstrKeyClear: 122 D1:AE3F 78 - - - ld a, b 123 D1:AE40 FE 00 - - cp 0 124 D1:AE42 CA B0 AD D1 jp z, inputstrKeyInput 125 D1:AE46 - - - - 126 D1:AE46 E5 - - - push hl 127 D1:AE47 D5 - - - push de 128 D1:AE48 21 A5 AE D1 ld hl, inputstrCurColBuf 129 D1:AE4C 11 96 05 D0 ld de, CurCol 130 D1:AE50 CD 3D AA D1 call bytecpy 131 D1:AE54 21 A6 AE D1 ld hl, inputstrCurRowBuf 132 D1:AE58 11 95 05 D0 ld de, CurRow 133 D1:AE5C CD 3D AA D1 call bytecpy 134 D1:AE60 D1 - - - pop de 135 D1:AE61 E1 - - - pop hl 136 D1:AE62 - - - - 137 D1:AE62 3E 20 - - ld a, ' ' 138 D1:AE64 04 - - - inc b 139 D1:AE65 - - - - inputstrKeyClearLoop: 140 D1:AE65 CD B8 07 02 call _PutC 141 D1:AE69 10 FA - - djnz inputstrKeyClearLoop 142 D1:AE6B 06 00 - - ld b, 0 143 D1:AE6D - - - - 144 D1:AE6D D5 - - - push de 145 D1:AE6E E5 - - - push hl 146 D1:AE6F 21 A5 AE D1 ld hl, inputstrCurColBuf 147 D1:AE73 11 96 05 D0 ld de, CurCol 148 D1:AE77 CD 3D AA D1 call bytecpy 149 D1:AE7B 21 A6 AE D1 ld hl, inputstrCurRowBuf 150 D1:AE7F 11 95 05 D0 ld de, CurRow 151 D1:AE83 CD 3D AA D1 call bytecpy 152 D1:AE87 E1 - - - pop hl 153 D1:AE88 D1 - - - pop de 154 D1:AE89 E1 - - - pop hl 155 D1:AE8A E5 - - - push hl 156 D1:AE8B C3 B0 AD D1 jp inputstrKeyInput 157 D1:AE8F - - - - 158 D1:AE8F - - - - inputstrKeyEnter: 159 D1:AE8F 36 00 - - ld (hl), 0 160 D1:AE91 CD A8 08 02 call _CursorOff 161 D1:AE95 3E 20 - - ld a, ' ' 162 D1:AE97 CD B4 07 02 call _PutMap 163 D1:AE9B E1 - - - pop hl 164 D1:AE9C D1 - - - pop de 165 D1:AE9D FD CB 12 9E res Shift2nd, (IY + ShiftFlags) 166 D1:AEA1 C9 - - - ret 167 D1:AEA2 - - - - 168 D1:AEA2 00 - - - inputstrFlags: .db %00000000 169 D1:AEA3 - - - - ; 0: num Flag 170 D1:AEA3 00 00 - - inputstrSizeBuf: .dw $0000 171 D1:AEA5 00 - - - inputstrCurColBuf: .db $00 172 D1:AEA6 00 - - - inputstrCurRowBuf: .db $00 173 D1:AEA7 - - - - 174 D1:AEA7 - - - - ;;inputcharstr 175 D1:AEA7 - - - - ;;Inputs string of (only letters) of length [Buffer Size] and puts it in (Destination) 176 D1:AEA7 - - - - ;;Inputs: 177 D1:AEA7 - - - - ;; HL: Destination 178 D1:AEA7 - - - - ;; D[E]: Buffer Size 179 D1:AEA7 - - - - ;;Ouptuts: 180 D1:AEA7 - - - - ;; (HL): String 181 D1:AEA7 - - - - inputcharstr: 182 D1:AEA7 D5 - - - push de 183 D1:AEA8 E5 - - - push hl 184 D1:AEA9 ED 53 B7 AF D1 - - - ld (inputcharstrSizeBuf), de 185 D1:AEAE E5 - - - push hl 186 D1:AEAF D5 - - - push de 187 D1:AEB0 21 96 05 D0 ld hl, CurCol 188 D1:AEB4 11 B9 AF D1 ld de, inputcharstrCurColBuf 189 D1:AEB8 CD 3D AA D1 call bytecpy 190 D1:AEBC 21 95 05 D0 ld hl, CurRow 191 D1:AEC0 11 BA AF D1 ld de, inputcharstrCurRowBuf 192 D1:AEC4 CD 3D AA D1 call bytecpy 193 D1:AEC8 D1 - - - pop de 194 D1:AEC9 E1 - - - pop hl 195 D1:AECA - - - - 196 D1:AECA CD B0 08 02 call _CursorOn 197 D1:AECE - - - - 198 D1:AECE AF - - - xor a 199 D1:AECF 47 - - - ld b, a 200 D1:AED0 - - - - inputcharstrKeyInput: 201 D1:AED0 CD F2 AA D1 call cursorcurunderreset 202 D1:AED4 CD 79 AD D1 call inputgetkey 203 D1:AED8 - - - - 204 D1:AED8 FE 38 - - cp skDel 205 D1:AEDA CA 23 AF D1 jp z, inputcharstrKeyDel 206 D1:AEDE FE 0F - - cp skClear 207 D1:AEE0 CA 43 AF D1 jp z, inputcharstrKeyClear 208 D1:AEE4 FE 09 - - cp skEnter 209 D1:AEE6 CA A8 AF D1 jp z, inputcharstrKeyEnter 210 D1:AEEA - - - - 211 D1:AEEA 4F - - - ld c, a 212 D1:AEEB 78 - - - ld a, b 213 D1:AEEC D5 - - - push de 214 D1:AEED ED 5B B7 AF D1 - - - ld de, (inputcharstrSizeBuf) 215 D1:AEF2 BB - - - cp e 216 D1:AEF3 D1 - - - pop de 217 D1:AEF4 28 DA - - jr z, inputcharstrKeyInput 218 D1:AEF6 79 - - - ld a, c 219 D1:AEF7 - - - - 220 D1:AEF7 D6 0A - - sub skAdd 221 D1:AEF9 38 D5 - - jr c, inputcharstrKeyInput 222 D1:AEFB FE 26 - - cp skMath - skAdd + 1 223 D1:AEFD 30 D1 - - jr nc, inputcharstrKeyInput 224 D1:AEFF - - - - 225 D1:AEFF CD C2 AA D1 call chartoascii 226 D1:AF03 - - - - 227 D1:AF03 FE FF - - cp $FF 228 D1:AF05 28 C9 - - jr z, inputcharstrKeyInput 229 D1:AF07 - - - - 230 D1:AF07 FD CB 05 96 res textScrolled, (iy+textFlags) 231 D1:AF0B - - - - 232 D1:AF0B CD B8 07 02 call _PutC 233 D1:AF0F - - - - 234 D1:AF0F 77 - - - ld (hl), a 235 D1:AF10 23 - - - inc hl 236 D1:AF11 04 - - - inc b 237 D1:AF12 - - - - 238 D1:AF12 FD CB 05 56 bit textScrolled, (iy+textFlags) 239 D1:AF16 28 B8 - - jr z, inputcharstrKeyInput 240 D1:AF18 E5 - - - push hl 241 D1:AF19 21 BA AF D1 ld hl, inputcharstrCurRowBuf 242 D1:AF1D 7E - - - ld a, (hl) 243 D1:AF1E 3D - - - dec a 244 D1:AF1F 77 - - - ld (hl), a 245 D1:AF20 E1 - - - pop hl 246 D1:AF21 18 AD - - jr inputcharstrKeyInput 247 D1:AF23 - - - - inputcharstrKeyDel: 248 D1:AF23 78 - - - ld a, b 249 D1:AF24 FE 00 - - cp 0 250 D1:AF26 CA D0 AE D1 jp z, inputcharstrKeyInput 251 D1:AF2A - - - - 252 D1:AF2A 3E 20 - - ld a, ' ' 253 D1:AF2C CD B4 07 02 call _PutMap 254 D1:AF30 - - - - 255 D1:AF30 E5 - - - push hl 256 D1:AF31 21 96 05 D0 ld hl, CurCol 257 D1:AF35 35 - - - dec (hl) 258 D1:AF36 E1 - - - pop hl 259 D1:AF37 - - - - 260 D1:AF37 3E 20 - - ld a, ' ' 261 D1:AF39 CD B4 07 02 call _PutMap 262 D1:AF3D - - - - 263 D1:AF3D 2B - - - dec hl 264 D1:AF3E 05 - - - dec b 265 D1:AF3F C3 D0 AE D1 jp inputcharstrKeyInput 266 D1:AF43 - - - - 267 D1:AF43 - - - - inputcharstrKeyClear: 268 D1:AF43 78 - - - ld a, b 269 D1:AF44 FE 00 - - cp 0 270 D1:AF46 CA D0 AE D1 jp z, inputcharstrKeyInput 271 D1:AF4A - - - - 272 D1:AF4A E5 - - - push hl 273 D1:AF4B 21 95 05 D0 ld hl, CurRow 274 D1:AF4F 4E - - - ld c, (hl) 275 D1:AF50 E1 - - - pop hl 276 D1:AF51 - - - - 277 D1:AF51 E5 - - - push hl 278 D1:AF52 D5 - - - push de 279 D1:AF53 21 B9 AF D1 ld hl, inputcharstrCurColBuf 280 D1:AF57 11 96 05 D0 ld de, CurCol 281 D1:AF5B CD 3D AA D1 call bytecpy 282 D1:AF5F 21 BA AF D1 ld hl, inputcharstrCurRowBuf 283 D1:AF63 11 95 05 D0 ld de, CurRow 284 D1:AF67 CD 3D AA D1 call bytecpy 285 D1:AF6B D1 - - - pop de 286 D1:AF6C E1 - - - pop hl 287 D1:AF6D - - - - 288 D1:AF6D 3E 20 - - ld a, ' ' 289 D1:AF6F 04 - - - inc b 290 D1:AF70 - - - - inputcharstrKeyClearLoop: 291 D1:AF70 CD B8 07 02 call _PutC 292 D1:AF74 10 FA - - djnz inputcharstrKeyClearLoop 293 D1:AF76 - - - - 294 D1:AF76 E5 - - - push hl 295 D1:AF77 D5 - - - push de 296 D1:AF78 21 B9 AF D1 ld hl, inputcharstrCurColBuf 297 D1:AF7C 11 96 05 D0 ld de, CurCol 298 D1:AF80 CD 3D AA D1 call bytecpy 299 D1:AF84 D1 - - - pop de 300 D1:AF85 E1 - - - pop hl 301 D1:AF86 - - - - 302 D1:AF86 D5 - - - push de 303 D1:AF87 E5 - - - push hl 304 D1:AF88 21 B9 AF D1 ld hl, inputcharstrCurColBuf 305 D1:AF8C 11 96 05 D0 ld de, CurCol 306 D1:AF90 CD 3D AA D1 call bytecpy 307 D1:AF94 21 BA AF D1 ld hl, inputcharstrCurRowBuf 308 D1:AF98 11 95 05 D0 ld de, CurRow 309 D1:AF9C CD 3D AA D1 call bytecpy 310 D1:AFA0 E1 - - - pop hl 311 D1:AFA1 D1 - - - pop de 312 D1:AFA2 E1 - - - pop hl 313 D1:AFA3 E5 - - - push hl 314 D1:AFA4 C3 D0 AE D1 jp inputcharstrKeyInput 315 D1:AFA8 - - - - 316 D1:AFA8 - - - - inputcharstrKeyEnter: 317 D1:AFA8 36 00 - - ld (hl), 0 318 D1:AFAA CD A8 08 02 call _CursorOff 319 D1:AFAE 3E 20 - - ld a, ' ' 320 D1:AFB0 CD B4 07 02 call _PutMap 321 D1:AFB4 E1 - - - pop hl 322 D1:AFB5 D1 - - - pop de 323 D1:AFB6 C9 - - - ret 324 D1:AFB7 - - - - 325 D1:AFB7 00 00 - - inputcharstrSizeBuf: .dw $0000 326 D1:AFB9 00 - - - inputcharstrCurColBuf: .db $00 327 D1:AFBA 00 - - - inputcharstrCurRowBuf: .db $00 328 D1:AFBB - - - - 329 D1:AFBB - - - - ;;inputnumstr 330 D1:AFBB - - - - ;;Inputs string of (only numbers) of length [Buffer Size] and puts it in (Destination) 331 D1:AFBB - - - - ;;Inputs: 332 D1:AFBB - - - - ;; HL: Destination 333 D1:AFBB - - - - ;; D[E]: Buffer Size 334 D1:AFBB - - - - ;;Ouptuts: 335 D1:AFBB - - - - ;; (HL): String 336 D1:AFBB - - - - inputnumstr: 337 D1:AFBB D5 - - - push de 338 D1:AFBC E5 - - - push hl 339 D1:AFBD ED 53 BB B0 D1 - - - ld (inputnumstrSizeBuf), de 340 D1:AFC2 E5 - - - push hl 341 D1:AFC3 D5 - - - push de 342 D1:AFC4 21 96 05 D0 ld hl, CurCol 343 D1:AFC8 11 BD B0 D1 ld de, inputnumstrCurColBuf 344 D1:AFCC CD 3D AA D1 call bytecpy 345 D1:AFD0 21 95 05 D0 ld hl, CurRow 346 D1:AFD4 11 BE B0 D1 ld de, inputnumstrCurRowBuf 347 D1:AFD8 CD 3D AA D1 call bytecpy 348 D1:AFDC D1 - - - pop de 349 D1:AFDD E1 - - - pop hl 350 D1:AFDE - - - - 351 D1:AFDE CD B0 08 02 call _CursorOn 352 D1:AFE2 - - - - 353 D1:AFE2 AF - - - xor a 354 D1:AFE3 47 - - - ld b, a 355 D1:AFE4 - - - - 356 D1:AFE4 - - - - inputnumstrKeyInput: 357 D1:AFE4 CD F2 AA D1 call cursorcurunderreset 358 D1:AFE8 CD 79 AD D1 call inputgetkey 359 D1:AFEC - - - - 360 D1:AFEC FE 38 - - cp skDel 361 D1:AFEE CA 37 B0 D1 jp z, inputnumstrKeyDel 362 D1:AFF2 FE 0F - - cp skClear 363 D1:AFF4 CA 57 B0 D1 jp z, inputnumstrKeyClear 364 D1:AFF8 FE 09 - - cp skEnter 365 D1:AFFA CA AC B0 D1 jp z, inputnumstrKeyEnter 366 D1:AFFE - - - - 367 D1:AFFE 4F - - - ld c, a 368 D1:AFFF 78 - - - ld a, b 369 D1:B000 D5 - - - push de 370 D1:B001 ED 5B BB B0 D1 - - - ld de, (inputnumstrSizeBuf) 371 D1:B006 BB - - - cp e 372 D1:B007 D1 - - - pop de 373 D1:B008 28 DA - - jr z, inputnumstrKeyInput 374 D1:B00A 79 - - - ld a, c 375 D1:B00B - - - - 376 D1:B00B D6 0A - - sub skAdd 377 D1:B00D 38 D5 - - jr c, inputnumstrKeyInput 378 D1:B00F FE 26 - - cp skMath - skAdd + 1 379 D1:B011 30 D1 - - jr nc, inputnumstrKeyInput 380 D1:B013 - - - - 381 D1:B013 CD D2 AA D1 call charnumtoascii 382 D1:B017 FE FF - - cp $FF 383 D1:B019 28 C9 - - jr z, inputnumstrKeyInput 384 D1:B01B - - - - 385 D1:B01B FD CB 05 96 res textScrolled, (iy+textFlags) 386 D1:B01F - - - - 387 D1:B01F CD B8 07 02 call _PutC 388 D1:B023 - - - - 389 D1:B023 77 - - - ld (hl), a 390 D1:B024 23 - - - inc hl 391 D1:B025 04 - - - inc b 392 D1:B026 - - - - 393 D1:B026 FD CB 05 56 bit textScrolled, (iy+textFlags) 394 D1:B02A 28 B8 - - jr z, inputnumstrKeyInput 395 D1:B02C E5 - - - push hl 396 D1:B02D 21 BE B0 D1 ld hl, inputnumstrCurRowBuf 397 D1:B031 7E - - - ld a, (hl) 398 D1:B032 3D - - - dec a 399 D1:B033 77 - - - ld (hl), a 400 D1:B034 E1 - - - pop hl 401 D1:B035 18 AD - - jr inputnumstrKeyInput 402 D1:B037 - - - - inputnumstrkeydel: 403 D1:B037 78 - - - ld a, b 404 D1:B038 FE 00 - - cp 0 405 D1:B03A CA E4 AF D1 jp z, inputnumstrKeyInput 406 D1:B03E - - - - 407 D1:B03E 3E 20 - - ld a, ' ' 408 D1:B040 CD B4 07 02 call _PutMap 409 D1:B044 - - - - 410 D1:B044 E5 - - - push hl 411 D1:B045 21 96 05 D0 ld hl, CurCol 412 D1:B049 35 - - - dec (hl) 413 D1:B04A E1 - - - pop hl 414 D1:B04B - - - - 415 D1:B04B 3E 20 - - ld a, ' ' 416 D1:B04D CD B4 07 02 call _PutMap 417 D1:B051 - - - - 418 D1:B051 2B - - - dec hl 419 D1:B052 05 - - - dec b 420 D1:B053 C3 E4 AF D1 jp inputnumstrKeyInput 421 D1:B057 - - - - 422 D1:B057 - - - - inputnumstrKeyClear: 423 D1:B057 78 - - - ld a, b 424 D1:B058 FE 00 - - cp 0 425 D1:B05A CA E4 AF D1 jp z, inputnumstrKeyInput 426 D1:B05E - - - - 427 D1:B05E E5 - - - push hl 428 D1:B05F 21 95 05 D0 ld hl, CurRow 429 D1:B063 4E - - - ld c, (hl) 430 D1:B064 E1 - - - pop hl 431 D1:B065 - - - - 432 D1:B065 E5 - - - push hl 433 D1:B066 D5 - - - push de 434 D1:B067 21 BD B0 D1 ld hl, inputnumstrCurColBuf 435 D1:B06B 11 96 05 D0 ld de, CurCol 436 D1:B06F CD 3D AA D1 call bytecpy 437 D1:B073 21 BE B0 D1 ld hl, inputnumstrCurRowBuf 438 D1:B077 11 95 05 D0 ld de, CurRow 439 D1:B07B CD 3D AA D1 call bytecpy 440 D1:B07F D1 - - - pop de 441 D1:B080 E1 - - - pop hl 442 D1:B081 - - - - 443 D1:B081 3E 20 - - ld a, ' ' 444 D1:B083 04 - - - inc b 445 D1:B084 - - - - inputnumstrKeyClearLoop: 446 D1:B084 CD B8 07 02 call _PutC 447 D1:B088 10 FA - - djnz inputnumstrKeyClearLoop 448 D1:B08A - - - - 449 D1:B08A D5 - - - push de 450 D1:B08B E5 - - - push hl 451 D1:B08C 21 BD B0 D1 ld hl, inputnumstrCurColBuf 452 D1:B090 11 96 05 D0 ld de, CurCol 453 D1:B094 CD 3D AA D1 call bytecpy 454 D1:B098 21 BE B0 D1 ld hl, inputnumstrCurRowBuf 455 D1:B09C 11 95 05 D0 ld de, CurRow 456 D1:B0A0 CD 3D AA D1 call bytecpy 457 D1:B0A4 E1 - - - pop hl 458 D1:B0A5 D1 - - - pop de 459 D1:B0A6 E1 - - - pop hl 460 D1:B0A7 E5 - - - push hl 461 D1:B0A8 C3 E4 AF D1 jp inputnumstrKeyInput 462 D1:B0AC - - - - 463 D1:B0AC - - - - inputnumstrKeyEnter: 464 D1:B0AC 36 00 - - ld (hl), 0 465 D1:B0AE CD A8 08 02 call _CursorOff 466 D1:B0B2 3E 20 - - ld a, ' ' 467 D1:B0B4 CD B4 07 02 call _PutMap 468 D1:B0B8 E1 - - - pop hl 469 D1:B0B9 D1 - - - pop de 470 D1:B0BA C9 - - - ret 471 D1:B0BB - - - - 472 D1:B0BB 00 00 - - inputnumstrSizeBuf: .dw $0000 473 D1:B0BD 00 - - - inputnumstrCurColBuf: .db $00 474 D1:B0BE 00 - - - inputnumstrCurRowBuf: .db $00 Listing for file "/home/pi/Documents/asm/FSH/includes/lib/std/std.inc" Listing for file "FSHa.asm" 72 D1:B0BF - - - - #include "includes/lib/fsh/fsh.inc" Listing for file "/home/pi/Documents/asm/FSH/includes/lib/fsh/fsh.inc" 1 D1:B0BF - - - - #include "includes/lib/fsh/Command.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/lib/fsh/Command.asm" 1 D1:B0BF - - - - ;;commandfill 2 D1:B0BF - - - - ;;Fills command mem with byte a 3 D1:B0BF - - - - ;;Inputs: 4 D1:B0BF - - - - ;; A: byte 5 D1:B0BF - - - - commandfill: 6 D1:B0BF E5 - - - push hl 7 D1:B0C0 C5 - - - push bc 8 D1:B0C1 D5 - - - push de 9 D1:B0C2 06 00 - - ld b, 0 10 D1:B0C4 11 00 00 00 ld de, 0 11 D1:B0C8 4F - - - ld c, a 12 D1:B0C9 21 9F EA D0 ld hl, FshCmd 13 D1:B0CD - - - - commandfillLoop: 14 D1:B0CD 71 - - - ld (hl), c 15 D1:B0CE 23 - - - inc hl 16 D1:B0CF 04 - - - inc b 17 D1:B0D0 13 - - - inc de 18 D1:B0D1 78 - - - ld a, b 19 D1:B0D2 FE 40 - - cp FshCmdSize 20 D1:B0D4 38 F7 - - jr c, commandfillLoop 21 D1:B0D6 D1 - - - pop de 22 D1:B0D7 C1 - - - pop bc 23 D1:B0D8 E1 - - - pop hl 24 D1:B0D9 C9 - - - ret Listing for file "/home/pi/Documents/asm/FSH/includes/lib/fsh/fsh.inc" 2 D1:B0DA - - - - #include "includes/lib/fsh/Parse.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/lib/fsh/Parse.asm" 1 D1:B0DA - - - - ;;fshparsecommand 2 D1:B0DA - - - - ;;Inputs: 3 D1:B0DA - - - - ;; HL: FshCmd 4 D1:B0DA - - - - ;;b = buf row 5 D1:B0DA - - - - ;;c = char in row 6 D1:B0DA - - - - ;de = scratch 7 D1:B0DA - - - - fshparsecommand: 8 D1:B0DA E5 - - - push hl 9 D1:B0DB C5 - - - push bc 10 D1:B0DC D5 - - - push de 11 D1:B0DD E5 - - - push hl 12 D1:B0DE E5 - - - push hl 13 D1:B0DF 21 F1 B1 D1 ld hl, fshparsecommandCmd 14 D1:B0E3 06 2D - - ld b, 45 15 D1:B0E5 3E 00 - - ld a, $00 16 D1:B0E7 CD 45 AA D1 call memset 17 D1:B0EB E1 - - - pop hl 18 D1:B0EC - - - - 19 D1:B0EC 01 00 00 00 ld bc, 0 20 D1:B0F0 11 00 00 00 ld de, 0 21 D1:B0F4 - - - - fshparsecommandLoop: 22 D1:B0F4 7E - - - ld a, (hl) 23 D1:B0F5 - - - - fshparsecommandCheckSpace: 24 D1:B0F5 FE 20 - - cp ' ' ;end of word 25 D1:B0F7 20 0C - - jr nz, fshparsecommandCheckEnd 26 D1:B0F9 3E 00 - - ld a, $00 27 D1:B0FB CD 24 B2 D1 call fshparsecommandCopyChar 28 D1:B0FF 0E 00 - - ld c, 0 29 D1:B101 04 - - - inc b 30 D1:B102 23 - - - inc hl 31 D1:B103 18 EF - - jr fshparsecommandLoop 32 D1:B105 - - - - 33 D1:B105 - - - - fshparsecommandCheckEnd: 34 D1:B105 FE 00 - - cp $00 ;end of string 35 D1:B107 28 13 - - jr z, fshparsecommandCheckArgStatus 36 D1:B109 - - - - 37 D1:B109 - - - - fshparsecommandLoopEnd: 38 D1:B109 CD 24 B2 D1 call fshparsecommandCopyChar 39 D1:B10D 23 - - - inc hl 40 D1:B10E 0C - - - inc c 41 D1:B10F - - - - 42 D1:B10F 79 - - - ld a, c 43 D1:B110 FE 08 - - cp FshCmdCmdSize 44 D1:B112 20 E0 - - jr nz, fshparsecommandLoop 45 D1:B114 - - - - ;inc hl 46 D1:B114 0E 00 - - ld c, 0 47 D1:B116 04 - - - inc b 48 D1:B117 78 - - - ld a, b 49 D1:B118 FE 05 - - cp 5 50 D1:B11A 20 D8 - - jr nz, fshparsecommandLoop 51 D1:B11C - - - - ; ld bc, 0 52 D1:B11C - - - - 53 D1:B11C - - - - fshparsecommandCheckArgStatus: 54 D1:B11C AF - - - xor a 55 D1:B11D 21 CD EA D0 ld hl, FshCmdArgFlags 56 D1:B121 77 - - - ld (hl), a 57 D1:B122 - - - - fshparsecommandCheckArg0: 58 D1:B122 21 FA B1 D1 ld hl, fshparsecommandArg0 59 D1:B126 7E - - - ld a, (hl) 60 D1:B127 FE 00 - - cp $00 61 D1:B129 28 27 - - jr z, fshparsecommandCheckArg1 62 D1:B12B 21 CD EA D0 ld hl, FshCmdArgFlags 63 D1:B12F CB C6 - - set 0, (hl) 64 D1:B131 7E - - - ld a, (hl) 65 D1:B132 21 FA B1 D1 ld hl, fshparsecommandArg0 66 D1:B136 7E - - - ld a, (hl) 67 D1:B137 D6 30 - - sub '0' 68 D1:B139 FE 0A - - cp '9' - '0' + 1 69 D1:B13B 30 15 - - jr nc, fshparsecommandCheckArg1 70 D1:B13D CD BD AC D1 call strtow 71 D1:B141 11 FA B1 D1 ld de, fshparsecommandArg0 72 D1:B145 EB - - - ex de, hl 73 D1:B146 73 - - - ld (hl), e 74 D1:B147 23 - - - inc hl 75 D1:B148 72 - - - ld (hl), d 76 D1:B149 34 - - - inc (hl) 77 D1:B14A 36 00 - - ld (hl), $00 78 D1:B14C 21 CD EA D0 ld hl, FshCmdArgFlags 79 D1:B150 CB CE - - set 1, (hl) 80 D1:B152 - - - - fshparsecommandCheckArg1: 81 D1:B152 21 03 B2 D1 ld hl, fshparsecommandArg1 82 D1:B156 7E - - - ld a, (hl) 83 D1:B157 FE 00 - - cp $00 84 D1:B159 28 26 - - jr z, fshparsecommandCheckArg2 85 D1:B15B 21 CD EA D0 ld hl, FshCmdArgFlags 86 D1:B15F CB D6 - - set 2, (hl) 87 D1:B161 21 03 B2 D1 ld hl, fshparsecommandArg1 88 D1:B165 7E - - - ld a, (hl) 89 D1:B166 D6 30 - - sub '0' 90 D1:B168 FE 0A - - cp '9' - '0' + 1 91 D1:B16A 30 15 - - jr nc, fshparsecommandCheckArg2 92 D1:B16C CD BD AC D1 call strtow 93 D1:B170 11 03 B2 D1 ld de, fshparsecommandArg1 94 D1:B174 EB - - - ex de, hl 95 D1:B175 73 - - - ld (hl), e 96 D1:B176 23 - - - inc hl 97 D1:B177 72 - - - ld (hl), d 98 D1:B178 23 - - - inc hl 99 D1:B179 36 00 - - ld (hl), $00 100 D1:B17B 21 CD EA D0 ld hl, FshCmdArgFlags 101 D1:B17F CB DE - - set 3, (hl) 102 D1:B181 - - - - fshparsecommandCheckArg2: 103 D1:B181 21 0C B2 D1 ld hl, fshparsecommandArg2 104 D1:B185 7E - - - ld a, (hl) 105 D1:B186 FE 00 - - cp $00 106 D1:B188 28 26 - - jr z, fshparsecommandCheckArg3 107 D1:B18A 21 CD EA D0 ld hl, FshCmdArgFlags 108 D1:B18E CB E6 - - set 4, (hl) 109 D1:B190 21 0C B2 D1 ld hl, fshparsecommandArg2 110 D1:B194 7E - - - ld a, (hl) 111 D1:B195 D6 30 - - sub '0' 112 D1:B197 FE 0A - - cp '9' - '0' + 1 113 D1:B199 30 15 - - jr nc, fshparsecommandCheckArg3 114 D1:B19B CD BD AC D1 call strtow 115 D1:B19F 11 0C B2 D1 ld de, fshparsecommandArg2 116 D1:B1A3 EB - - - ex de, hl 117 D1:B1A4 73 - - - ld (hl), e 118 D1:B1A5 23 - - - inc hl 119 D1:B1A6 72 - - - ld (hl), d 120 D1:B1A7 23 - - - inc hl 121 D1:B1A8 36 00 - - ld (hl), $00 122 D1:B1AA 21 CD EA D0 ld hl, FshCmdArgFlags 123 D1:B1AE CB EE - - set 5, (hl) 124 D1:B1B0 - - - - fshparsecommandCheckArg3: 125 D1:B1B0 21 15 B2 D1 ld hl, fshparsecommandArg3 126 D1:B1B4 7E - - - ld a, (hl) 127 D1:B1B5 FE 00 - - cp $00 128 D1:B1B7 28 26 - - jr z, fshparsecommandCopyBack 129 D1:B1B9 21 CD EA D0 ld hl, FshCmdArgFlags 130 D1:B1BD CB F6 - - set 6, (hl) 131 D1:B1BF 21 15 B2 D1 ld hl, fshparsecommandArg3 132 D1:B1C3 7E - - - ld a, (hl) 133 D1:B1C4 D6 30 - - sub '0' 134 D1:B1C6 FE 0A - - cp '9' - '0' + 1 135 D1:B1C8 30 15 - - jr nc, fshparsecommandCopyBack 136 D1:B1CA CD BD AC D1 call strtow 137 D1:B1CE 11 15 B2 D1 ld de, fshparsecommandArg3 138 D1:B1D2 EB - - - ex de, hl 139 D1:B1D3 73 - - - ld (hl), e 140 D1:B1D4 23 - - - inc hl 141 D1:B1D5 72 - - - ld (hl), d 142 D1:B1D6 23 - - - inc hl 143 D1:B1D7 36 00 - - ld (hl), $00 144 D1:B1D9 21 CD EA D0 ld hl, FshCmdArgFlags 145 D1:B1DD CB FE - - set 7, (hl) 146 D1:B1DF - - - - fshparsecommandCopyBack: 147 D1:B1DF E1 - - - pop hl 148 D1:B1E0 C5 - - - push bc 149 D1:B1E1 EB - - - ex de, hl 150 D1:B1E2 21 F1 B1 D1 ld hl, fshparsecommandCmd 151 D1:B1E6 01 2D 00 00 ld bc, 45 152 D1:B1EA ED B0 - - ldir 153 D1:B1EC C1 - - - pop bc 154 D1:B1ED - - - - 155 D1:B1ED D1 - - - pop de 156 D1:B1EE C1 - - - pop bc 157 D1:B1EF E1 - - - pop hl 158 D1:B1F0 C9 - - - ret 159 D1:B1F1 - - - - 160 D1:B1F1 00 00 00 00 00 00 00 00 00 - - - fshparsecommandCmd: .db $00, $00, $00, $00, $00, $00, $00, $00, $00 161 D1:B1FA 00 00 00 00 00 00 00 00 00 - - - fshparsecommandArg0: .db $00, $00, $00, $00, $00, $00, $00, $00, $00 162 D1:B203 00 00 00 00 00 00 00 00 00 - - - fshparsecommandArg1: .db $00, $00, $00, $00, $00, $00, $00, $00, $00 163 D1:B20C 00 00 00 00 00 00 00 00 00 - - - fshparsecommandArg2: .db $00, $00, $00, $00, $00, $00, $00, $00, $00 164 D1:B215 00 00 00 00 00 00 00 00 00 - - - fshparsecommandArg3: .db $00, $00, $00, $00, $00, $00, $00, $00, $00 165 D1:B21E 00 00 00 00 00 00 - - fshparsecommandOverB: .db $00, $00, $00, $00, $00, $00 166 D1:B224 - - - - 167 D1:B224 - - - - fshparsecommandCopyChar: 168 D1:B224 - - - - ;Copy 169 D1:B224 E5 - - - push hl 170 D1:B225 C5 - - - push bc 171 D1:B226 21 00 00 00 ld hl, 0 172 D1:B22A 60 - - - ld h, b 173 D1:B22B 2E 09 - - ld l, 9 174 D1:B22D 41 - - - ld b, c 175 D1:B22E 11 F1 B1 D1 ld de, fshparsecommandCmd 176 D1:B232 CD 8F AB D1 call array2d 177 D1:B236 C1 - - - pop bc 178 D1:B237 E1 - - - pop hl 179 D1:B238 - - - - ;push hl 180 D1:B238 - - - - ; ld hl, fshparsecommandCmd+45+1 181 D1:B238 - - - - ; call cpHLDE 182 D1:B238 - - - - ;pop hl 183 D1:B238 - - - - ;pop de 184 D1:B238 - - - - ;ret c 185 D1:B238 - - - - ;push de 186 D1:B238 12 - - - ld (de), a ;ld buffer 187 D1:B239 C9 - - - ret Listing for file "/home/pi/Documents/asm/FSH/includes/lib/fsh/fsh.inc" 3 D1:B23A - - - - #include "includes/lib/fsh/FshVar.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/lib/fsh/FshVar.asm" 1 D1:B23A - - - - ;;fshvarset 2 D1:B23A - - - - ;;Sets a Word in FshVars. 3 D1:B23A - - - - ;;Inputs: 4 D1:B23A - - - - ;; HL: 16b 5 D1:B23A - - - - ;; DE: Destination Word Relitive to FshVars 6 D1:B23A - - - - fshvarset: 7 D1:B23A C5 - - - push bc 8 D1:B23B 01 3F 00 00 ld bc, FshVarsSize / 2 - 1 9 D1:B23F CD 77 A9 D1 call cpBCDE 10 D1:B243 C1 - - - pop bc 11 D1:B244 38 11 - - jr c, fshvarsetOOBException 12 D1:B246 C5 - - - push bc 13 D1:B247 D5 - - - push de 14 D1:B248 E5 - - - push hl 15 D1:B249 01 1F EA D0 ld bc, FshVars 16 D1:B24D EB - - - ex de, hl 17 D1:B24E 29 - - - add hl, hl 18 D1:B24F 09 - - - add hl, bc 19 D1:B250 73 - - - ld (hl), e 20 D1:B251 23 - - - inc hl 21 D1:B252 72 - - - ld (hl), d 22 D1:B253 E1 - - - pop hl 23 D1:B254 D1 - - - pop de 24 D1:B255 C1 - - - pop bc 25 D1:B256 C9 - - - ret 26 D1:B257 - - - - fshvarsetOOBException: 27 D1:B257 E5 - - - push hl 28 D1:B258 21 7C B3 D1 ld hl, ErrOutOfBoundso 29 D1:B25C CD 37 B3 D1 call ErrSet 30 D1:B260 E1 - - - pop hl 31 D1:B261 C9 - - - ret 32 D1:B262 - - - - 33 D1:B262 - - - - ;;fshvarget 34 D1:B262 - - - - ;;Gets a Word in FshVars. 35 D1:B262 - - - - ;;Inputs: 36 D1:B262 - - - - ;; DE: Destination Word Relitive to FshVars 37 D1:B262 - - - - ;;Outputs: 38 D1:B262 - - - - ;; HL: Word in (DE) 39 D1:B262 - - - - fshvarget: 40 D1:B262 C5 - - - push bc 41 D1:B263 01 3F 00 00 ld bc, FshVarsSize / 2 - 1 42 D1:B267 CD 77 A9 D1 call cpBCDE 43 D1:B26B C1 - - - pop bc 44 D1:B26C 38 14 - - jr c, fshvargetOOBException 45 D1:B26E C5 - - - push bc 46 D1:B26F D5 - - - push de 47 D1:B270 21 00 00 00 ld hl, 0 48 D1:B274 01 1F EA D0 ld bc, FshVars 49 D1:B278 EB - - - ex de, hl 50 D1:B279 29 - - - add hl, hl 51 D1:B27A 09 - - - add hl, bc 52 D1:B27B 5E - - - ld e, (hl) 53 D1:B27C 23 - - - inc hl 54 D1:B27D 56 - - - ld d, (hl) 55 D1:B27E EB - - - ex de, hl 56 D1:B27F D1 - - - pop de 57 D1:B280 C1 - - - pop bc 58 D1:B281 C9 - - - ret 59 D1:B282 - - - - fshvargetOOBException: 60 D1:B282 E5 - - - push hl 61 D1:B283 21 7C B3 D1 ld hl, ErrOutOfBoundso 62 D1:B287 CD 37 B3 D1 call ErrSet 63 D1:B28B E1 - - - pop hl 64 D1:B28C C9 - - - ret 65 D1:B28D - - - - ;;fshvarcpy 66 D1:B28D - - - - ;;Copies a word. 67 D1:B28D - - - - ;;Inputs: 68 D1:B28D - - - - ;; HL: Byte pointer 69 D1:B28D - - - - ;; DE: Destination 70 D1:B28D - - - - fshvarcpy: 71 D1:B28D C5 - - - push bc 72 D1:B28E 01 3F 00 00 ld bc, FshVarsSize / 2 - 1 73 D1:B292 CD 77 A9 D1 call cpBCDE 74 D1:B296 C1 - - - pop bc 75 D1:B297 38 2A - - jr c, fshvarcpyOOBException 76 D1:B299 C5 - - - push bc 77 D1:B29A 01 40 00 00 ld bc, FshVarsSize / 2 78 D1:B29E CD 72 A9 D1 call cpHLBC 79 D1:B2A2 C1 - - - pop bc 80 D1:B2A3 30 1E - - jr nc, fshvarcpyOOBException 81 D1:B2A5 D5 - - - push de 82 D1:B2A6 E5 - - - push hl 83 D1:B2A7 01 40 00 00 ld bc, FshVarsSize / 2 84 D1:B2AB CD 77 A9 D1 call cpBCDE 85 D1:B2AF 38 12 - - jr c, fshvarcpyOOBException 86 D1:B2B1 01 1F EA D0 ld bc, FshVars 87 D1:B2B5 29 - - - add hl, hl 88 D1:B2B6 09 - - - add hl, bc 89 D1:B2B7 EB - - - ex de, hl 90 D1:B2B8 29 - - - add hl, hl 91 D1:B2B9 09 - - - add hl, bc 92 D1:B2BA 1A - - - ld a, (de) 93 D1:B2BB 77 - - - ld (hl), a 94 D1:B2BC 13 - - - inc de 95 D1:B2BD 23 - - - inc hl 96 D1:B2BE 1A - - - ld a, (de) 97 D1:B2BF 77 - - - ld (hl), a 98 D1:B2C0 E1 - - - pop hl 99 D1:B2C1 D1 - - - pop de 100 D1:B2C2 C9 - - - ret 101 D1:B2C3 - - - - 102 D1:B2C3 - - - - fshvarcpyOOBException: 103 D1:B2C3 E5 - - - push hl 104 D1:B2C4 21 7C B3 D1 ld hl, ErrOutOfBoundso 105 D1:B2C8 CD 37 B3 D1 call ErrSet 106 D1:B2CC E1 - - - pop hl 107 D1:B2CD C9 - - - ret 108 D1:B2CE - - - - 109 D1:B2CE - - - - ;;fshvarreset 110 D1:B2CE - - - - ;;Fills fshvars with $00 111 D1:B2CE - - - - fshvarreset: 112 D1:B2CE E5 - - - push hl 113 D1:B2CF C5 - - - push bc 114 D1:B2D0 D5 - - - push de 115 D1:B2D1 06 00 - - ld b, 0 116 D1:B2D3 11 00 00 00 ld de, 0 117 D1:B2D7 21 00 00 00 ld hl, 0 118 D1:B2DB - - - - fshvarfillLoop: 119 D1:B2DB CD 3A B2 D1 call fshvarset 120 D1:B2DF 04 - - - inc b 121 D1:B2E0 13 - - - inc de 122 D1:B2E1 78 - - - ld a, b 123 D1:B2E2 FE 40 - - cp FshVarsSize / 2 124 D1:B2E4 38 F5 - - jr c, fshvarfillLoop 125 D1:B2E6 D1 - - - pop de 126 D1:B2E7 C1 - - - pop bc 127 D1:B2E8 E1 - - - pop hl 128 D1:B2E9 C9 - - - ret Listing for file "/home/pi/Documents/asm/FSH/includes/lib/fsh/fsh.inc" 4 D1:B2EA - - - - #include "includes/lib/fsh/Err.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/lib/fsh/Err.asm" 1 D1:B2EA - - - - ;;ErrCatch 2 D1:B2EA - - - - ;;Checks err bit and jp to err route 3 D1:B2EA - - - - ErrCatch: 4 D1:B2EA C1 - - - pop bc 5 D1:B2EB E5 - - - push hl 6 D1:B2EC 21 6C A9 D1 ld hl, FshFlags 7 D1:B2F0 CB 4E - - bit 1, (hl) 8 D1:B2F2 E1 - - - pop hl 9 D1:B2F3 C2 F9 B2 D1 jp nz, ErrRoute 10 D1:B2F7 C5 - - - push bc 11 D1:B2F8 C9 - - - ret 12 D1:B2F9 - - - - 13 D1:B2F9 - - - - ;;ErrRoute 14 D1:B2F9 - - - - ;;Routes err codes. 15 D1:B2F9 - - - - ErrRoute: 16 D1:B2F9 - - - - 17 D1:B2F9 21 6C A9 D1 ld hl, FshFlags 18 D1:B2FD CB 8E - - res 1, (hl) 19 D1:B2FF - - - - 20 D1:B2FF 21 CE EA D0 ld hl, FshCmdErrCode 21 D1:B303 - - - - 22 D1:B303 11 46 B3 D1 ld de, ErrCmdNotFoundo 23 D1:B307 CD 35 AA D1 call bytecmp 24 D1:B30B CA 47 B3 D1 jp z, ErrCmdNotFoundf 25 D1:B30F - - - - 26 D1:B30F 11 7C B3 D1 ld de, ErrOutOfBoundso 27 D1:B313 CD 35 AA D1 call bytecmp 28 D1:B317 CA 7D B3 D1 jp z, ErrOutOfBoundsf 29 D1:B31B - - - - 30 D1:B31B 11 A2 B3 D1 ld de, ErrArgso 31 D1:B31F CD 35 AA D1 call bytecmp 32 D1:B323 CA A3 B3 D1 jp z, ErrArgsf 33 D1:B327 - - - - 34 D1:B327 11 CC B3 D1 ld de, ErrUsageo 35 D1:B32B CD 35 AA D1 call bytecmp 36 D1:B32F CA CD B3 D1 jp z, ErrUsagef 37 D1:B333 - - - - 38 D1:B333 C3 F8 B3 D1 jp ErrDefault 39 D1:B337 - - - - 40 D1:B337 - - - - 41 D1:B337 - - - - ;;ErrSet 42 D1:B337 - - - - ;;Sets all things relating to Err codes 43 D1:B337 - - - - ;;Inputs: 44 D1:B337 - - - - ;; HL: Err_____o 45 D1:B337 - - - - ErrSet: 46 D1:B337 E5 - - - push hl 47 D1:B338 7E - - - ld a, (hl) 48 D1:B339 21 CE EA D0 ld hl, FshCmdErrCode 49 D1:B33D 77 - - - ld (hl), a 50 D1:B33E 21 6C A9 D1 ld hl, FshFlags 51 D1:B342 CB CE - - set 1, (hl) 52 D1:B344 E1 - - - pop hl 53 D1:B345 C9 - - - ret 54 D1:B346 - - - - 55 D1:B346 - - - - ;;ERR FUNCS------------------- 56 D1:B346 - - - - 57 D1:B346 01 - - - ErrCmdNotFoundo: .db $01 58 D1:B347 - - - - ErrCmdNotFoundf: 59 D1:B347 21 9F EA D0 ld hl, FshCmd 60 D1:B34B 7E - - - ld a, (hl) 61 D1:B34C FE 00 - - cp $00 62 D1:B34E CA DB A8 D1 jp z, Fin 63 D1:B352 21 6A B3 D1 ld hl, ErrCmdNotFoundt 64 D1:B356 CD C0 07 02 call _PutS 65 D1:B35A 21 9F EA D0 ld hl, FshCmd 66 D1:B35E CD C0 07 02 call _PutS 67 D1:B362 CD F0 07 02 call _NewLine 68 D1:B366 C3 DB A8 D1 jp Fin 69 D1:B36A 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:B37C - - - - 71 D1:B37C 02 - - - ErrOutOfBoundso: .db $02 72 D1:B37D - - - - ErrOutOfBoundsf: 73 D1:B37D 21 8D B3 D1 ld hl, ErrOutOfBoundst 74 D1:B381 CD C0 07 02 call _PutS 75 D1:B385 CD F0 07 02 call _NewLine 76 D1:B389 C3 DB A8 D1 jp Fin 77 D1:B38D 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:B3A2 - - - - 79 D1:B3A2 03 - - - ErrArgso: .db $03 80 D1:B3A3 - - - - ErrArgsf: 81 D1:B3A3 21 B3 B3 D1 ld hl, ErrArgst 82 D1:B3A7 CD C0 07 02 call _PutS 83 D1:B3AB CD F0 07 02 call _NewLine 84 D1:B3AF C3 DB A8 D1 jp Fin 85 D1:B3B3 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:B3CC - - - - 87 D1:B3CC 04 - - - ErrUsageo: .db $04 88 D1:B3CD - - - - ErrUsagef: 89 D1:B3CD 21 E9 B3 D1 ld hl, ErrUsaget 90 D1:B3D1 CD C0 07 02 call _PutS 91 D1:B3D5 21 9F EA D0 ld hl, FshCmd 92 D1:B3D9 CD 09 B6 D1 call manrouteu 93 D1:B3DD CD C0 07 02 call _PutS 94 D1:B3E1 CD F0 07 02 call _NewLine 95 D1:B3E5 C3 DB A8 D1 jp Fin 96 D1:B3E9 65 72 72 6F 72 3A 20 55 73 61 67 65 3A 20 00 - ErrUsaget: .db "error: Usage: ", 0 97 D1:B3F8 - - - - 98 D1:B3F8 - - - - ErrDefault: 99 D1:B3F8 21 04 B4 D1 ld hl, ErrDefaultt 100 D1:B3FC CD C0 07 02 call _PutS 101 D1:B400 C3 F7 A8 D1 jp Exit 102 D1:B404 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:B419 - - - - #include "includes/lib/fsh/Print.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/lib/fsh/Print.asm" 1 D1:B419 - - - - ;;printfshnamelong 2 D1:B419 - - - - ;;prints Name + Varsv + Version to screen 3 D1:B419 - - - - printfshnamelong: 4 D1:B419 E5 - - - push hl 5 D1:B41A 21 FC A8 D1 ld hl, FshName 6 D1:B41E CD C0 07 02 call _PutS 7 D1:B422 3E 20 - - ld a, ' ' 8 D1:B424 CD B8 07 02 call _PutC 9 D1:B428 21 31 A9 D1 ld hl, FshVVars 10 D1:B42C CD C0 07 02 call _PutS 11 D1:B430 3E 20 - - ld a, ' ' 12 D1:B432 CD B8 07 02 call _PutC 13 D1:B436 3E 76 - - ld a, 'v' 14 D1:B438 CD B8 07 02 call _PutC 15 D1:B43C 21 35 A9 D1 ld hl, FshVMajor 16 D1:B440 CD C0 07 02 call _PutS 17 D1:B444 21 3F A9 D1 ld hl, FshVSeparator 18 D1:B448 CD C0 07 02 call _PutS 19 D1:B44C 21 37 A9 D1 ld hl, FshVMinor 20 D1:B450 CD C0 07 02 call _PutS 21 D1:B454 21 3F A9 D1 ld hl, FshVSeparator 22 D1:B458 CD C0 07 02 call _PutS 23 D1:B45C 21 39 A9 D1 ld hl, FshVPatch 24 D1:B460 CD C0 07 02 call _PutS 25 D1:B464 3E 20 - - ld a, ' ' 26 D1:B466 CD B8 07 02 call _PutC 27 D1:B46A 21 3B A9 D1 ld hl, FshVBuild 28 D1:B46E CD C0 07 02 call _PutS 29 D1:B472 E1 - - - pop hl 30 D1:B473 C9 - - - ret 31 D1:B474 - - - - 32 D1:B474 - - - - ;;printmotd 33 D1:B474 - - - - ;;prints the motd to screen 34 D1:B474 - - - - printmotd: 35 D1:B474 CD 19 B4 D1 call printfshnamelong 36 D1:B478 CD F0 07 02 call _NewLine 37 D1:B47C CD F0 07 02 call _NewLine 38 D1:B480 21 41 A9 D1 ld hl, FshMotd2nd 39 D1:B484 CD C0 07 02 call _PutS 40 D1:B488 CD F0 07 02 call _NewLine 41 D1:B48C 21 57 A9 D1 ld hl, FshMotdHelp 42 D1:B490 CD C0 07 02 call _PutS 43 D1:B494 CD F0 07 02 call _NewLine 44 D1:B498 C9 - - - ret Listing for file "/home/pi/Documents/asm/FSH/includes/lib/fsh/fsh.inc" 6 D1:B499 - - - - #include "includes/lib/fsh/Draw.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/lib/fsh/Draw.asm" 1 D1:B499 - - - - ;;drawstatusbar 2 D1:B499 - - - - ;;draws the FSH status bar 3 D1:B499 - - - - drawstatusbar: 4 D1:B499 - - - - ;rgbto565(84, 84, 84) 5 D1:B499 21 AA 52 00 ld hl, $52AA 6 D1:B49D 3E 00 - - ld a, 0 7 D1:B49F 01 1E 00 00 ld bc, 30 8 D1:B4A3 CD 59 AB D1 call drawbar 9 D1:B4A7 - - - - ;rgbto565(0, 159, 209) 10 D1:B4A7 21 FA 04 00 ld hl, $04FA 11 D1:B4AB - - - - ;ld hl, %1111100000000000 12 D1:B4AB EB DD 6B DD 62 EB 21 02 00 00 11 00 00 00 01 00 00 00 0E 00 3E 1E CD 6E AB D1 - - drawrectfilledM(0, 0, 2, 30) Listing for file "/home/pi/Documents/asm/FSH/includes/lib/fsh/Draw.asm" 13 D1:B4C5 CD 50 1A 02 call _DrawBatteryIndicator 14 D1:B4C9 - - - - ;draw name 15 D1:B4C9 FD CB 32 D6 set fracDrawLFont, (iy + fontFlags) 16 D1:B4CD 3E 06 - - ld a, 6 17 D1:B4CF 32 D5 08 D0 ld (penRow), a 18 D1:B4D3 3E 07 - - ld a, 7 19 D1:B4D5 32 D2 08 D0 ld (penCol), a 20 D1:B4D9 21 AA 52 00 ld hl, $52AA 21 D1:B4DD 22 AA 26 D0 ld (drawBGcolor), hl 22 D1:B4E1 21 FF FF 00 ld hl, $ffff 23 D1:B4E5 22 AC 26 D0 ld (drawFGcolor), hl 24 D1:B4E9 21 FC A8 D1 ld hl, FshName 25 D1:B4ED CD 34 08 02 call _VPutS 26 D1:B4F1 21 FF FF 00 ld hl, $ffff 27 D1:B4F5 22 AA 26 D0 ld (drawBGcolor), hl 28 D1:B4F9 21 00 00 00 ld hl, $0000 29 D1:B4FD 22 AC 26 D0 ld (drawFGcolor), hl 30 D1:B501 C9 - - - ret Listing for file "/home/pi/Documents/asm/FSH/includes/lib/fsh/fsh.inc" Listing for file "FSHa.asm" 73 D1:B502 - - - - #include "includes/lib/crypto/crypto.inc" Listing for file "/home/pi/Documents/asm/FSH/includes/lib/crypto/crypto.inc" 1 D1:B502 - - - - #include "includes/lib/crypto/Rot.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/lib/crypto/Rot.asm" 1 D1:B502 - - - - ;;rotletencrypt 2 D1:B502 - - - - ;;Encrypts a string in rot-n (uses $41 to $5B) 3 D1:B502 - - - - ;;Inputs: 4 D1:B502 - - - - ;; HL: string pointer 5 D1:B502 - - - - ;; A: rot-n 6 D1:B502 - - - - ;;Notes: 7 D1:B502 - - - - ;; Changes string in place. 8 D1:B502 - - - - rotletencrypt: 9 D1:B502 E5 - - - push hl 10 D1:B503 C5 - - - push bc 11 D1:B504 - - - - rotletencryptMod: 12 D1:B504 E5 - - - push hl 13 D1:B505 67 - - - ld h, a 14 D1:B506 2E 19 - - ld l, 'Z' + 1 - 'A' - 1 15 D1:B508 CD 99 A9 D1 call modHL 16 D1:B50C 44 - - - ld b, h 17 D1:B50D E1 - - - pop hl 18 D1:B50E - - - - rotletencryptLoop: 19 D1:B50E 7E - - - ld a, (hl) 20 D1:B50F FE 00 - - cp a, $00 21 D1:B511 28 0F - - jr z, rotletencryptEnd 22 D1:B513 FE 20 - - cp a, ' ' 23 D1:B515 28 07 - - jr z, rotletencryptLD 24 D1:B517 80 - - - add a, b 25 D1:B518 FE 5C - - cp a, 'Z' + 2 26 D1:B51A 38 02 - - jr c , rotletencryptLD 27 D1:B51C D6 1B - - sub a, 'Z' + 2 - 'A' 28 D1:B51E - - - - rotletencryptLD: 29 D1:B51E 77 - - - ld (hl), a 30 D1:B51F 23 - - - inc hl 31 D1:B520 18 EC - - jr rotletencryptLoop 32 D1:B522 - - - - rotletencryptEnd: 33 D1:B522 36 00 - - ld (hl), $00 34 D1:B524 C1 - - - pop bc 35 D1:B525 E1 - - - pop hl 36 D1:B526 C9 - - - ret 37 D1:B527 - - - - 38 D1:B527 - - - - ;;rotletdecrypt 39 D1:B527 - - - - ;;Decrypts a string in rot-n (uses $41 to $5B) 40 D1:B527 - - - - ;;Inputs: 41 D1:B527 - - - - ;; HL: string pointer 42 D1:B527 - - - - ;; A: rot-n 43 D1:B527 - - - - ;;Notes: 44 D1:B527 - - - - ;; Changes string in place. 45 D1:B527 - - - - rotletdecrypt: 46 D1:B527 E5 - - - push hl 47 D1:B528 C5 - - - push bc 48 D1:B529 - - - - rotletdecryptMod: 49 D1:B529 E5 - - - push hl 50 D1:B52A 67 - - - ld h, a 51 D1:B52B 2E 19 - - ld l, 'Z' + 1 - 'A' - 1 52 D1:B52D CD 99 A9 D1 call modHL 53 D1:B531 44 - - - ld b, h 54 D1:B532 E1 - - - pop hl 55 D1:B533 - - - - rotletdecryptLoop: 56 D1:B533 7E - - - ld a, (hl) 57 D1:B534 FE 00 - - cp a, $00 58 D1:B536 28 0F - - jr z, rotletdecryptEnd 59 D1:B538 FE 20 - - cp a, ' ' 60 D1:B53A 28 07 - - jr z, rotletdecryptLD 61 D1:B53C 90 - - - sub a, b 62 D1:B53D FE 41 - - cp a, 'A' 63 D1:B53F 30 02 - - jr nc , rotletdecryptLD 64 D1:B541 C6 1B - - add a, 'Z' + 2 - 'A' 65 D1:B543 - - - - rotletdecryptLD: 66 D1:B543 77 - - - ld (hl), a 67 D1:B544 23 - - - inc hl 68 D1:B545 18 EC - - jr rotletdecryptLoop 69 D1:B547 - - - - rotletdecryptEnd: 70 D1:B547 36 00 - - ld (hl), $00 71 D1:B549 C1 - - - pop bc 72 D1:B54A E1 - - - pop hl 73 D1:B54B C9 - - - ret 74 D1:B54C - - - - 75 D1:B54C - - - - ;;rotasciiencrypt 76 D1:B54C - - - - ;;Encrypts a string in rot-x (uses $00 to $EF) 77 D1:B54C - - - - ;;Inputs: 78 D1:B54C - - - - ;; HL: string pointer 79 D1:B54C - - - - ;; A: x 80 D1:B54C - - - - ;;Notes: 81 D1:B54C - - - - ;; Changes string in place. 82 D1:B54C - - - - rotasciiencrypt: 83 D1:B54C E5 - - - push hl 84 D1:B54D C5 - - - push bc 85 D1:B54E 0E 00 - - ld c, 0 86 D1:B550 4F - - - ld c, a 87 D1:B551 - - - - rotasciiencryptLoop: 88 D1:B551 7E - - - ld a, (hl) 89 D1:B552 FE 00 - - cp 0 90 D1:B554 28 13 - - jr z, rotasciiencryptEnd 91 D1:B556 81 - - - add a, c 92 D1:B557 FE 00 - - cp 0 93 D1:B559 20 01 - - jr nz, rotasciiencryptLd 94 D1:B55B 3C - - - inc a 95 D1:B55C - - - - rotasciiencryptLd: 96 D1:B55C 77 - - - ld (hl), a 97 D1:B55D 23 - - - inc hl 98 D1:B55E FE EF - - cp a, $EF 99 D1:B560 38 EF - - jr c, rotasciiencryptLoop 100 D1:B562 2B - - - dec hl 101 D1:B563 D6 0F - - sub a, $0F 102 D1:B565 77 - - - ld (hl), a 103 D1:B566 23 - - - inc hl 104 D1:B567 18 E8 - - jr rotasciiencryptLoop 105 D1:B569 - - - - rotasciiencryptEnd: 106 D1:B569 36 00 - - ld (hl), $00 107 D1:B56B C1 - - - pop bc 108 D1:B56C E1 - - - pop hl 109 D1:B56D C9 - - - ret 110 D1:B56E - - - - 111 D1:B56E - - - - ;;rotasciidecrypt 112 D1:B56E - - - - ;;Encrypts a string in rot-x (uses $00 to $EF) 113 D1:B56E - - - - ;;Inputs: 114 D1:B56E - - - - ;; HL: string pointer 115 D1:B56E - - - - ;; A: x 116 D1:B56E - - - - ;;Notes: 117 D1:B56E - - - - ;; Changes string in place. 118 D1:B56E - - - - rotasciidecrypt: 119 D1:B56E E5 - - - push hl 120 D1:B56F C5 - - - push bc 121 D1:B570 0E 00 - - ld c, 0 122 D1:B572 4F - - - ld c, a 123 D1:B573 - - - - rotasciidecryptLoop: 124 D1:B573 7E - - - ld a, (hl) 125 D1:B574 FE 00 - - cp 0 126 D1:B576 28 13 - - jr z, rotasciidecryptEnd 127 D1:B578 91 - - - sub a, c 128 D1:B579 FE 00 - - cp 0 129 D1:B57B 20 01 - - jr nz, rotasciidecryptLd 130 D1:B57D 3D - - - dec a 131 D1:B57E - - - - rotasciidecryptLd: 132 D1:B57E 77 - - - ld (hl), a 133 D1:B57F 23 - - - inc hl 134 D1:B580 FE EF - - cp a, $EF 135 D1:B582 38 EF - - jr c, rotasciidecryptLoop 136 D1:B584 2B - - - dec hl 137 D1:B585 C6 0F - - add a, $0F 138 D1:B587 77 - - - ld (hl), a 139 D1:B588 23 - - - inc hl 140 D1:B589 18 E8 - - jr rotasciidecryptLoop 141 D1:B58B - - - - rotasciidecryptEnd: 142 D1:B58B 36 00 - - ld (hl), $00 143 D1:B58D C1 - - - pop bc 144 D1:B58E E1 - - - pop hl 145 D1:B58F C9 - - - ret 146 D1:B590 - - - - Listing for file "/home/pi/Documents/asm/FSH/includes/lib/crypto/crypto.inc" 2 D1:B590 - - - - #include "includes/lib/crypto/Xor.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/lib/crypto/Xor.asm" 1 D1:B590 - - - - ;;xorcrypt 2 D1:B590 - - - - ;;crypts a string using xor 3 D1:B590 - - - - ;;Inputs: 4 D1:B590 - - - - ;; HL: string pointer 5 D1:B590 - - - - ;; DE: seed pointer (shorter) 6 D1:B590 - - - - ;;Notes: 7 D1:B590 - - - - ;; Changes string in place. 8 D1:B590 - - - - xorcrypt: 9 D1:B590 E5 - - - push hl 10 D1:B591 D5 - - - push de 11 D1:B592 C5 - - - push bc 12 D1:B593 CD 22 AC D1 call strlen 13 D1:B597 D5 - - - push de 14 D1:B598 E5 - - - push hl 15 D1:B599 21 00 00 00 ld hl, 0 16 D1:B59D 60 - - - ld h, b 17 D1:B59E 69 - - - ld l, c 18 D1:B59F EB - - - ex de, hl 19 D1:B5A0 CD 22 AC D1 call strlen 20 D1:B5A4 EB - - - ex de, hl 21 D1:B5A5 7D - - - ld a, l ;C = len(seed) l=len(string) 22 D1:B5A6 91 - - - sub a,c 23 D1:B5A7 D2 B1 B5 D1 jp nc, xorcryptNSmaller 24 D1:B5AB 0E 01 - - ld c, $01 25 D1:B5AD 3E 00 - - ld a, 0 26 D1:B5AF 2E 00 - - ld l, 0 27 D1:B5B1 - - - - xorcryptNSmaller: 28 D1:B5B1 0D - - - dec c 29 D1:B5B2 D2 B8 B5 D1 jp nc, xorcryptNSmaller2 30 D1:B5B6 0E 00 - - ld c, 0 31 D1:B5B8 - - - - xorcryptNSmaller2: 32 D1:B5B8 41 - - - ld b, c 33 D1:B5B9 4D - - - ld c, l ;b=len(seed) c=len(string) 34 D1:B5BA E1 - - - pop hl 35 D1:B5BB B7 - - - or a, a 36 D1:B5BC D1 - - - pop de 37 D1:B5BD 28 2C - - jr z, xorcryptEnd 38 D1:B5BF D5 - - - push de 39 D1:B5C0 EB - - - ex de, hl; hl=seed 40 D1:B5C1 E1 - - - pop hl 41 D1:B5C2 C5 - - - push bc 42 D1:B5C3 D5 - - - push de 43 D1:B5C4 11 00 00 00 ld de, 0 44 D1:B5C8 58 - - - ld e, b 45 D1:B5C9 01 00 00 00 ld bc, 0 46 D1:B5CD 4B - - - ld c, e 47 D1:B5CE 09 - - - add hl, bc 48 D1:B5CF D1 - - - pop de 49 D1:B5D0 C1 - - - pop bc 50 D1:B5D1 23 - - - inc hl 51 D1:B5D2 36 80 - - ld (hl), %10000000 52 D1:B5D4 C5 - - - push bc 53 D1:B5D5 05 - - - dec b 54 D1:B5D6 3E FF - - ld a, $FF 55 D1:B5D8 B8 - - - cp a, b 56 D1:B5D9 28 0B - - jr z, xorcryptPadLoopEnd 57 D1:B5DB 3E 00 - - ld a, $00 58 D1:B5DD B8 - - - cp a, b 59 D1:B5DE 20 01 - - jr nz, xorcryptPadLoop 60 D1:B5E0 04 - - - inc b 61 D1:B5E1 - - - - xorcryptPadLoop: 62 D1:B5E1 23 - - - inc hl 63 D1:B5E2 36 65 - - ld (hl), 'e' 64 D1:B5E4 10 FB - - djnz xorcryptPadLoop 65 D1:B5E6 - - - - xorcryptPadLoopEnd: 66 D1:B5E6 C1 - - - pop bc 67 D1:B5E7 70 - - - ld (hl), b 68 D1:B5E8 23 - - - inc hl 69 D1:B5E9 36 00 - - ld (hl), $00 70 D1:B5EB - - - - xorcryptEnd: 71 D1:B5EB C1 - - - pop bc 72 D1:B5EC D1 - - - pop de 73 D1:B5ED E1 - - - pop hl 74 D1:B5EE - - - - ;push hl 75 D1:B5EE - - - - ;xorcryptRandLoop: 76 D1:B5EE - - - - ;ld a, (hl) 77 D1:B5EE - - - - ;or a, a 78 D1:B5EE - - - - ;jr z, xorcryptRandLoopEnd 79 D1:B5EE - - - - ;call randomint 80 D1:B5EE - - - - ;or a, a 81 D1:B5EE - - - - ;jr nz, xorcryptRandLoopLD 82 D1:B5EE - - - - ;ld a, '/' 83 D1:B5EE - - - - ;xorcryptRandLoopLD: 84 D1:B5EE - - - - ;ld (hl), a 85 D1:B5EE - - - - ;inc hl 86 D1:B5EE - - - - ;jr xorcryptRandLoop 87 D1:B5EE - - - - ;xorcryptRandLoopEnd: 88 D1:B5EE - - - - ;pop hl 89 D1:B5EE CD 65 AD D1 call strxor 90 D1:B5F2 C9 - - - ret 91 D1:B5F3 - - - - Listing for file "/home/pi/Documents/asm/FSH/includes/lib/crypto/crypto.inc" Listing for file "FSHa.asm" 74 D1:B5F3 - - - - 75 D1:B5F3 - - - - #include "includes/man-db.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/man-db.asm" 1 D1:B5F3 - - - - ;;TODO: move module specific macros to diffrent file 2 D1:B5F3 - - - - ;;manroute 3 D1:B5F3 - - - - ;;routes command string to discription 4 D1:B5F3 - - - - ;;Inputs: 5 D1:B5F3 - - - - ;; HL: Command String 6 D1:B5F3 - - - - ;;Outputs: 7 D1:B5F3 - - - - ;; HL: Command Discription String 8 D1:B5F3 - - - - manroute: 9 D1:B5F3 D5 - - - push de 10 D1:B5F4 - - - - #macro routestrjp(cmdXs, cmdXm) 11 D1:B5F4 ld de, cmdXs 12 D1:B5F4 call strcmp 13 D1:B5F4 ld de, cmdXm 14 D1:B5F4 jp z, manrouteReturn 15 D1:B5F4 #endmacro 16 D1:B5F4 - - - - 17 D1:B5F4 - - - - #macro subroutestrjp(cmdXs, cmdYs, cmdYm) 18 D1:B5F4 push hl 19 D1:B5F4 ld de, cmdXs 20 D1:B5F4 call strcmp 21 D1:B5F4 ld hl, 0 22 D1:B5F4 jr nz, +_ 23 D1:B5F4 ld hl, FshCmdArg1 24 D1:B5F4 _: 25 D1:B5F4 ld de, cmdYs 26 D1:B5F4 call strcmp 27 D1:B5F4 pop hl 28 D1:B5F4 ld de, cmdYm 29 D1:B5F4 jp z, manrouteReturn 30 D1:B5F4 #endmacro 31 D1:B5F4 - - - - 32 D1:B5F4 CD A8 B7 D1 call fshcmdmanroute 33 D1:B5F8 CD EF C0 D1 call cryptocmdmanroute 34 D1:B5FC - - - - ;Extention Point 35 D1:B5FC - - - - 36 D1:B5FC 21 CE EA D0 ld hl, FshCmdErrCode 37 D1:B600 36 01 - - ld (hl), $01 38 D1:B602 11 00 00 00 ld de, $00 39 D1:B606 - - - - manrouteReturn: 40 D1:B606 EB - - - ex de, hl 41 D1:B607 D1 - - - pop de 42 D1:B608 C9 - - - ret 43 D1:B609 - - - - 44 D1:B609 - - - - ;;manrouteu 45 D1:B609 - - - - ;;routes command string to usage 46 D1:B609 - - - - ;;Inputs: 47 D1:B609 - - - - ;; HL: Command String 48 D1:B609 - - - - ;;Outputs: 49 D1:B609 - - - - ;; HL: Command Usage String 50 D1:B609 - - - - manrouteu: 51 D1:B609 D5 - - - push de 52 D1:B60A - - - - #macro routeustrjp(cmdXs, cmdXu) 53 D1:B60A ld de, cmdXs 54 D1:B60A call strcmp 55 D1:B60A ld de, cmdXu 56 D1:B60A jp z, manrouteuReturn 57 D1:B60A #endmacro 58 D1:B60A - - - - 59 D1:B60A - - - - #macro subrouteustrjp(cmdXs, cmdYs, cmdYu) 60 D1:B60A push hl 61 D1:B60A ld de, cmdXs 62 D1:B60A call strcmp 63 D1:B60A ld hl, 0 64 D1:B60A jr nz, +_ 65 D1:B60A ld hl, FshCmdArg1 66 D1:B60A _: 67 D1:B60A ld de, cmdYs 68 D1:B60A call strcmp 69 D1:B60A pop hl 70 D1:B60A ld de, cmdYu 71 D1:B60A jp z, manrouteuReturn 72 D1:B60A #endmacro 73 D1:B60A - - - - 74 D1:B60A CD 5B B8 D1 call fshcmdmanrouteu 75 D1:B60E CD EA C1 D1 call cryptocmdmanrouteu 76 D1:B612 - - - - ;Extention Point 77 D1:B612 - - - - 78 D1:B612 21 CE EA D0 ld hl, FshCmdErrCode 79 D1:B616 36 01 - - ld (hl), $01 80 D1:B618 11 00 00 00 ld de, $00 81 D1:B61C - - - - manrouteuReturn: 82 D1:B61C EB - - - ex de, hl 83 D1:B61D D1 - - - pop de 84 D1:B61E C9 - - - ret Listing for file "FSHa.asm" 76 D1:B61F - - - - #include "includes/Command.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/Command.asm" 1 D1:B61F - - - - ;;Commanddecode 2 D1:B61F - - - - ;;Decodes all commands. 3 D1:B61F - - - - ;;Inputs: 4 D1:B61F - - - - ;; HL: Cmd String mem loc 5 D1:B61F - - - - ;; DE: Op code mem loc 6 D1:B61F - - - - ;;Output: 7 D1:B61F - - - - ;; Sets (DE) with command op code 8 D1:B61F - - - - commanddecode: 9 D1:B61F CD 44 B6 D1 call fshcmddecode 10 D1:B623 CD AB C0 D1 call cryptocmddecode 11 D1:B627 - - - - ;Extention Point 12 D1:B627 - - - - 13 D1:B627 C9 - - - ret 14 D1:B628 - - - - 15 D1:B628 - - - - ;;commandroute 16 D1:B628 - - - - ;;Routes all commamds. 17 D1:B628 - - - - ;;Inputs: 18 D1:B628 - - - - ;; HL: Op code mem loc 19 D1:B628 - - - - commandroute: 20 D1:B628 CD 21 B7 D1 call fshcmdroute 21 D1:B62C CD D4 C0 D1 call cryptocmdroute 22 D1:B630 - - - - ;Extention Point 23 D1:B630 - - - - 24 D1:B630 21 46 B3 D1 ld hl, ErrCmdNotFoundo 25 D1:B634 11 CE EA D0 ld de, FshCmdErrCode 26 D1:B638 CD 3D AA D1 call bytecpy 27 D1:B63C CD 37 B3 D1 call ErrSet 28 D1:B640 C3 DF A8 D1 jp Err 29 D1:B644 - - - - 30 D1:B644 - - - - #include "includes/FshCommands/FshCommand.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/FshCommand.asm" 1 D1:B644 - - - - fshcmddecode: 2 D1:B644 E5 D5 11 0E B9 D1 CD 33 AC D1 21 13 B9 D1 D1 CC 3D AA D1 E1 decodecmdopt(fshcmdEXIT, fshcmdEXITo) Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/FshCommand.asm" 3 D1:B658 E5 D5 11 27 B9 D1 CD 33 AC D1 21 2B B9 D1 D1 CC 3D AA D1 E1 decodecmdopt(fshcmdSET, fshcmdSETo) 4 D1:B66C E5 D5 11 1E BA D1 CD 33 AC D1 21 23 BA D1 D1 CC 3D AA D1 E1 decodecmdopt(fshcmdCOPY, fshcmdCOPYo) 5 D1:B680 E5 D5 11 2C BB D1 CD 33 AC D1 21 31 BB D1 D1 CC 3D AA D1 E1 decodecmdopt(fshcmdMOVE, fshcmdMOVEo) 6 D1:B694 E5 D5 11 42 BC D1 CD 33 AC D1 21 46 BC D1 D1 CC 3D AA D1 E1 decodecmdopt(fshcmdCLS, fshcmdCLSo) 7 D1:B6A8 E5 D5 11 6E BC D1 CD 33 AC D1 21 72 BC D1 D1 CC 3D AA D1 E1 decodecmdopt(fshcmdVAR, fshcmdVARo) 8 D1:B6BC E5 D5 11 10 BD D1 CD 33 AC D1 21 15 BD D1 D1 CC 3D AA D1 E1 decodecmdopt(fshcmdVARS, fshcmdVARSo) 9 D1:B6D0 E5 D5 11 80 BD D1 CD 33 AC D1 21 86 BD D1 D1 CC 3D AA D1 E1 decodecmdopt(fshcmdSLEEP, fshcmdSLEEPo) 10 D1:B6E4 E5 D5 11 CE BD D1 CD 33 AC D1 21 D3 BD D1 D1 CC 3D AA D1 E1 decodecmdopt(fshcmdINFO, fshcmdINFOo) 11 D1:B6F8 E5 D5 11 70 BE D1 CD 33 AC D1 21 75 BE D1 D1 CC 3D AA D1 E1 decodecmdopt(fshcmdHELP, fshcmdHELPo) 12 D1:B70C E5 D5 11 C3 BF D1 CD 33 AC D1 21 C7 BF D1 D1 CC 3D AA D1 E1 decodecmdopt(fshcmdMAN, fshcmdMANo) 13 D1:B720 C9 - - - ret 14 D1:B721 - - - - 15 D1:B721 - - - - fshcmdroute: 16 D1:B721 C1 - - - pop bc ;pop the ret loc from stack into bc 17 D1:B722 11 13 B9 D1 CD 35 AA D1 CA 23 B9 D1 routeoptjp(fshcmdEXITo, fshcmdEXITf) 18 D1:B72E 11 2B B9 D1 CD 35 AA D1 CA 69 B9 D1 routeoptjp(fshcmdSETo, fshcmdSETf) 19 D1:B73A 11 23 BA D1 CD 35 AA D1 CA 7E BA D1 routeoptjp(fshcmdCOPYo, fshcmdCOPYf) 20 D1:B746 11 31 BB D1 CD 35 AA D1 CA 8B BB D1 routeoptjp(fshcmdMOVEo, fshcmdMOVEf) 21 D1:B752 11 46 BC D1 CD 35 AA D1 CA 5D BC D1 routeoptjp(fshcmdCLSo, fshcmdCLSf) 22 D1:B75E 11 72 BC D1 CD 35 AA D1 CA A9 BC D1 routeoptjp(fshcmdVARo, fshcmdVARf) 23 D1:B76A 11 15 BD D1 CD 35 AA D1 CA 31 BD D1 routeoptjp(fshcmdVARSo, fshcmdVARSf) 24 D1:B776 11 86 BD D1 CD 35 AA D1 CA B7 BD D1 routeoptjp(fshcmdSLEEPo, fshcmdSLEEPf) 25 D1:B782 11 D3 BD D1 CD 35 AA D1 CA FF BD D1 routeoptjp(fshcmdINFOo, fshcmdINFOf) 26 D1:B78E 11 75 BE D1 CD 35 AA D1 CA 91 BE D1 routeoptjp(fshcmdHELPo, fshcmdHELPf) 27 D1:B79A 11 C7 BF D1 CD 35 AA D1 CA F4 BF D1 routeoptjp(fshcmdMANo, fshcmdMANf) 28 D1:B7A6 C5 - - - push bc ;put ret location back on stack 29 D1:B7A7 C9 - - - ret 30 D1:B7A8 - - - - 31 D1:B7A8 - - - - fshcmdmanroute: 32 D1:B7A8 C1 - - - pop bc 33 D1:B7A9 11 0E B9 D1 CD 33 AC D1 11 14 B9 D1 CA 06 B6 D1 routestrjp(fshcmdEXIT, fshCmdEXITm) 34 D1:B7B9 11 27 B9 D1 CD 33 AC D1 11 2C B9 D1 CA 06 B6 D1 routestrjp(fshcmdSET, fshCmdSETm) 35 D1:B7C9 11 1E BA D1 CD 33 AC D1 11 24 BA D1 CA 06 B6 D1 routestrjp(fshcmdCOPY, fshCmdCOPYm) 36 D1:B7D9 11 2C BB D1 CD 33 AC D1 11 32 BB D1 CA 06 B6 D1 routestrjp(fshcmdMOVE, fshCmdMOVEm) 37 D1:B7E9 11 42 BC D1 CD 33 AC D1 11 47 BC D1 CA 06 B6 D1 routestrjp(fshcmdCLS, fshCmdCLSm) 38 D1:B7F9 11 6E BC D1 CD 33 AC D1 11 73 BC D1 CA 06 B6 D1 routestrjp(fshcmdVAR, fshCmdVARm) 39 D1:B809 11 10 BD D1 CD 33 AC D1 11 16 BD D1 CA 06 B6 D1 routestrjp(fshcmdVARS, fshCmdVARSm) 40 D1:B819 11 80 BD D1 CD 33 AC D1 11 87 BD D1 CA 06 B6 D1 routestrjp(fshcmdSLEEP, fshCmdSLEEPm) 41 D1:B829 11 CE BD D1 CD 33 AC D1 11 D4 BD D1 CA 06 B6 D1 routestrjp(fshcmdINFO, fshCmdINFOm) 42 D1:B839 11 70 BE D1 CD 33 AC D1 11 76 BE D1 CA 06 B6 D1 routestrjp(fshcmdHELP, fshCmdHELPm) 43 D1:B849 11 C3 BF D1 CD 33 AC D1 11 C8 BF D1 CA 06 B6 D1 routestrjp(fshcmdMAN, fshCmdMANm) 44 D1:B859 C5 - - - push bc 45 D1:B85A C9 - - - ret 46 D1:B85B - - - - 47 D1:B85B - - - - fshcmdmanrouteu: 48 D1:B85B C1 - - - pop bc 49 D1:B85C 11 0E B9 D1 CD 33 AC D1 11 1E B9 D1 CA 1C B6 D1 routeustrjp(fshcmdEXIT, fshCmdEXITu) 50 D1:B86C 11 27 B9 D1 CD 33 AC D1 11 47 B9 D1 CA 1C B6 D1 routeustrjp(fshcmdSET, fshCmdSETu) 51 D1:B87C 11 1E BA D1 CD 33 AC D1 11 52 BA D1 CA 1C B6 D1 routeustrjp(fshcmdCOPY, fshCmdCOPYu) 52 D1:B88C 11 2C BB D1 CD 33 AC D1 11 5F BB D1 CA 1C B6 D1 routeustrjp(fshcmdMOVE, fshCmdMOVEu) 53 D1:B89C 11 42 BC D1 CD 33 AC D1 11 59 BC D1 CA 1C B6 D1 routeustrjp(fshcmdCLS, fshCmdCLSu) 54 D1:B8AC 11 6E BC D1 CD 33 AC D1 11 94 BC D1 CA 1C B6 D1 routeustrjp(fshcmdVAR, fshCmdVARu) 55 D1:B8BC 11 10 BD D1 CD 33 AC D1 11 2C BD D1 CA 1C B6 D1 routeustrjp(fshcmdVARS, fshCmdVARSu) 56 D1:B8CC 11 80 BD D1 CD 33 AC D1 11 B1 BD D1 CA 1C B6 D1 routeustrjp(fshcmdSLEEP, fshCmdSLEEPu) 57 D1:B8DC 11 CE BD D1 CD 33 AC D1 11 FA BD D1 CA 1C B6 D1 routeustrjp(fshcmdINFO, fshCmdINFOu) 58 D1:B8EC 11 70 BE D1 CD 33 AC D1 11 8C BE D1 CA 1C B6 D1 routeustrjp(fshcmdHELP, fshCmdHELPu) 59 D1:B8FC 11 C3 BF D1 CD 33 AC D1 11 E6 BF D1 CA 1C B6 D1 routeustrjp(fshcmdMAN, fshCmdMANu) 60 D1:B90C C5 - - - push bc 61 D1:B90D C9 - - - ret 62 D1:B90E - - - - 63 D1:B90E - - - - #include "includes/FshCommands/FshCommands.inc" Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/FshCommands.inc" 1 D1:B90E - - - - #include "includes/FshCommands/EXIT.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/EXIT.asm" 1 D1:B90E 45 58 49 54 00 - - - fshcmdEXIT: .db "EXIT", 0 2 D1:B913 FF - - - fshcmdEXITo: .db $FF 3 D1:B914 45 78 69 74 73 20 46 73 68 00 - - fshcmdEXITm: .db "Exits Fsh", 0 4 D1:B91E 45 58 49 54 00 - - - fshcmdEXITu: .db "EXIT", 0 5 D1:B923 C3 E3 A8 D1 fshcmdEXITf: JP Cleanup Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/FshCommands.inc" 2 D1:B927 - - - - #include "includes/FshCommands/SET.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/SET.asm" 1 D1:B927 53 45 54 00 fshcmdSET: .db "SET", 0 2 D1:B92B 01 - - - fshcmdSETo: .db $01 3 D1:B92C 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:B947 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 ", 0 5 D1:B969 - - - - fshcmdSETf: 6 D1:B969 - - - - fshcmdSETfArg0: 7 D1:B969 21 CD EA D0 ld hl, FshCmdArgFlags 8 D1:B96D CB 4E - - bit 1, (hl) 9 D1:B96F 20 34 - - jr nz, fshcmdSETfArg1 10 D1:B971 CB 46 - - bit 0, (hl) 11 D1:B973 28 0C - - jr z, fshcmdSETfArg0Get 12 D1:B975 21 CC B3 D1 ld hl, ErrUsageo 13 D1:B979 CD 37 B3 D1 call ErrSet 14 D1:B97D CD EA B2 D1 call ErrCatch 15 D1:B981 - - - - fshcmdSETfArg0Get: 16 D1:B981 21 08 BA D1 ld hl, fshcmdSETfDIndex 17 D1:B985 CD FB AA D1 call printprompt 18 D1:B989 21 02 BA D1 ld hl, fshcmdSETfInputBuffer 19 D1:B98D 11 03 00 00 ld de, 3 20 D1:B991 CD BB AF D1 call inputnumstr 21 D1:B995 CD BD AC D1 call strtow 22 D1:B999 11 A8 EA D0 ld de, FshCmdArg0 23 D1:B99D EB - - - ex de, hl 24 D1:B99E 73 - - - ld (hl), e 25 D1:B99F 23 - - - inc hl 26 D1:B9A0 72 - - - ld (hl), d 27 D1:B9A1 CD F0 07 02 call _NewLine 28 D1:B9A5 - - - - fshcmdSETfArg1: 29 D1:B9A5 21 CD EA D0 ld hl, FshCmdArgFlags 30 D1:B9A9 CB 5E - - bit 3, (hl) 31 D1:B9AB 20 34 - - jr nz, fshcmdSETfExe 32 D1:B9AD CB 56 - - bit 2, (hl) 33 D1:B9AF 28 0C - - jr z, fshcmdSETfArg1Get 34 D1:B9B1 21 CC B3 D1 ld hl, ErrUsageo 35 D1:B9B5 CD 37 B3 D1 call ErrSet 36 D1:B9B9 CD EA B2 D1 call ErrCatch 37 D1:B9BD - - - - fshcmdSETfArg1Get: 38 D1:B9BD 21 16 BA D1 ld hl, fshcmdSETfDValue 39 D1:B9C1 CD FB AA D1 call printprompt 40 D1:B9C5 21 02 BA D1 ld hl, fshcmdSETfInputBuffer 41 D1:B9C9 11 05 00 00 ld de, 5 42 D1:B9CD CD BB AF D1 call inputnumstr 43 D1:B9D1 CD BD AC D1 call strtow 44 D1:B9D5 EB - - - ex de, hl 45 D1:B9D6 21 B1 EA D0 ld hl, FshCmdArg1 46 D1:B9DA 73 - - - ld (hl), e 47 D1:B9DB 23 - - - inc hl 48 D1:B9DC 72 - - - ld (hl), d 49 D1:B9DD CD F0 07 02 call _NewLine 50 D1:B9E1 - - - - fshcmdSETfExe: 51 D1:B9E1 21 A8 EA D0 ld hl, FshCmdArg0 52 D1:B9E5 11 00 00 00 ld de, 0 53 D1:B9E9 5E - - - ld e, (hl) 54 D1:B9EA 23 - - - inc hl 55 D1:B9EB 56 - - - ld d, (hl) 56 D1:B9EC D5 - - - push de 57 D1:B9ED 21 B1 EA D0 ld hl, FshCmdArg1 58 D1:B9F1 5E - - - ld e, (hl) 59 D1:B9F2 23 - - - inc hl 60 D1:B9F3 56 - - - ld d, (hl) 61 D1:B9F4 EB - - - ex de, hl 62 D1:B9F5 D1 - - - pop de 63 D1:B9F6 CD 3A B2 D1 call fshvarset 64 D1:B9FA CD EA B2 D1 call ErrCatch 65 D1:B9FE C3 DB A8 D1 jp Fin 66 D1:BA02 - - - - 67 D1:BA02 00 00 00 00 00 00 - - fshcmdSETfInputBuffer: .db $00, $00, $00, $00, $00, $00 68 D1:BA08 44 65 73 74 69 6E 61 74 69 6F 6E 3D 20 00 - - fshcmdSETfDIndex: .db "Destination= ", 0 69 D1:BA16 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:BA1E - - - - #include "includes/FshCommands/COPY.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/COPY.asm" 1 D1:BA1E 43 4F 50 59 00 - - - fshcmdCOPY: .db "COPY", 0 2 D1:BA23 02 - - - fshcmdCOPYo: .db $02 3 D1:BA24 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:BA52 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 ", 0 5 D1:BA7E - - - - fshcmdCOPYf: 6 D1:BA7E - - - - fshcmdCOPYfArg0: 7 D1:BA7E 21 CD EA D0 ld hl, FshCmdArgFlags 8 D1:BA82 CB 4E - - bit 1, (hl) 9 D1:BA84 20 31 - - jr nz, fshcmdCOPYfArg1 10 D1:BA86 CB 46 - - bit 0, (hl) 11 D1:BA88 28 0C - - jr z, fshcmdCOPYfArg0Get 12 D1:BA8A 21 CC B3 D1 ld hl, ErrUsageo 13 D1:BA8E CD 37 B3 D1 call ErrSet 14 D1:BA92 CD EA B2 D1 call ErrCatch 15 D1:BA96 - - - - fshcmdCOPYfArg0Get: 16 D1:BA96 21 15 BB D1 ld hl, fshcmdCOPYfDSource 17 D1:BA9A CD FB AA D1 call printprompt 18 D1:BA9E 21 11 BB D1 ld hl, fshcmdCOPYfInputBuffer 19 D1:BAA2 11 03 00 00 ld de, 3 20 D1:BAA6 CD BB AF D1 call inputnumstr 21 D1:BAAA CD 60 AC D1 call strtob 22 D1:BAAE 21 A8 EA D0 ld hl, FshCmdArg0 23 D1:BAB2 77 - - - ld (hl), a 24 D1:BAB3 CD F0 07 02 call _NewLine 25 D1:BAB7 - - - - fshcmdCOPYfArg1: 26 D1:BAB7 21 CD EA D0 ld hl, FshCmdArgFlags 27 D1:BABB CB 5E - - bit 3, (hl) 28 D1:BABD 20 31 - - jr nz, fshcmdCOPYfExe 29 D1:BABF CB 56 - - bit 2, (hl) 30 D1:BAC1 28 0C - - jr z, fshcmdCOPYfArg1Get 31 D1:BAC3 21 CC B3 D1 ld hl, ErrUsageo 32 D1:BAC7 CD 37 B3 D1 call ErrSet 33 D1:BACB CD EA B2 D1 call ErrCatch 34 D1:BACF - - - - fshcmdCOPYfArg1Get: 35 D1:BACF 21 15 BB D1 ld hl, fshcmdCOPYfDSource 36 D1:BAD3 CD FB AA D1 call printprompt 37 D1:BAD7 21 11 BB D1 ld hl, fshcmdCOPYfInputBuffer 38 D1:BADB 11 03 00 00 ld de, 3 39 D1:BADF CD BB AF D1 call inputnumstr 40 D1:BAE3 CD 60 AC D1 call strtob 41 D1:BAE7 21 B1 EA D0 ld hl, FshCmdArg1 42 D1:BAEB 77 - - - ld (hl), a 43 D1:BAEC CD F0 07 02 call _NewLine 44 D1:BAF0 - - - - fshcmdCOPYfExe: 45 D1:BAF0 21 A8 EA D0 ld hl, FshCmdArg0 46 D1:BAF4 11 00 00 00 ld de, 0 47 D1:BAF8 5E - - - ld e, (hl) 48 D1:BAF9 EB - - - ex de, hl 49 D1:BAFA E5 - - - push hl 50 D1:BAFB 21 B1 EA D0 ld hl, FshCmdArg1 51 D1:BAFF 11 00 00 00 ld de, 0 52 D1:BB03 5E - - - ld e, (hl) 53 D1:BB04 E1 - - - pop hl 54 D1:BB05 CD 8D B2 D1 call fshvarcpy 55 D1:BB09 CD EA B2 D1 call ErrCatch 56 D1:BB0D C3 DB A8 D1 jp Fin 57 D1:BB11 - - - - 58 D1:BB11 00 00 00 00 fshcmdCOPYfInputBuffer: .db $00, $00, $00, $00 59 D1:BB15 53 6F 75 72 63 65 3D 20 00 - - - fshcmdCOPYfDSource: .db "Source= ", 0 60 D1:BB1E 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:BB2C - - - - #include "includes/FshCommands/MOVE.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/MOVE.asm" 1 D1:BB2C 4D 4F 56 45 00 - - - fshcmdMOVE: .db "MOVE", 0 2 D1:BB31 03 - - - fshcmdMOVEo: .db $03 3 D1:BB32 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:BB5F 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 ", 0 5 D1:BB8B - - - - fshcmdMOVEf: 6 D1:BB8B - - - - fshcmdMOVEfArg0: 7 D1:BB8B 21 CD EA D0 ld hl, FshCmdArgFlags 8 D1:BB8F CB 4E - - bit 1, (hl) 9 D1:BB91 20 31 - - jr nz, fshcmdMOVEfArg1 10 D1:BB93 CB 46 - - bit 0, (hl) 11 D1:BB95 28 0C - - jr z, fshcmdMOVEfArg0Get 12 D1:BB97 21 CC B3 D1 ld hl, ErrUsageo 13 D1:BB9B CD 37 B3 D1 call ErrSet 14 D1:BB9F CD EA B2 D1 call ErrCatch 15 D1:BBA3 - - - - fshcmdMOVEfArg0Get: 16 D1:BBA3 21 2B BC D1 ld hl, fshcmdMOVEfDSource 17 D1:BBA7 CD FB AA D1 call printprompt 18 D1:BBAB 21 27 BC D1 ld hl, fshcmdMOVEfInputBuffer 19 D1:BBAF 11 03 00 00 ld de, 3 20 D1:BBB3 CD BB AF D1 call inputnumstr 21 D1:BBB7 CD 60 AC D1 call strtob 22 D1:BBBB 21 A8 EA D0 ld hl, FshCmdArg0 23 D1:BBBF 77 - - - ld (hl), a 24 D1:BBC0 CD F0 07 02 call _NewLine 25 D1:BBC4 - - - - fshcmdMOVEfArg1: 26 D1:BBC4 21 CD EA D0 ld hl, FshCmdArgFlags 27 D1:BBC8 CB 5E - - bit 3, (hl) 28 D1:BBCA 20 31 - - jr nz, fshcmdMOVEfExe 29 D1:BBCC CB 56 - - bit 2, (hl) 30 D1:BBCE 28 0C - - jr z, fshcmdMOVEfArg1Get 31 D1:BBD0 21 CC B3 D1 ld hl, ErrUsageo 32 D1:BBD4 CD 37 B3 D1 call ErrSet 33 D1:BBD8 CD EA B2 D1 call ErrCatch 34 D1:BBDC - - - - fshcmdMOVEfArg1Get: 35 D1:BBDC 21 34 BC D1 ld hl, fshcmdMOVEfDDestination 36 D1:BBE0 CD FB AA D1 call printprompt 37 D1:BBE4 21 27 BC D1 ld hl, fshcmdMOVEfInputBuffer 38 D1:BBE8 11 03 00 00 ld de, 3 39 D1:BBEC CD BB AF D1 call inputnumstr 40 D1:BBF0 CD 60 AC D1 call strtob 41 D1:BBF4 21 B1 EA D0 ld hl, FshCmdArg1 42 D1:BBF8 77 - - - ld (hl), a 43 D1:BBF9 CD F0 07 02 call _NewLine 44 D1:BBFD - - - - fshcmdMOVEfExe: 45 D1:BBFD 21 A8 EA D0 ld hl, FshCmdArg0 46 D1:BC01 11 00 00 00 ld de, 0 47 D1:BC05 5E - - - ld e, (hl) 48 D1:BC06 EB - - - ex de, hl 49 D1:BC07 E5 - - - push hl 50 D1:BC08 21 B1 EA D0 ld hl, FshCmdArg1 51 D1:BC0C 11 00 00 00 ld de, 0 52 D1:BC10 5E - - - ld e, (hl) 53 D1:BC11 E1 - - - pop hl 54 D1:BC12 CD 8D B2 D1 call fshvarcpy 55 D1:BC16 EB - - - ex de, hl 56 D1:BC17 21 00 00 00 ld hl, 0 57 D1:BC1B CD 3A B2 D1 call fshvarset 58 D1:BC1F CD EA B2 D1 call ErrCatch 59 D1:BC23 C3 DB A8 D1 jp Fin 60 D1:BC27 - - - - 61 D1:BC27 00 00 00 00 fshcmdMOVEfInputBuffer: .db $00, $00, $00, $00 62 D1:BC2B 53 6F 75 72 63 65 3D 20 00 - - - fshcmdMOVEfDSource: .db "Source= ", 0 63 D1:BC34 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:BC42 - - - - #include "includes/FshCommands/CLS.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/CLS.asm" 1 D1:BC42 43 4C 53 00 fshcmdCLS: .db "CLS", 0 2 D1:BC46 10 - - - fshcmdCLSo: .db $10 3 D1:BC47 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:BC59 43 4C 53 00 fshcmdCLSu: .db "CLS", 0 5 D1:BC5D - - - - fshcmdCLSf: 6 D1:BC5D CD 08 08 02 call _ClrLCDFull 7 D1:BC61 AF - - - xor a 8 D1:BC62 32 95 05 D0 ld (CurRow), a 9 D1:BC66 32 96 05 D0 ld (CurCol), a 10 D1:BC6A C3 DB A8 D1 jp Fin Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/FshCommands.inc" 6 D1:BC6E - - - - #include "includes/FshCommands/VAR.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/VAR.asm" 1 D1:BC6E 56 41 52 00 fshcmdVAR: .db "VAR", 0 2 D1:BC72 11 - - - fshcmdVARo: .db $11 3 D1:BC73 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:BC94 56 41 52 20 3C 73 6F 75 72 63 65 20 61 64 64 72 65 73 73 3E 00 - - - fshcmdVARu: .db "VAR ", 0 5 D1:BCA9 - - - - fshcmdVARf: 6 D1:BCA9 - - - - fshcmdVARfArg0: 7 D1:BCA9 21 CD EA D0 ld hl, FshCmdArgFlags 8 D1:BCAD CB 4E - - bit 1, (hl) 9 D1:BCAF 20 34 - - jr nz, fshcmdVARfExe 10 D1:BCB1 CB 46 - - bit 0, (hl) 11 D1:BCB3 28 0C - - jr z, fshcmdVARfArg0Get 12 D1:BCB5 21 CC B3 D1 ld hl, ErrUsageo 13 D1:BCB9 CD 37 B3 D1 call ErrSet 14 D1:BCBD CD EA B2 D1 call ErrCatch 15 D1:BCC1 - - - - fshcmdVARfArg0Get: 16 D1:BCC1 21 08 BD D1 ld hl, fshcmdVARfDIndex 17 D1:BCC5 CD FB AA D1 call printprompt 18 D1:BCC9 21 04 BD D1 ld hl, fshcmdVARfInputBuffer 19 D1:BCCD 11 03 00 00 ld de, 3 20 D1:BCD1 CD BB AF D1 call inputnumstr 21 D1:BCD5 CD BD AC D1 call strtow 22 D1:BCD9 11 A8 EA D0 ld de, FshCmdArg0 23 D1:BCDD EB - - - ex de, hl 24 D1:BCDE 73 - - - ld (hl), e 25 D1:BCDF 23 - - - inc hl 26 D1:BCE0 72 - - - ld (hl), d 27 D1:BCE1 CD F0 07 02 call _NewLine 28 D1:BCE5 - - - - fshcmdVARfExe: 29 D1:BCE5 21 A8 EA D0 ld hl, FshCmdArg0 30 D1:BCE9 11 00 00 00 ld de, 0 31 D1:BCED 5E - - - ld e, (hl) 32 D1:BCEE 23 - - - inc hl 33 D1:BCEF 56 - - - ld d, (hl) 34 D1:BCF0 CD 62 B2 D1 call fshvarget 35 D1:BCF4 CD EA B2 D1 call ErrCatch 36 D1:BCF8 CD BC 07 02 call _DispHL_s 37 D1:BCFC CD F0 07 02 call _NewLine 38 D1:BD00 C3 DB A8 D1 jp Fin 39 D1:BD04 - - - - 40 D1:BD04 00 00 00 00 fshcmdVARfInputBuffer: .db $00, $00, $00, $00 41 D1:BD08 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:BD10 - - - - #include "includes/FshCommands/VARS.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/VARS.asm" 1 D1:BD10 56 41 52 53 00 - - - fshcmdVARS: .db "VARS", 0 2 D1:BD15 12 - - - fshcmdVARSo: .db $12 3 D1:BD16 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:BD2C 56 41 52 53 00 - - - fshcmdVARSu: .db "VARS", 0 5 D1:BD31 - - - - fshcmdVARSf: 6 D1:BD31 21 CD EA D0 ld hl, FshCmdArgFlags 7 D1:BD35 CB 46 - - bit 0, (hl) 8 D1:BD37 28 0C - - jr z, fshcmdVARSfExe 9 D1:BD39 21 CC B3 D1 ld hl, ErrUsageo 10 D1:BD3D CD 37 B3 D1 call ErrSet 11 D1:BD41 CD EA B2 D1 call ErrCatch 12 D1:BD45 - - - - fshcmdVARSfExe: 13 D1:BD45 06 00 - - ld b, 0 14 D1:BD47 0E 00 - - ld c, 0 15 D1:BD49 11 00 00 00 ld de, 0 16 D1:BD4D - - - - fshcmdVARSfLoop: 17 D1:BD4D CD 62 B2 D1 call fshvarget 18 D1:BD51 7C - - - ld a, h 19 D1:BD52 CD B8 07 02 call _PutC 20 D1:BD56 7D - - - ld a, l 21 D1:BD57 CD B8 07 02 call _PutC 22 D1:BD5B 79 - - - ld a, c 23 D1:BD5C 0C - - - inc c 24 D1:BD5D FE 07 - - cp 7 25 D1:BD5F 20 0E - - jr nz, fshcmdVARSfLoopU 26 D1:BD61 E5 - - - push hl 27 D1:BD62 C5 - - - push bc 28 D1:BD63 D5 - - - push de 29 D1:BD64 CD F0 07 02 call _NewLine 30 D1:BD68 D1 - - - pop de 31 D1:BD69 C1 - - - pop bc 32 D1:BD6A E1 - - - pop hl 33 D1:BD6B 0E 00 - - ld c, 0 34 D1:BD6D 18 06 - - jr fshcmdVARSfLoopEnd 35 D1:BD6F - - - - fshcmdVARSfLoopU: 36 D1:BD6F 3E 5F - - ld a, '_' 37 D1:BD71 CD B8 07 02 call _PutC 38 D1:BD75 - - - - fshcmdVARSfLoopEnd: 39 D1:BD75 04 - - - inc b 40 D1:BD76 13 - - - inc de 41 D1:BD77 78 - - - ld a, b 42 D1:BD78 FE 40 - - cp FshVarsSize / 2 43 D1:BD7A 38 D1 - - jr c, fshcmdVARSfLoop 44 D1:BD7C C3 DB A8 D1 jp Fin Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/FshCommands.inc" 8 D1:BD80 - - - - #include "includes/FshCommands/SLEEP.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/SLEEP.asm" 1 D1:BD80 53 4C 45 45 50 00 - - fshcmdSLEEP: .db "SLEEP", 0 2 D1:BD86 16 - - - fshcmdSLEEPo: .db $16 3 D1:BD87 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:BDB1 53 4C 45 45 50 00 - - fshcmdSLEEPu: .db "SLEEP", 0 5 D1:BDB7 - - - - fshcmdSLEEPf: 6 D1:BDB7 F3 - - - di 7 D1:BDB8 CD 38 11 02 call _EnableAPD 8 D1:BDBC 3E 01 - - ld a,1 9 D1:BDBE 21 90 05 D0 ld hl,apdSubTimer 10 D1:BDC2 77 - - - ld (hl),a 11 D1:BDC3 23 - - - inc hl 12 D1:BDC4 77 - - - ld (hl),a 13 D1:BDC5 FD CB 08 DE set apdRunning,(iy+apdFlags) 14 D1:BDC9 FB - - - ei 15 D1:BDCA C3 DB A8 D1 jp Fin Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/FshCommands.inc" 9 D1:BDCE - - - - #include "includes/FshCommands/INFO.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/INFO.asm" 1 D1:BDCE 49 4E 46 4F 00 - - - fshcmdINFO: .db "INFO", 0 2 D1:BDD3 20 - - - fshcmdINFOo: .db $20 3 D1:BDD4 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:BDFA 49 4E 46 4F 00 - - - fshcmdINFOu: .db "INFO", 0 5 D1:BDFF - - - - fshcmdINFOf: 6 D1:BDFF 21 CD EA D0 ld hl, FshCmdArgFlags 7 D1:BE03 CB 46 - - bit 0, (hl) 8 D1:BE05 28 0C - - jr z, fshcmdINFOfExe 9 D1:BE07 21 CC B3 D1 ld hl, ErrUsageo 10 D1:BE0B CD 37 B3 D1 call ErrSet 11 D1:BE0F CD EA B2 D1 call ErrCatch 12 D1:BE13 - - - - fshcmdINFOfExe: 13 D1:BE13 CD 08 08 02 call _ClrLCDFull 14 D1:BE17 AF - - - xor a 15 D1:BE18 32 95 05 D0 ld (CurRow), a 16 D1:BE1C 32 96 05 D0 ld (CurCol), a 17 D1:BE20 - - - - 18 D1:BE20 CD 19 B4 D1 call printfshnamelong 19 D1:BE24 CD F0 07 02 call _NewLine 20 D1:BE28 - - - - 21 D1:BE28 21 06 A9 D1 ld hl, FshBy 22 D1:BE2C CD C0 07 02 call _PutS 23 D1:BE30 CD F0 07 02 call _NewLine 24 D1:BE34 - - - - 25 D1:BE34 21 10 A9 D1 ld hl, FshSite 26 D1:BE38 CD C0 07 02 call _PutS 27 D1:BE3C CD F0 07 02 call _NewLine 28 D1:BE40 - - - - 29 D1:BE40 CD F0 07 02 call _NewLine 30 D1:BE44 21 68 BE D1 ld hl, fshcmdINFOfSPS1 31 D1:BE48 CD C0 07 02 call _PutS 32 D1:BE4C 3E 27 - - ld a, $27 33 D1:BE4E CD B8 07 02 call _PutC 34 D1:BE52 21 2B A9 D1 ld hl, PS1 35 D1:BE56 CD C0 07 02 call _PutS 36 D1:BE5A 3E 27 - - ld a, $27 37 D1:BE5C CD B8 07 02 call _PutC 38 D1:BE60 CD F0 07 02 call _NewLine 39 D1:BE64 - - - - 40 D1:BE64 C3 DB A8 D1 jp Fin 41 D1:BE68 - - - - 42 D1:BE68 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:BE70 - - - - #include "includes/FshCommands/HELP.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/HELP.asm" 1 D1:BE70 48 45 4C 50 00 - - - fshcmdHELP: .db "HELP", 0 2 D1:BE75 21 - - - fshcmdHELPo: .db $21 3 D1:BE76 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:BE8C 48 45 4C 50 00 - - - fshcmdHELPu: .db "HELP", 0 5 D1:BE91 - - - - fshcmdHELPf: 6 D1:BE91 21 CD EA D0 ld hl, FshCmdArgFlags 7 D1:BE95 CB 46 - - bit 0, (hl) 8 D1:BE97 28 0C - - jr z, fshcmdHELPfExe 9 D1:BE99 21 CC B3 D1 ld hl, ErrUsageo 10 D1:BE9D CD 37 B3 D1 call ErrSet 11 D1:BEA1 CD EA B2 D1 call ErrCatch 12 D1:BEA5 - - - - fshcmdHELPfExe: 13 D1:BEA5 21 8A BF D1 ld hl, fshcmdHELPfLine1 14 D1:BEA9 CD C0 07 02 call _PutS 15 D1:BEAD CD F0 07 02 call _NewLine 16 D1:BEB1 - - - - 17 D1:BEB1 - - - - #macro fshcmdHELPmRow1(cmdXs) 18 D1:BEB1 xor a 19 D1:BEB1 ld (curCol), a 20 D1:BEB1 ld hl, cmdXs 21 D1:BEB1 call _PutS 22 D1:BEB1 call _NewLine 23 D1:BEB1 #endmacro 24 D1:BEB1 - - - - #macro fshcmdHELPmRow2(cmdXs, cmdYs) 25 D1:BEB1 xor a 26 D1:BEB1 ld (curCol), a 27 D1:BEB1 ld hl, cmdXs 28 D1:BEB1 call _PutS 29 D1:BEB1 ld a, 9 30 D1:BEB1 ld (curcol), a 31 D1:BEB1 ld hl, cmdYs 32 D1:BEB1 call _PutS 33 D1:BEB1 call _NewLine 34 D1:BEB1 #endmacro 35 D1:BEB1 - - - - #macro fshcmdHELPmRow3(cmdXs, cmdYs, cmdZs) 36 D1:BEB1 xor a 37 D1:BEB1 ld (curCol), a 38 D1:BEB1 ld hl, cmdXs 39 D1:BEB1 call _PutS 40 D1:BEB1 ld a, 9 41 D1:BEB1 ld (curcol), a 42 D1:BEB1 ld hl, cmdYs 43 D1:BEB1 call _PutS 44 D1:BEB1 ld a, 19 45 D1:BEB1 ld (curcol), a 46 D1:BEB1 ld hl, cmdZs 47 D1:BEB1 call _PutS 48 D1:BEB1 call _NewLine 49 D1:BEB1 #endmacro 50 D1:BEB1 - - - - 51 D1:BEB1 AF 32 96 05 D0 21 0E B9 D1 CD C0 07 02 3E 09 32 96 05 D0 21 27 B9 D1 CD C0 07 02 3E 13 32 96 05 D0 21 1E 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:BEDE AF 32 96 05 D0 21 2C BB D1 CD C0 07 02 3E 09 32 96 05 D0 21 42 BC D1 CD C0 07 02 3E 13 32 96 05 D0 21 6E BC D1 CD C0 07 02 CD F0 07 02 - - - fshcmdHELPmRow3(fshcmdMOVE, fshcmdCLS, fshcmdVAR) 53 D1:BF0B AF 32 96 05 D0 21 10 BD D1 CD C0 07 02 3E 09 32 96 05 D0 21 80 BD D1 CD C0 07 02 3E 13 32 96 05 D0 21 CE BD D1 CD C0 07 02 CD F0 07 02 - - - fshcmdHELPmRow3(fshcmdVARS, fshcmdSLEEP, fshcmdINFO) 54 D1:BF38 AF 32 96 05 D0 21 70 BE D1 CD C0 07 02 3E 09 32 96 05 D0 21 C3 BF D1 CD C0 07 02 CD F0 07 02 - fshcmdHELPmRow2(fshcmdHELP, fshcmdMAN) 55 D1:BF57 AF 32 96 05 D0 21 E5 C2 D1 CD C0 07 02 3E 09 32 96 05 D0 21 9A C6 D1 CD C0 07 02 CD F0 07 02 - fshcmdHELPmRow2(cryptocmdENCRYPT, cryptocmdDECRYPT) 56 D1:BF76 - - - - ; Extention Point 57 D1:BF76 - - - - 58 D1:BF76 CD F0 07 02 call _NewLine 59 D1:BF7A 21 9E BF D1 ld hl, fshcmdHELPfLine2 60 D1:BF7E CD C0 07 02 call _PutS 61 D1:BF82 CD F0 07 02 call _NewLine 62 D1:BF86 C3 DB A8 D1 jp Fin 63 D1:BF8A - - - - 64 D1:BF8A 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:BF9E 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:BFC3 - - - - #include "includes/FshCommands/MAN.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/FshCommands/MAN.asm" 1 D1:BFC3 4D 41 4E 00 fshcmdMAN: .db "MAN", 0 2 D1:BFC7 22 - - - fshcmdMANo: .db $22 3 D1:BFC8 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:BFE6 4D 41 4E 20 3C 63 6F 6D 6D 61 6E 64 3E 00 - - fshcmdMANu: .db "MAN ", 0 5 D1:BFF4 - - - - fshcmdMANf: 6 D1:BFF4 - - - - fshcmdMANfCheckArgs: 7 D1:BFF4 21 CD EA D0 ld hl, FshCmdArgFlags 8 D1:BFF8 CB 46 - - bit 0, (hl) 9 D1:BFFA 28 10 - - jr z, fshcmdMANfArg0Get 10 D1:BFFC CB 4E - - bit 1, (hl) 11 D1:BFFE 28 24 - - jr z, fshcmdMANfExe 12 D1:C000 21 CC B3 D1 ld hl, ErrUsageo 13 D1:C004 CD 37 B3 D1 call ErrSet 14 D1:C008 CD EA B2 D1 call ErrCatch 15 D1:C00C - - - - fshcmdMANfArg0Get: 16 D1:C00C 21 A1 C0 D1 ld hl, fshcmdMANfPrompt 17 D1:C010 CD FB AA D1 call printprompt 18 D1:C014 - - - - 19 D1:C014 21 A8 EA D0 ld hl, FshCmdArg0 20 D1:C018 11 08 00 00 ld de, FshCmdCmdSize 21 D1:C01C CD 83 AD D1 call inputstr 22 D1:C020 CD F0 07 02 call _NewLine 23 D1:C024 - - - - 24 D1:C024 - - - - fshcmdMANfExe: 25 D1:C024 21 A8 EA D0 ld hl, FshCmdArg0 26 D1:C028 11 9F EA D0 ld de, FshCmd 27 D1:C02C CD 46 AC D1 call strcpy 28 D1:C030 - - - - 29 D1:C030 21 90 C0 D1 ld hl, fshcmdMANfPrefix 30 D1:C034 CD C0 07 02 call _PutS 31 D1:C038 - - - - 32 D1:C038 21 9F EA D0 ld hl, FshCmd 33 D1:C03C CD C0 07 02 call _PutS 34 D1:C040 CD F0 07 02 call _NewLine 35 D1:C044 CD F0 07 02 call _NewLine 36 D1:C048 - - - - 37 D1:C048 21 9F EA D0 ld hl, FshCmd 38 D1:C04C CD F3 B5 D1 call manroute 39 D1:C050 11 00 00 00 ld de, $00 40 D1:C054 CD 6D A9 D1 call cpHLDE 41 D1:C058 CA DF A8 D1 jp z, Err 42 D1:C05C - - - - 43 D1:C05C CD C0 07 02 call _PutS 44 D1:C060 CD F0 07 02 call _NewLine 45 D1:C064 CD F0 07 02 call _NewLine 46 D1:C068 - - - - 47 D1:C068 21 99 C0 D1 ld hl, fshcmdMANfUsage 48 D1:C06C CD C0 07 02 call _PutS 49 D1:C070 - - - - 50 D1:C070 21 9F EA D0 ld hl, FshCmd 51 D1:C074 CD 09 B6 D1 call manrouteu 52 D1:C078 11 00 00 00 ld de, $00 53 D1:C07C CD 6D A9 D1 call cpHLDE 54 D1:C080 CA DF A8 D1 jp z, Err 55 D1:C084 CD C0 07 02 call _PutS 56 D1:C088 CD F0 07 02 call _NewLine 57 D1:C08C - - - - 58 D1:C08C C3 DB A8 D1 jp Fin 59 D1:C090 - - - - 60 D1:C090 4D 41 4E 2D 44 42 DF 20 00 - - - fshcmdMANfPrefix: .db "MAN-DB", $DF, ' ', 0 61 D1:C099 55 73 61 67 65 3A 20 00 fshcmdMANfUsage: .db "Usage: ",0 62 D1:C0A1 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" 31 D1:C0AB - - - - #include "includes/CryptoCommands/CryptoCommand.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/CryptoCommand.asm" 1 D1:C0AB - - - - cryptocmddecode: 2 D1:C0AB E5 D5 11 E5 C2 D1 CD 33 AC D1 21 ED C2 D1 D1 CC 3D AA D1 E1 decodecmdopt(cryptocmdENCRYPT, cryptocmdENCRYPTo) Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/CryptoCommand.asm" 3 D1:C0BF E5 D5 11 9A C6 D1 CD 33 AC D1 21 A2 C6 D1 D1 CC 3D AA D1 E1 decodecmdopt(cryptocmdDECRYPT, cryptocmdDECRYPTo) 4 D1:C0D3 C9 - - - ret 5 D1:C0D4 - - - - 6 D1:C0D4 - - - - cryptocmdroute: 7 D1:C0D4 C1 - - - pop bc 8 D1:C0D5 11 ED C2 D1 CD 35 AA D1 CA 5C C3 D1 routeoptjp(cryptocmdENCRYPTo, cryptocmdENCRYPTf) 9 D1:C0E1 11 A2 C6 D1 CD 35 AA D1 CA 11 C7 D1 routeoptjp(cryptocmdDECRYPTo, cryptocmdDECRYPTf) 10 D1:C0ED C5 - - - push bc 11 D1:C0EE C9 - - - ret 12 D1:C0EF - - - - 13 D1:C0EF - - - - cryptocmdmanroute: 14 D1:C0EF C1 - - - pop bc 15 D1:C0F0 E5 11 E5 C2 D1 CD 33 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 E5 C3 D1 CD 33 AC D1 E1 11 E9 C3 D1 CA 06 B6 D1 subroutestrjp(cryptocmdENCRYPT, cryptocmdROT, cryptocmdROTm) 16 D1:C114 E5 11 9A C6 D1 CD 33 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 9A C7 D1 CD 33 AC D1 E1 11 9E C7 D1 CA 06 B6 D1 subroutestrjp(cryptocmdDECRYPT, cryptocmdunROT, cryptocmdunROTm) 17 D1:C138 - - - - 18 D1:C138 E5 11 E5 C2 D1 CD 33 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 F3 C4 D1 CD 33 AC D1 E1 11 F7 C4 D1 CA 06 B6 D1 subroutestrjp(cryptocmdENCRYPT, cryptocmdXOR, cryptocmdXORm) 19 D1:C15C E5 11 9A C6 D1 CD 33 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 A1 C8 D1 CD 33 AC D1 E1 11 A5 C8 D1 CA 06 B6 D1 subroutestrjp(cryptocmdDECRYPT, cryptocmdunXOR, cryptocmdunXORm) 20 D1:C180 - - - - 21 D1:C180 E5 11 E5 C2 D1 CD 33 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 F2 C5 D1 CD 33 AC D1 E1 11 F7 C5 D1 CA 06 B6 D1 subroutestrjp(cryptocmdENCRYPT, cryptocmdHELP, cryptocmdHELPm) 22 D1:C1A4 E5 11 9A C6 D1 CD 33 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 B6 C9 D1 CD 33 AC D1 E1 11 BB C9 D1 CA 06 B6 D1 subroutestrjp(cryptocmdDECRYPT, cryptocmdunHELP, cryptocmdunHELPm) 23 D1:C1C8 - - - - 24 D1:C1C8 11 E5 C2 D1 CD 33 AC D1 11 EE C2 D1 CA 06 B6 D1 routestrjp(cryptocmdENCRYPT, cryptocmdENCRYPTm) 25 D1:C1D8 11 9A C6 D1 CD 33 AC D1 11 A3 C6 D1 CA 06 B6 D1 routestrjp(cryptocmdDECRYPT, cryptocmdDECRYPTm) 26 D1:C1E8 - - - - 27 D1:C1E8 C5 - - - push bc 28 D1:C1E9 C9 - - - ret 29 D1:C1EA - - - - 30 D1:C1EA - - - - 31 D1:C1EA - - - - cryptocmdmanrouteu: 32 D1:C1EA C1 - - - pop bc 33 D1:C1EB E5 11 E5 C2 D1 CD 33 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 E5 C3 D1 CD 33 AC D1 E1 11 20 C4 D1 CA 1C B6 D1 subrouteustrjp(cryptocmdENCRYPT, cryptocmdROT, cryptocmdROTu) 34 D1:C20F E5 11 9A C6 D1 CD 33 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 9A C7 D1 CD 33 AC D1 E1 11 D5 C7 D1 CA 1C B6 D1 subrouteustrjp(cryptocmdDECRYPT, cryptocmdunROT, cryptocmdunROTu) 35 D1:C233 - - - - 36 D1:C233 E5 11 E5 C2 D1 CD 33 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 F3 C4 D1 CD 33 AC D1 E1 11 19 C5 D1 CA 1C B6 D1 subrouteustrjp(cryptocmdENCRYPT, cryptocmdXOR, cryptocmdXORu) 37 D1:C257 E5 11 9A C6 D1 CD 33 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 A1 C8 D1 CD 33 AC D1 E1 11 C7 C8 D1 CA 1C B6 D1 subrouteustrjp(cryptocmdDECRYPT, cryptocmdunXOR, cryptocmdunXORu) 38 D1:C27B - - - - 39 D1:C27B E5 11 E5 C2 D1 CD 33 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 F2 C5 D1 CD 33 AC D1 E1 11 08 C6 D1 CA 1C B6 D1 subrouteustrjp(cryptocmdENCRYPT, cryptocmdHELP, cryptocmdHELPu) 40 D1:C29F E5 11 9A C6 D1 CD 33 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 B6 C9 D1 CD 33 AC D1 E1 11 CC C9 D1 CA 1C B6 D1 subrouteustrjp(cryptocmdDECRYPT, cryptocmdunHELP, cryptocmdunHELPu) 41 D1:C2C3 - - - - 42 D1:C2C3 11 E5 C2 D1 CD 33 AC D1 11 37 C3 D1 CA 1C B6 D1 routeustrjp(cryptocmdENCRYPT, cryptocmdENCRYPTu) 43 D1:C2D3 11 9A C6 D1 CD 33 AC D1 11 EC C6 D1 CA 1C B6 D1 routeustrjp(cryptocmdDECRYPT, cryptocmdDECRYPTu) 44 D1:C2E3 - - - - 45 D1:C2E3 C5 - - - push bc 46 D1:C2E4 C9 - - - ret 47 D1:C2E5 - - - - 48 D1:C2E5 - - - - #include "includes/CryptoCommands/CryptoCommands.inc" Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/CryptoCommands.inc" 1 D1:C2E5 - - - - #include "includes/CryptoCommands/ENCRYPT.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/ENCRYPT.asm" 1 D1:C2E5 45 4E 43 52 59 50 54 00 cryptocmdENCRYPT: .db "ENCRYPT", 0 2 D1:C2ED 40 - - - cryptocmdENCRYPTo: .db $40 3 D1:C2EE 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:C337 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 ", 0 5 D1:C35C - - - - cryptocmdENCRYPTf: 6 D1:C35C - - - - cryptocmdENCRYPTfArg0: 7 D1:C35C 21 CD EA D0 ld hl, FshCmdArgFlags 8 D1:C360 CB 46 - - bit 0, (hl) 9 D1:C362 28 10 - - jr z, cryptocmdENCRYPTfArg0Get 10 D1:C364 CB 4E - - bit 1, (hl) 11 D1:C366 28 24 - - jr z, cryptocmdENCRYPTfExe 12 D1:C368 21 CC B3 D1 ld hl, ErrUsageo 13 D1:C36C CD 37 B3 D1 call ErrSet 14 D1:C370 CD EA B2 D1 call ErrCatch 15 D1:C374 - - - - cryptocmdENCRYPTfArg0Get: 16 D1:C374 21 DC C3 D1 ld hl, cryptocmdENCRYPTfSCypher 17 D1:C378 CD FB AA D1 call printprompt 18 D1:C37C 21 A8 EA D0 ld hl, FshCmdArg0 19 D1:C380 11 2C 00 00 ld de, FshCmdInptSize 20 D1:C384 CD 83 AD D1 call inputstr 21 D1:C388 CD F0 07 02 call _NewLine 22 D1:C38C - - - - cryptocmdENCRYPTfExe: 23 D1:C38C - - - - 24 D1:C38C - - - - #macro cryptocmdENCRYPTcmpjp(cmdX, cmdXf) 25 D1:C38C ld hl, FshCmdArg0 26 D1:C38C ld de, CmdX 27 D1:C38C call strcmp 28 D1:C38C jp z, cmdXf 29 D1:C38C #endmacro 30 D1:C38C - - - - 31 D1:C38C 21 A8 EA D0 11 E5 C3 D1 CD 33 AC D1 CA 3F C4 D1 cryptocmdENCRYPTcmpjp(cryptocmdROT, cryptocmdROTf) Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/ENCRYPT.asm" 32 D1:C39C 21 A8 EA D0 11 F3 C4 D1 CD 33 AC D1 CA 35 C5 D1 cryptocmdENCRYPTcmpjp(cryptocmdXOR, cryptocmdXORf) 33 D1:C3AC 21 A8 EA D0 11 F2 C5 D1 CD 33 AC D1 CA 15 C6 D1 cryptocmdENCRYPTcmpjp(cryptocmdHELP, cryptocmdHELPf) 34 D1:C3BC - - - - 35 D1:C3BC 21 A8 EA D0 ld hl, FshCmdArg0 36 D1:C3C0 11 9F EA D0 ld de, FshCmd 37 D1:C3C4 CD 46 AC D1 call strcpy 38 D1:C3C8 - - - - 39 D1:C3C8 21 46 B3 D1 ld hl, ErrCmdNotFoundo 40 D1:C3CC 11 CE EA D0 ld de, FshCmdErrCode 41 D1:C3D0 CD 3D AA D1 call bytecpy 42 D1:C3D4 CD 37 B3 D1 call ErrSet 43 D1:C3D8 C3 DF A8 D1 jp Err 44 D1:C3DC - - - - 45 D1:C3DC 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:C3E5 - - - - #include "includes/CryptoCommands/ROT.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/ROT.asm" 1 D1:C3E5 52 4F 54 00 cryptocmdROT: .db "ROT", 0 2 D1:C3E9 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:C420 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 ", 0 4 D1:C43F - - - - cryptocmdROTf: 5 D1:C43F - - - - cryptocmdROTfArg1: 6 D1:C43F 21 CD EA D0 ld hl, FshCmdArgFlags 7 D1:C443 CB 5E - - bit 3, (hl) 8 D1:C445 20 32 - - jr nz, cryptocmdROTfArg2 9 D1:C447 CB 56 - - bit 2, (hl) 10 D1:C449 28 0C - - jr z, cryptocmdROTfArg1Get 11 D1:C44B 21 CC B3 D1 ld hl, ErrUsageo 12 D1:C44F CD 37 B3 D1 call ErrSet 13 D1:C453 CD EA B2 D1 call ErrCatch 14 D1:C457 - - - - cryptocmdROTfArg1Get: 15 D1:C457 21 D8 C4 D1 ld hl, cryptocmdROTfDShift 16 D1:C45B CD FB AA D1 call printprompt 17 D1:C45F 21 B1 EA D0 ld hl, FshCmdArg1 18 D1:C463 11 03 00 00 ld de, 3 19 D1:C467 CD BB AF D1 call inputnumstr 20 D1:C46B CD BD AC D1 call strtow 21 D1:C46F 11 B1 EA D0 ld de, FshCmdArg1 22 D1:C473 EB - - - ex de, hl 23 D1:C474 73 - - - ld (hl), e 24 D1:C475 CD F0 07 02 call _NewLine 25 D1:C479 - - - - cryptocmdROTfArg2: 26 D1:C479 21 BA EA D0 ld hl, FshCmdArg2 27 D1:C47D 11 CF EA D0 ld de, FshScratch 28 D1:C481 CD 46 AC D1 call strcpy 29 D1:C485 21 CD EA D0 ld hl, FshCmdArgFlags 30 D1:C489 CB 66 - - bit 4, (hl) 31 D1:C48B 28 10 - - jr z, cryptocmdROTfArg2Get 32 D1:C48D CB 6E - - bit 5, (hl) 33 D1:C48F 28 24 - - jr z, cryptocmdROTfExe 34 D1:C491 21 CC B3 D1 ld hl, ErrUsageo 35 D1:C495 CD 37 B3 D1 call ErrSet 36 D1:C499 CD EA B2 D1 call ErrCatch 37 D1:C49D - - - - cryptocmdROTfArg2Get: 38 D1:C49D 21 E0 C4 D1 ld hl, cryptocmdROTfDMessage 39 D1:C4A1 CD FB AA D1 call printprompt 40 D1:C4A5 21 CF EA D0 ld hl, FshScratch 41 D1:C4A9 11 10 00 00 ld de, FshScratchSize - 4 42 D1:C4AD CD A7 AE D1 call inputcharstr 43 D1:C4B1 CD F0 07 02 call _NewLine 44 D1:C4B5 - - - - cryptocmdROTfExe: 45 D1:C4B5 21 B1 EA D0 ld hl, FshCmdArg1 46 D1:C4B9 7E - - - ld a, (hl) 47 D1:C4BA 21 CF EA D0 ld hl, FshScratch 48 D1:C4BE CD 02 B5 D1 call rotletencrypt 49 D1:C4C2 E5 - - - push hl 50 D1:C4C3 21 EA C4 D1 ld hl, cryptocmdROTfDResult 51 D1:C4C7 CD C0 07 02 call _PutS 52 D1:C4CB E1 - - - pop hl 53 D1:C4CC CD C0 07 02 call _PutS 54 D1:C4D0 CD F0 07 02 call _NewLine 55 D1:C4D4 C3 DB A8 D1 jp Fin 56 D1:C4D8 - - - - 57 D1:C4D8 53 68 69 66 74 3D 20 00 cryptocmdROTfDShift: .db "Shift= ", 0 58 D1:C4E0 4D 65 73 73 61 67 65 3D 20 00 - - cryptocmdROTfDMessage: .db "Message= ", 0 59 D1:C4EA 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:C4F3 - - - - #include "includes/CryptoCommands/XOR.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/XOR.asm" 1 D1:C4F3 58 4F 52 00 cryptocmdXOR: .db "XOR", 0 2 D1:C4F7 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:C519 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 ", 0 4 D1:C535 - - - - cryptocmdXORf: 5 D1:C535 - - - - cryptocmdXORfArg1: 6 D1:C535 21 CD EA D0 ld hl, FshCmdArgFlags 7 D1:C539 CB 56 - - bit 2, (hl) 8 D1:C53B 28 10 - - jr z, cryptocmdXORfArg1Get 9 D1:C53D CB 5E - - bit 3, (hl) 10 D1:C53F 28 24 - - jr z, cryptocmdXORfArg2 11 D1:C541 21 CC B3 D1 ld hl, ErrUsageo 12 D1:C545 CD 37 B3 D1 call ErrSet 13 D1:C549 CD EA B2 D1 call ErrCatch 14 D1:C54D - - - - cryptocmdXORfArg1Get: 15 D1:C54D 21 D9 C5 D1 ld hl, cryptocmdXORfDKey 16 D1:C551 CD FB AA D1 call printprompt 17 D1:C555 21 B1 EA D0 ld hl, FshCmdArg1 18 D1:C559 11 08 00 00 ld de, FshCmdCmdSize 19 D1:C55D CD 83 AD D1 call inputstr 20 D1:C561 CD F0 07 02 call _NewLine 21 D1:C565 - - - - cryptocmdXORfArg2: 22 D1:C565 21 BA EA D0 ld hl, FshCmdArg2 23 D1:C569 11 CF EA D0 ld de, FshScratch 24 D1:C56D CD 46 AC D1 call strcpy 25 D1:C571 21 CD EA D0 ld hl, FshCmdArgFlags 26 D1:C575 CB 66 - - bit 4, (hl) 27 D1:C577 28 10 - - jr z, cryptocmdXORfArg2Get 28 D1:C579 CB 6E - - bit 5, (hl) 29 D1:C57B 28 24 - - jr z, cryptocmdXORfExe 30 D1:C57D 21 CC B3 D1 ld hl, ErrUsageo 31 D1:C581 CD 37 B3 D1 call ErrSet 32 D1:C585 CD EA B2 D1 call ErrCatch 33 D1:C589 - - - - cryptocmdXORfArg2Get: 34 D1:C589 21 DF C5 D1 ld hl, cryptocmdXORfDMessage 35 D1:C58D CD FB AA D1 call printprompt 36 D1:C591 21 CF EA D0 ld hl, FshScratch 37 D1:C595 11 09 00 00 ld de, FshScratchSize - 1 / 2 38 D1:C599 CD A7 AE D1 call inputcharstr 39 D1:C59D CD F0 07 02 call _NewLine 40 D1:C5A1 - - - - cryptocmdXORfExe: 41 D1:C5A1 21 CF EA D0 ld hl, FshScratch 42 D1:C5A5 11 B1 EA D0 ld de, FshCmdArg1 43 D1:C5A9 CD 90 B5 D1 call xorcrypt 44 D1:C5AD 21 E9 C5 D1 ld hl, cryptocmdXORfDResult 45 D1:C5B1 CD C0 07 02 call _PutS 46 D1:C5B5 21 CF EA D0 ld hl, FshScratch 47 D1:C5B9 - - - - cryptocmdXORfPrint: 48 D1:C5B9 7E - - - ld a, (hl) 49 D1:C5BA B7 - - - or a, a 50 D1:C5BB 28 14 - - jr z, cryptocmdXORfPrintEnd 51 D1:C5BD E5 - - - push hl 52 D1:C5BE CD 9C AB D1 call bytetohexstr 53 D1:C5C2 7E - - - ld a, (hl) 54 D1:C5C3 CD B8 07 02 call _PutC 55 D1:C5C7 23 - - - inc hl 56 D1:C5C8 7E - - - ld a, (hl) 57 D1:C5C9 CD B8 07 02 call _PutC 58 D1:C5CD E1 - - - pop hl 59 D1:C5CE 23 - - - inc hl 60 D1:C5CF 18 E8 - - jr cryptocmdXORfPrint 61 D1:C5D1 - - - - cryptocmdXORfPrintEnd: 62 D1:C5D1 CD F0 07 02 call _NewLine 63 D1:C5D5 C3 DB A8 D1 jp Fin 64 D1:C5D9 - - - - 65 D1:C5D9 4B 65 79 3D 20 00 - - cryptocmdXORfDKey: .db "Key= ", 0 66 D1:C5DF 4D 65 73 73 61 67 65 3D 20 00 - - cryptocmdXORfDMessage: .db "Message= ", 0 67 D1:C5E9 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:C5F2 - - - - #include "includes/CryptoCommands/HELP.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/HELP.asm" 1 D1:C5F2 48 45 4C 50 00 - - - cryptocmdHELP: .db "HELP", 0 2 D1:C5F7 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:C608 45 4E 43 52 59 50 54 20 48 45 4C 50 00 - - - cryptocmdHELPu: .db "ENCRYPT HELP", 0 4 D1:C615 - - - - cryptocmdHELPf: 5 D1:C615 21 CD EA D0 ld hl, FshCmdArgFlags 6 D1:C619 CB 56 - - bit 2, (hl) 7 D1:C61B 28 0C - - jr z, cryptocmdHELPfExe 8 D1:C61D 21 CC B3 D1 ld hl, ErrUsageo 9 D1:C621 CD 37 B3 D1 call ErrSet 10 D1:C625 CD EA B2 D1 call ErrCatch 11 D1:C629 - - - - cryptocmdHELPfExe: 12 D1:C629 21 87 C6 D1 ld hl, cryptocmdHELPfLine1 13 D1:C62D CD C0 07 02 call _PutS 14 D1:C631 CD F0 07 02 call _NewLine 15 D1:C635 - - - - 16 D1:C635 - - - - #macro cryptocmdHELPmRow1(cmdXs) 17 D1:C635 xor a 18 D1:C635 ld (curCol), a 19 D1:C635 ld hl, cmdXs 20 D1:C635 call _PutS 21 D1:C635 call _NewLine 22 D1:C635 #endmacro 23 D1:C635 - - - - #macro cryptocmdHELPmRowU(cmdXs, cmdXu) 24 D1:C635 xor a 25 D1:C635 ld (curCol), a 26 D1:C635 ld hl, cmdXs 27 D1:C635 call _PutS 28 D1:C635 ld a, ':' 29 D1:C635 call _PutC 30 D1:C635 ld a, ' ' 31 D1:C635 call _PutC 32 D1:C635 ld hl, cmdXu 33 D1:C635 call _PutS 34 D1:C635 call _NewLine 35 D1:C635 #endmacro 36 D1:C635 - - - - #macro cryptocmdHELPmRow2(cmdXs, cmdYs) 37 D1:C635 xor a 38 D1:C635 ld (curCol), a 39 D1:C635 ld hl, cmdXs 40 D1:C635 call _PutS 41 D1:C635 ld a, 9 42 D1:C635 ld (curcol), a 43 D1:C635 ld hl, cmdYs 44 D1:C635 call _PutS 45 D1:C635 call _NewLine 46 D1:C635 #endmacro 47 D1:C635 - - - - #macro cryptocmdHELPmRow3(cmdXs, cmdYs, cmdZs) 48 D1:C635 xor a 49 D1:C635 ld (curCol), a 50 D1:C635 ld hl, cmdXs 51 D1:C635 call _PutS 52 D1:C635 ld a, 9 53 D1:C635 ld (curcol), a 54 D1:C635 ld hl, cmdYs 55 D1:C635 call _PutS 56 D1:C635 ld a, 19 57 D1:C635 ld (curcol), a 58 D1:C635 ld hl, cmdZs 59 D1:C635 call _PutS 60 D1:C635 call _NewLine 61 D1:C635 #endmacro 62 D1:C635 - - - - 63 D1:C635 AF 32 96 05 D0 21 E5 C3 D1 CD C0 07 02 3E 3A CD B8 07 02 3E 20 CD B8 07 02 21 20 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:C65A AF 32 96 05 D0 21 F3 C4 D1 CD C0 07 02 3E 3A CD B8 07 02 3E 20 CD B8 07 02 21 19 C5 D1 CD C0 07 02 CD F0 07 02 - - - cryptocmdHELPmRowU(cryptocmdXOR, cryptocmdXORu) 65 D1:C67F - - - - 66 D1:C67F CD F0 07 02 call _NewLine 67 D1:C683 C3 DB A8 D1 jp Fin 68 D1:C687 - - - - 69 D1:C687 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:C69A - - - - 6 D1:C69A - - - - #include "includes/CryptoCommands/DECRYPT.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/DECRYPT.asm" 1 D1:C69A 44 45 43 52 59 50 54 00 cryptocmdDECRYPT: .db "DECRYPT", 0 2 D1:C6A2 41 - - - cryptocmdDECRYPTo: .db $41 3 D1:C6A3 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:C6EC 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 ", 0 5 D1:C711 - - - - cryptocmdDECRYPTf: 6 D1:C711 - - - - cryptocmdDECRYPTfArg0: 7 D1:C711 21 CD EA D0 ld hl, FshCmdArgFlags 8 D1:C715 CB 46 - - bit 0, (hl) 9 D1:C717 28 10 - - jr z, cryptocmdDECRYPTfArg0Get 10 D1:C719 CB 4E - - bit 1, (hl) 11 D1:C71B 28 24 - - jr z, cryptocmdDECRYPTfExe 12 D1:C71D 21 CC B3 D1 ld hl, ErrUsageo 13 D1:C721 CD 37 B3 D1 call ErrSet 14 D1:C725 CD EA B2 D1 call ErrCatch 15 D1:C729 - - - - cryptocmdDECRYPTfArg0Get: 16 D1:C729 21 91 C7 D1 ld hl, cryptocmdDECRYPTfSCypher 17 D1:C72D CD FB AA D1 call printprompt 18 D1:C731 21 A8 EA D0 ld hl, FshCmdArg0 19 D1:C735 11 2C 00 00 ld de, FshCmdInptSize 20 D1:C739 CD 83 AD D1 call inputstr 21 D1:C73D CD F0 07 02 call _NewLine 22 D1:C741 - - - - cryptocmdDECRYPTfExe: 23 D1:C741 - - - - 24 D1:C741 - - - - #macro cryptocmdDECRYPTcmpjp(cmdX, cmdXf) 25 D1:C741 ld hl, FshCmdArg0 26 D1:C741 ld de, CmdX 27 D1:C741 call strcmp 28 D1:C741 jp z, cmdXf 29 D1:C741 #endmacro 30 D1:C741 - - - - 31 D1:C741 21 A8 EA D0 11 9A C7 D1 CD 33 AC D1 CA EA C7 D1 cryptocmdDECRYPTcmpjp(cryptocmdunROT, cryptocmdunROTf) Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/DECRYPT.asm" 32 D1:C751 21 A8 EA D0 11 A1 C8 D1 CD 33 AC D1 CA D9 C8 D1 cryptocmdDECRYPTcmpjp(cryptocmdunXOR, cryptocmdunXORf) 33 D1:C761 21 A8 EA D0 11 B6 C9 D1 CD 33 AC D1 CA D9 C9 D1 cryptocmdDECRYPTcmpjp(cryptocmdunHELP, cryptocmdunHELPf) 34 D1:C771 - - - - 35 D1:C771 21 A8 EA D0 ld hl, FshCmdArg0 36 D1:C775 11 9F EA D0 ld de, FshCmd 37 D1:C779 CD 46 AC D1 call strcpy 38 D1:C77D - - - - 39 D1:C77D 21 46 B3 D1 ld hl, ErrCmdNotFoundo 40 D1:C781 11 CE EA D0 ld de, FshCmdErrCode 41 D1:C785 CD 3D AA D1 call bytecpy 42 D1:C789 CD 37 B3 D1 call ErrSet 43 D1:C78D C3 DF A8 D1 jp Err 44 D1:C791 - - - - 45 D1:C791 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:C79A - - - - #include "includes/CryptoCommands/unROT.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/unROT.asm" 1 D1:C79A 52 4F 54 00 cryptocmdunROT: .db "ROT", 0 2 D1:C79E 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:C7D5 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 ", 0 4 D1:C7EA - - - - cryptocmdunROTf: 5 D1:C7EA - - - - cryptocmdunROTfArg1: 6 D1:C7EA 21 CD EA D0 ld hl, FshCmdArgFlags 7 D1:C7EE CB 5E - - bit 3, (hl) 8 D1:C7F0 20 32 - - jr nz, cryptocmdunROTfArg2 9 D1:C7F2 CB 56 - - bit 2, (hl) 10 D1:C7F4 28 0C - - jr z, cryptocmdunROTfArg1Get 11 D1:C7F6 21 CC B3 D1 ld hl, ErrUsageo 12 D1:C7FA CD 37 B3 D1 call ErrSet 13 D1:C7FE CD EA B2 D1 call ErrCatch 14 D1:C802 - - - - cryptocmdunROTfArg1Get: 15 D1:C802 21 83 C8 D1 ld hl, cryptocmdunROTfDShift 16 D1:C806 CD FB AA D1 call printprompt 17 D1:C80A 21 B1 EA D0 ld hl, FshCmdArg1 18 D1:C80E 11 03 00 00 ld de, 3 19 D1:C812 CD BB AF D1 call inputnumstr 20 D1:C816 CD BD AC D1 call strtow 21 D1:C81A 11 B1 EA D0 ld de, FshCmdArg1 22 D1:C81E EB - - - ex de, hl 23 D1:C81F 73 - - - ld (hl), e 24 D1:C820 CD F0 07 02 call _NewLine 25 D1:C824 - - - - cryptocmdunROTfArg2: 26 D1:C824 21 BA EA D0 ld hl, FshCmdArg2 27 D1:C828 11 CF EA D0 ld de, FshScratch 28 D1:C82C CD 46 AC D1 call strcpy 29 D1:C830 21 CD EA D0 ld hl, FshCmdArgFlags 30 D1:C834 CB 66 - - bit 4, (hl) 31 D1:C836 28 10 - - jr z, cryptocmdunROTfArg2Get 32 D1:C838 CB 6E - - bit 5, (hl) 33 D1:C83A 28 24 - - jr z, cryptocmdunROTfExe 34 D1:C83C 21 CC B3 D1 ld hl, ErrUsageo 35 D1:C840 CD 37 B3 D1 call ErrSet 36 D1:C844 CD EA B2 D1 call ErrCatch 37 D1:C848 - - - - cryptocmdunROTfArg2Get: 38 D1:C848 21 8B C8 D1 ld hl, cryptocmdunROTfDMessage 39 D1:C84C CD FB AA D1 call printprompt 40 D1:C850 21 CF EA D0 ld hl, FshScratch 41 D1:C854 11 10 00 00 ld de, FshScratchSize - 4 42 D1:C858 CD A7 AE D1 call inputcharstr 43 D1:C85C CD F0 07 02 call _NewLine 44 D1:C860 - - - - cryptocmdunROTfExe: 45 D1:C860 21 B1 EA D0 ld hl, FshCmdArg1 46 D1:C864 7E - - - ld a, (hl) 47 D1:C865 21 CF EA D0 ld hl, FshScratch 48 D1:C869 CD 27 B5 D1 call rotletdecrypt 49 D1:C86D E5 - - - push hl 50 D1:C86E 21 98 C8 D1 ld hl, cryptocmdunROTfDResult 51 D1:C872 CD C0 07 02 call _PutS 52 D1:C876 E1 - - - pop hl 53 D1:C877 CD C0 07 02 call _PutS 54 D1:C87B CD F0 07 02 call _NewLine 55 D1:C87F C3 DB A8 D1 jp Fin 56 D1:C883 - - - - 57 D1:C883 53 68 69 66 74 3D 20 00 cryptocmdunROTfDShift: .db "Shift= ", 0 58 D1:C88B 43 79 70 68 65 72 54 65 78 74 3D 20 00 - - - cryptocmdunROTfDMessage: .db "CypherText= ", 0 59 D1:C898 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:C8A1 - - - - #include "includes/CryptoCommands/unXOR.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/unXOR.asm" 1 D1:C8A1 58 4F 52 00 cryptocmdunXOR: .db "XOR", 0 2 D1:C8A5 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:C8C7 44 45 43 52 59 50 54 20 58 4F 52 20 3C 6B 65 79 3E 00 - - cryptocmdunXORu: .db "DECRYPT XOR ", 0 4 D1:C8D9 - - - - cryptocmdunXORf: 5 D1:C8D9 - - - - cryptocmdunXORfArg1: 6 D1:C8D9 21 CD EA D0 ld hl, FshCmdArgFlags 7 D1:C8DD CB 56 - - bit 2, (hl) 8 D1:C8DF 28 10 - - jr z, cryptocmdunXORfArg1Get 9 D1:C8E1 CB 5E - - bit 3, (hl) 10 D1:C8E3 28 24 - - jr z, cryptocmdunXORfArg2 11 D1:C8E5 21 CC B3 D1 ld hl, ErrUsageo 12 D1:C8E9 CD 37 B3 D1 call ErrSet 13 D1:C8ED CD EA B2 D1 call ErrCatch 14 D1:C8F1 - - - - cryptocmdunXORfArg1Get: 15 D1:C8F1 21 86 C9 D1 ld hl, cryptocmdunXORfDKey 16 D1:C8F5 CD FB AA D1 call printprompt 17 D1:C8F9 21 B1 EA D0 ld hl, FshCmdArg1 18 D1:C8FD 11 08 00 00 ld de, FshCmdCmdSize 19 D1:C901 CD 83 AD D1 call inputstr 20 D1:C905 CD F0 07 02 call _NewLine 21 D1:C909 - - - - cryptocmdunXORfArg2: 22 D1:C909 21 BA EA D0 ld hl, FshCmdArg2 23 D1:C90D 11 CF EA D0 ld de, FshScratch 24 D1:C911 CD 46 AC D1 call strcpy 25 D1:C915 21 CD EA D0 ld hl, FshCmdArgFlags 26 D1:C919 CB 66 - - bit 4, (hl) 27 D1:C91B 20 45 - - jr nz, cryptocmdunXORfExe 28 D1:C91D - - - - cryptocmdunXORfArg2Get: 29 D1:C91D 21 A6 C9 D1 ld hl, cryptocmdunXORfStringPBuffer 30 D1:C921 06 0F - - ld b, $0F 31 D1:C923 3E 00 - - ld a, $00 32 D1:C925 CD 45 AA D1 call memset 33 D1:C929 21 8C C9 D1 ld hl, cryptocmdunXORfDMessage 34 D1:C92D CD FB AA D1 call printprompt 35 D1:C931 21 CF EA D0 ld hl, FshScratch 36 D1:C935 11 10 00 00 ld de, FshScratchSize - 4 37 D1:C939 CD 83 AD D1 call inputstr 38 D1:C93D 01 A6 C9 D1 ld bc, cryptocmdunXORfStringPBuffer 39 D1:C941 - - - - cryptocmdunXORfArg2GetLoop: 40 D1:C941 7E - - - ld a, (hl) 41 D1:C942 B7 - - - or a, a 42 D1:C943 28 19 - - jr z, cryptocmdunXORfArg2GetLoopEnd 43 D1:C945 32 A2 C9 D1 ld (cryptocmdunXORfStringBuffer), a 44 D1:C949 23 - - - inc hl 45 D1:C94A 7E - - - ld a, (hl) 46 D1:C94B 32 A3 C9 D1 ld (cryptocmdunXORfStringBuffer + 1), a 47 D1:C94F E5 - - - push hl 48 D1:C950 21 A2 C9 D1 ld hl, cryptocmdunXORfStringBuffer 49 D1:C954 CD F6 AB D1 call hexToA 50 D1:C958 E1 - - - pop hl 51 D1:C959 02 - - - ld (bc), a 52 D1:C95A 23 - - - inc hl 53 D1:C95B 03 - - - inc bc 54 D1:C95C 18 E3 - - jr cryptocmdunXORfArg2GetLoop 55 D1:C95E - - - - cryptocmdunXORfArg2GetLoopEnd: 56 D1:C95E CD F0 07 02 call _NewLine 57 D1:C962 - - - - cryptocmdunXORfExe: 58 D1:C962 21 A6 C9 D1 ld hl, cryptocmdunXORfStringPBuffer 59 D1:C966 11 B1 EA D0 ld de, FshCmdArg1 60 D1:C96A CD 90 B5 D1 call xorcrypt 61 D1:C96E 21 99 C9 D1 ld hl, cryptocmdunXORfDResult 62 D1:C972 CD C0 07 02 call _PutS 63 D1:C976 21 A6 C9 D1 ld hl, cryptocmdunXORfStringPBuffer 64 D1:C97A CD C0 07 02 call _PutS 65 D1:C97E CD F0 07 02 call _NewLine 66 D1:C982 C3 DB A8 D1 jp Fin 67 D1:C986 - - - - 68 D1:C986 4B 65 79 3D 20 00 - - cryptocmdunXORfDKey: .db "Key= ", 0 69 D1:C98C 43 79 70 68 65 72 54 65 78 74 3D 20 00 - - - cryptocmdunXORfDMessage: .db "CypherText= ", 0 70 D1:C999 52 65 73 75 6C 74 3A 20 00 - - - cryptocmdunXORfDResult: .db "Result: ", 0 71 D1:C9A2 00 00 00 00 cryptocmdunXORfStringBuffer: .db $00, $00, $00, $00 72 D1:C9A6 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:C9B6 - - - - #include "includes/CryptoCommands/unHELP.asm" Listing for file "/home/pi/Documents/asm/FSH/includes/CryptoCommands/unHELP.asm" 1 D1:C9B6 48 45 4C 50 00 - - - cryptocmdunHELP: .db "HELP", 0 2 D1:C9BB 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:C9CC 44 45 43 52 59 50 54 20 48 45 4C 50 00 - - - cryptocmdunHELPu: .db "DECRYPT HELP", 0 4 D1:C9D9 - - - - cryptocmdunHELPf: 5 D1:C9D9 21 CD EA D0 ld hl, FshCmdArgFlags 6 D1:C9DD CB 56 - - bit 2, (hl) 7 D1:C9DF 28 0C - - jr z, cryptocmdunHELPfExe 8 D1:C9E1 21 CC B3 D1 ld hl, ErrUsageo 9 D1:C9E5 CD 37 B3 D1 call ErrSet 10 D1:C9E9 CD EA B2 D1 call ErrCatch 11 D1:C9ED - - - - cryptocmdunHELPfExe: 12 D1:C9ED 21 4B CA D1 ld hl, cryptocmdunHELPfLine1 13 D1:C9F1 CD C0 07 02 call _PutS 14 D1:C9F5 CD F0 07 02 call _NewLine 15 D1:C9F9 - - - - 16 D1:C9F9 - - - - #macro cryptocmdunHELPmRow1(cmdXs) 17 D1:C9F9 xor a 18 D1:C9F9 ld (curCol), a 19 D1:C9F9 ld hl, cmdXs 20 D1:C9F9 call _PutS 21 D1:C9F9 call _NewLine 22 D1:C9F9 #endmacro 23 D1:C9F9 - - - - #macro cryptocmdunHELPmRowU(cmdXs, cmdXu) 24 D1:C9F9 xor a 25 D1:C9F9 ld (curCol), a 26 D1:C9F9 ld hl, cmdXs 27 D1:C9F9 call _PutS 28 D1:C9F9 ld a, ':' 29 D1:C9F9 call _PutC 30 D1:C9F9 ld a, ' ' 31 D1:C9F9 call _PutC 32 D1:C9F9 ld hl, cmdXu 33 D1:C9F9 call _PutS 34 D1:C9F9 call _NewLine 35 D1:C9F9 #endmacro 36 D1:C9F9 - - - - #macro cryptocmdunHELPmRow2(cmdXs, cmdYs) 37 D1:C9F9 xor a 38 D1:C9F9 ld (curCol), a 39 D1:C9F9 ld hl, cmdXs 40 D1:C9F9 call _PutS 41 D1:C9F9 ld a, 9 42 D1:C9F9 ld (curcol), a 43 D1:C9F9 ld hl, cmdYs 44 D1:C9F9 call _PutS 45 D1:C9F9 call _NewLine 46 D1:C9F9 #endmacro 47 D1:C9F9 - - - - #macro cryptocmdunHELPmRow3(cmdXs, cmdYs, cmdZs) 48 D1:C9F9 xor a 49 D1:C9F9 ld (curCol), a 50 D1:C9F9 ld hl, cmdXs 51 D1:C9F9 call _PutS 52 D1:C9F9 ld a, 9 53 D1:C9F9 ld (curcol), a 54 D1:C9F9 ld hl, cmdYs 55 D1:C9F9 call _PutS 56 D1:C9F9 ld a, 19 57 D1:C9F9 ld (curcol), a 58 D1:C9F9 ld hl, cmdZs 59 D1:C9F9 call _PutS 60 D1:C9F9 call _NewLine 61 D1:C9F9 #endmacro 62 D1:C9F9 - - - - 63 D1:C9F9 AF 32 96 05 D0 21 9A C7 D1 CD C0 07 02 3E 3A CD B8 07 02 3E 20 CD B8 07 02 21 D5 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:CA1E AF 32 96 05 D0 21 A1 C8 D1 CD C0 07 02 3E 3A CD B8 07 02 3E 20 CD B8 07 02 21 C7 C8 D1 CD C0 07 02 CD F0 07 02 - - - cryptocmdunHELPmRowU(cryptocmdunXOR, cryptocmdunXORu) 65 D1:CA43 - - - - 66 D1:CA43 CD F0 07 02 call _NewLine 67 D1:CA47 C3 DB A8 D1 jp Fin 68 D1:CA4B - - - - 69 D1:CA4B 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:CA5E - - - - 78 D1:CA5E - - - - .end