1 00:0000 - - - - #include "includes/static/ti84pce.inc" Listing for file "/home/pi/Documents/asm/fsh-shell/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-shell/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-shell/includes/macros/macros.inc" 1 00:0000 - - - - #include "includes/macros/misc.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/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-shell/includes/macros/macros.inc" 2 00:0000 - - - - #include "includes/macros/pixel.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/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-shell/includes/macros/macros.inc" 3 00:0000 - - - - #include "includes/macros/draw.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/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-shell/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 EB B2 D1 CALL fshvarreset 17 D1:A899 - - - - 18 D1:A899 CD B6 B4 D1 CALL drawstatusbar 19 D1:A89D - - - - 20 D1:A89D CD 91 B4 D1 CALL printmotd 21 D1:A8A1 - - - - 22 D1:A8A1 - - - - Input: 23 D1:A8A1 3E 00 - - LD A, $00 24 D1:A8A3 CD DC B0 D1 CALL commandfill 25 D1:A8A7 - - - - 26 D1:A8A7 21 2F A9 D1 LD HL, PS1 27 D1:A8AB CD 18 AB D1 CALL printprompt 28 D1:A8AF - - - - 29 D1:A8AF 21 9F EA D0 LD HL, FshCmd 30 D1:A8B3 11 2C 00 00 LD DE, FshCmdInptSize 31 D1:A8B7 CD A0 AD D1 CALL inputstr 32 D1:A8BB - - - - 33 D1:A8BB 21 9F EA D0 LD HL, FshCmd 34 D1:A8BF CD F7 B0 D1 CALL fshparsecommand 35 D1:A8C3 - - - - 36 D1:A8C3 CD F0 07 02 CALL _NewLine 37 D1:A8C7 - - - - 38 D1:A8C7 - - - - Decode: 39 D1:A8C7 21 9F EA D0 LD HL, FshCmd 40 D1:A8CB 11 CF EA D0 LD DE, FshCmdOP 41 D1:A8CF CD 6D B6 D1 CALL commanddecode 42 D1:A8D3 - - - - 43 D1:A8D3 - - - - Route: 44 D1:A8D3 21 CF EA D0 LD HL, FshCmdOP 45 D1:A8D7 C3 76 B6 D1 JP commandroute 46 D1:A8DB - - - - 47 D1:A8DB - - - - Fin: 48 D1:A8DB CD 26 B5 D1 CALL updatestatusbar 49 D1:A8DF C3 A1 A8 D1 JP Input 50 D1:A8E3 - - - - 51 D1:A8E3 - - - - Err: 52 D1:A8E3 C3 16 B3 D1 JP ErrRoute 53 D1:A8E7 - - - - 54 D1:A8E7 - - - - Cleanup: 55 D1:A8E7 FD CB 03 C6 SET graphdraw,(IY+graphflags) 56 D1:A8EB CD 08 08 02 CALL _ClrLCDFull 57 D1:A8EF CD 18 08 02 CALL _ClrTxtShdw 58 D1:A8F3 CD 28 08 02 CALL _homeup 59 D1:A8F7 CD 3C 1A 02 call _DrawStatusBar 60 D1:A8FB - - - - 61 D1:A8FB - - - - Exit: 62 D1:A8FB FD CB 00 AE RES donePrgm,(iy+doneFlags) 63 D1:A8FF C9 - - - RET 64 D1:A900 - - - - 65 D1:A900 - - - - #include "includes/Text.inc" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/Text.inc" 1 D1:A900 - - - - ;STRINGS ------------------------- 2 D1:A900 46 73 68 20 53 48 65 6C 6C 00 - - FshName: .db "Fsh SHell", 0 3 D1:A90A 42 79 20 70 69 78 69 79 73 00 - - FshBy: .db "By pixiys", 0 4 D1:A914 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:A92F 46 53 48 3E 20 00 - - PS1: .db "FSH> ", 0 6 D1:A935 36 34 77 00 FshVVars: .db "64w", 0 7 D1:A939 30 00 - - FshVMajor: .db "0", 0 8 D1:A93B 31 00 - - FshVMinor: .db "1", 0 9 D1:A93D 31 00 - - FshVPatch: .db "1", 0 10 D1:A93F 35 30 30 00 FshVBuild: .db "500", 0 11 D1:A943 2E 00 - - FshVSeparator: .db ".", 0 12 D1:A945 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:A95B 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:A970 00 - - - FshFlags: .DB %00000000 67 D1:A971 - - - - ; 0: Debug Flag 68 D1:A971 - - - - ; 1: Error Flag 69 D1:A971 - - - - ; 2: Program Flag 70 D1:A971 - - - - 71 D1:A971 - - - - #include "includes/lib/lib.inc" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/lib.inc" 1 D1:A971 - - - - #include "includes/lib/std/std.inc" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/std.inc" 1 D1:A971 - - - - #include "includes/lib/std/Math.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/Math.asm" 1 D1:A971 - - - - ;;cpHLDE 2 D1:A971 - - - - ;;Compares HL to DE. 3 D1:A971 - - - - ;;Output: 4 D1:A971 - - - - ;; Same as z80 CP instruction. 5 D1:A971 - - - - cpHLDE: 6 D1:A971 B7 - - - or a 7 D1:A972 ED 52 - - sbc hl, de 8 D1:A974 19 - - - add hl,de 9 D1:A975 C9 - - - ret 10 D1:A976 - - - - 11 D1:A976 - - - - ;;cpHLBC 12 D1:A976 - - - - ;;Compares HL to BC. 13 D1:A976 - - - - ;;Output: 14 D1:A976 - - - - ;; Same as z80 CP instruction. 15 D1:A976 - - - - cpHLBC: 16 D1:A976 B7 - - - or a 17 D1:A977 ED 42 - - sbc hl, bc 18 D1:A979 09 - - - add hl,bc 19 D1:A97A C9 - - - ret 20 D1:A97B - - - - 21 D1:A97B - - - - ;;cpBCDE 22 D1:A97B - - - - ;;Compares DE to BC. 23 D1:A97B - - - - ;;Output: 24 D1:A97B - - - - ;; Same as z80 CP instruction. 25 D1:A97B - - - - cpBCDE: 26 D1:A97B E5 - - - push hl 27 D1:A97C 60 - - - ld h, b 28 D1:A97D 69 - - - ld l, c 29 D1:A97E B7 - - - or a 30 D1:A97F ED 52 - - sbc hl, de 31 D1:A981 E1 - - - pop hl 32 D1:A982 C9 - - - ret 33 D1:A983 - - - - 34 D1:A983 - - - - ;;mulAbyB 35 D1:A983 - - - - ;;Multiplys AxB 36 D1:A983 - - - - ;;Inputs: 37 D1:A983 - - - - ;; A: Multiplier 38 D1:A983 - - - - ;; B: Multiplicand 39 D1:A983 - - - - ;;Outputs: 40 D1:A983 - - - - ;; A: Product of A and B. 41 D1:A983 - - - - mulAbyB: 42 D1:A983 C5 - - - push bc 43 D1:A984 4F - - - ld c, a 44 D1:A985 - - - - mulAbyBLoop: 45 D1:A985 81 - - - add a, c 46 D1:A986 10 FD - - djnz mulAbyBLoop 47 D1:A988 91 - - - sub c 48 D1:A989 C1 - - - pop bc 49 D1:A98A C9 - - - ret 50 D1:A98B - - - - 51 D1:A98B - - - - ;;mulAbyHL 52 D1:A98B - - - - ;;Multiplys AxHL 53 D1:A98B - - - - ;;Inputs: 54 D1:A98B - - - - ;; A: Multiplier 55 D1:A98B - - - - ;; HL: Multiplicand 56 D1:A98B - - - - ;;Outputs: 57 D1:A98B - - - - ;; HL: Product of A and HL. 58 D1:A98B - - - - mulAbyHL: 59 D1:A98B C5 - - - push bc 60 D1:A98C D5 - - - push de 61 D1:A98D 11 00 00 00 ld de, 0 62 D1:A991 EB - - - ex de, hl 63 D1:A992 FE 00 - - cp 0 64 D1:A994 28 04 - - jr z, mulAbyHLEnd 65 D1:A996 47 - - - ld b, a 66 D1:A997 - - - - mulAbyHLLoop: 67 D1:A997 19 - - - add hl, de 68 D1:A998 10 FD - - djnz mulAbyHLLoop 69 D1:A99A - - - - mulAbyHLEnd: 70 D1:A99A D1 - - - pop de 71 D1:A99B C1 - - - pop bc 72 D1:A99C C9 - - - ret 73 D1:A99D - - - - 74 D1:A99D - - - - ;;modHL 75 D1:A99D - - - - ;;H % L => H 76 D1:A99D - - - - ;;Inputs: 77 D1:A99D - - - - ;; H: 78 D1:A99D - - - - ;; L: 79 D1:A99D - - - - modHL: 80 D1:A99D C5 - - - push bc 81 D1:A99E 44 - - - ld b, h 82 D1:A99F 3E 00 - - ld a, 0 83 D1:A9A1 - - - - modHLLoop: 84 D1:A9A1 3C - - - inc a 85 D1:A9A2 BD - - - cp a, l 86 D1:A9A3 20 02 - - jr nz, modHLLoopEnd 87 D1:A9A5 3E 00 - - ld a, 0 88 D1:A9A7 - - - - modHLLoopEnd: 89 D1:A9A7 10 F8 - - djnz modHLLoop 90 D1:A9A9 67 - - - ld h, a 91 D1:A9AA C1 - - - pop bc 92 D1:A9AB C9 - - - ret 93 D1:A9AC - - - - 94 D1:A9AC - - - - 95 D1:A9AC - - - - 96 D1:A9AC - - - - ;;mul32By8 97 D1:A9AC - - - - ;;Performs an unsigned multiplication of DEHL and A. 98 D1:A9AC - - - - ;;Outputs: 99 D1:A9AC - - - - ;; DEHL: product of DEHL and A 100 D1:A9AC - - - - mul32By8: 101 D1:A9AC C5 DD E5 - push bc \ push ix 102 D1:A9AF DD 2E 08 - ld ixl, 8 103 D1:A9B2 D5 - - - push de 104 D1:A9B3 E5 - - - push hl 105 D1:A9B4 21 00 00 00 ld hl, 0 106 D1:A9B8 54 - - - ld d, h 107 D1:A9B9 5D - - - ld e, l 108 D1:A9BA - - - - mul32by8loop: 109 D1:A9BA 29 - - - add hl, hl 110 D1:A9BB CB 13 - - rl e 111 D1:A9BD CB 12 - - rl d 112 D1:A9BF 17 - - - rla 113 D1:A9C0 30 0A - - jr nc, mul32by8noAdd 114 D1:A9C2 C1 - - - pop bc 115 D1:A9C3 09 - - - add hl, bc 116 D1:A9C4 E3 - - - ex (sp), hl 117 D1:A9C5 E5 - - - push hl 118 D1:A9C6 ED 5A - - adc hl, de 119 D1:A9C8 D1 - - - pop de 120 D1:A9C9 EB - - - ex de, hl 121 D1:A9CA E3 - - - ex (sp), hl 122 D1:A9CB C5 - - - push bc 123 D1:A9CC - - - - mul32by8noAdd: 124 D1:A9CC DD 2D - - dec ixl 125 D1:A9CE 20 EA - - jr nz, mul32by8loop 126 D1:A9D0 C1 - - - pop bc 127 D1:A9D1 C1 - - - pop bc 128 D1:A9D2 DD E1 C1 - pop ix \ pop bc 129 D1:A9D5 C9 - - - ret 130 D1:A9D6 - - - - Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/std.inc" 2 D1:A9D6 - - - - #include "includes/lib/std/Random.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/Random.asm" 1 D1:A9D6 - - - - ;;randomint 2 D1:A9D6 - - - - ;;Gets an 8-bit random number. 3 D1:A9D6 - - - - ;;Inputs: 4 D1:A9D6 - - - - ;; A: Seed 5 D1:A9D6 - - - - ;;Outputs: 6 D1:A9D6 - - - - ;; A: Random number (0-255) 7 D1:A9D6 - - - - ;;Notes: 8 D1:A9D6 - - - - ;; This is not cryptographically random. 9 D1:A9D6 - - - - randomint: 10 D1:A9D6 32 29 AA D1 ld (randomintSeed), a 11 D1:A9DA E5 - - - push hl 12 D1:A9DB D5 - - - push de 13 D1:A9DC C5 - - - push bc 14 D1:A9DD 2A 29 AA D1 ld hl, (randomintSeed) 15 D1:A9E1 ED 5B 2B AA D1 - - - ld de, (randomintSeed+2) 16 D1:A9E6 44 - - - ld b, h 17 D1:A9E7 4D - - - ld c, l 18 D1:A9E8 29 CB 13 CB 12 - - - add hl, hl \ rl e \ rl d 19 D1:A9ED 29 CB 13 CB 12 - - - add hl, hl \ rl e \ rl d 20 D1:A9F2 2C - - - inc l 21 D1:A9F3 09 - - - add hl, bc 22 D1:A9F4 22 29 AA D1 ld (randomintSeed), hl 23 D1:A9F8 2A 2B AA D1 ld hl, (randomintSeed+2) 24 D1:A9FC ED 5A - - adc hl, de 25 D1:A9FE 22 2C AA D1 ld (randomintSeed+3), hl 26 D1:AA02 EB - - - ex de, hl 27 D1:AA03 2A 29 AA D1 ld hl, (randomintSeed) 28 D1:AA07 ED 5B 2D AA D1 - - - ld de, (randomintSeed+4) 29 D1:AA0C 01 5E F9 00 ld bc, 63838 30 D1:AA10 29 CB 11 CB 10 - - - add hl, hl \ rl c \ rl b 31 D1:AA15 ED 43 2F AA D1 - - - ld (randomintSeed+6), bc 32 D1:AA1A 9F - - - sbc a, a 33 D1:AA1B E6 F1 - - and %11110001 34 D1:AA1D AD - - - xor l 35 D1:AA1E 6F - - - ld l, a 36 D1:AA1F 22 30 AA D1 ld (randomintSeed+7), hl 37 D1:AA23 7A - - - ld a, d 38 D1:AA24 80 - - - add a, b 39 D1:AA25 C1 - - - pop bc 40 D1:AA26 D1 - - - pop de 41 D1:AA27 E1 - - - pop hl 42 D1:AA28 C9 - - - ret 43 D1:AA29 - - - - ;Actual random bytes 44 D1:AA29 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-shell/includes/lib/std/std.inc" 3 D1:AA39 - - - - #include "includes/lib/std/Byte.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/Byte.asm" 1 D1:AA39 - - - - ;;bytecmp 2 D1:AA39 - - - - ;;Determines if two bytes are equal. 3 D1:AA39 - - - - ;;Inputs: 4 D1:AA39 - - - - ;; HL: Byte pointer 5 D1:AA39 - - - - ;; DE: Byte pointer 6 D1:AA39 - - - - ;;Outputs: 7 D1:AA39 - - - - ;; Z: Set if equal, reset if not equal 8 D1:AA39 - - - - bytecmp: 9 D1:AA39 E5 - - - push hl 10 D1:AA3A D5 - - - push de 11 D1:AA3B 1A - - - ld a, (de) 12 D1:AA3C B7 - - - or a 13 D1:AA3D BE - - - cp (hl) 14 D1:AA3E D1 - - - pop de 15 D1:AA3F E1 - - - pop hl 16 D1:AA40 C9 - - - ret 17 D1:AA41 - - - - 18 D1:AA41 - - - - ;;bytecpy 19 D1:AA41 - - - - ;; Copies a byte. 20 D1:AA41 - - - - ;;Inputs: 21 D1:AA41 - - - - ;; HL: Byte pointer 22 D1:AA41 - - - - ;; DE: Destination 23 D1:AA41 - - - - bytecpy: 24 D1:AA41 D5 - - - push de 25 D1:AA42 E5 - - - push hl 26 D1:AA43 EB - - - ex de, hl 27 D1:AA44 1A - - - ld a, (de) 28 D1:AA45 77 - - - ld (hl), a 29 D1:AA46 E1 - - - pop hl 30 D1:AA47 D1 - - - pop de 31 D1:AA48 C9 - - - ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/std.inc" 4 D1:AA49 - - - - #include "includes/lib/std/Word.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/Word.asm" 1 D1:AA49 - - - - ;;wordcpy [Words] 2 D1:AA49 - - - - ;;Copies a word. 3 D1:AA49 - - - - ;;Inputs: 4 D1:AA49 - - - - ;; HL: word pointer 5 D1:AA49 - - - - ;; DE: Destination 6 D1:AA49 - - - - wordcpy: 7 D1:AA49 D5 - - - push de 8 D1:AA4A E5 - - - push hl 9 D1:AA4B EB - - - ex de, hl 10 D1:AA4C 1A - - - ld a, (de) 11 D1:AA4D 77 - - - ld (hl), a 12 D1:AA4E 13 - - - inc de 13 D1:AA4F 23 - - - inc hl 14 D1:AA50 1A - - - ld a, (de) 15 D1:AA51 77 - - - ld (hl), a 16 D1:AA52 E1 - - - pop hl 17 D1:AA53 D1 - - - pop de 18 D1:AA54 C9 - - - ret 19 D1:AA55 - - - - 20 D1:AA55 - - - - ;;wordcmp 21 D1:AA55 - - - - ;;Compares 2 words 22 D1:AA55 - - - - ;;Inputs: 23 D1:AA55 - - - - ;; HL: word pointer 24 D1:AA55 - - - - ;; DE: word pointer 25 D1:AA55 - - - - wordcmp: 26 D1:AA55 E5 - - - push hl 27 D1:AA56 D5 - - - push de 28 D1:AA57 1A - - - ld a, (de) 29 D1:AA58 BE - - - cp a, (hl) 30 D1:AA59 20 04 - - jr nz, wordcmpEnd 31 D1:AA5B 23 - - - inc hl 32 D1:AA5C 13 - - - inc de 33 D1:AA5D 1A - - - ld a, (de) 34 D1:AA5E BE - - - cp a, (hl) 35 D1:AA5F - - - - wordcmpEnd: 36 D1:AA5F D1 - - - pop de 37 D1:AA60 E1 - - - pop hl 38 D1:AA61 C9 - - - ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/std.inc" 5 D1:AA62 - - - - #include "includes/lib/std/Mem.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/Mem.asm" 1 D1:AA62 - - - - ;;memset 2 D1:AA62 - - - - ;;Fills B amount of bytes from hl with a 3 D1:AA62 - - - - ;;Inputs: 4 D1:AA62 - - - - ;; HL: start 5 D1:AA62 - - - - ;; B: how many bytes 6 D1:AA62 - - - - ;; A: Byte 7 D1:AA62 - - - - memset: 8 D1:AA62 E5 - - - push hl 9 D1:AA63 C5 - - - push bc 10 D1:AA64 - - - - memsetLoop: 11 D1:AA64 77 - - - ld (hl), a 12 D1:AA65 23 - - - inc hl 13 D1:AA66 10 FC - - djnz memsetLoop 14 D1:AA68 C1 - - - pop bc 15 D1:AA69 E1 - - - pop hl 16 D1:AA6A C9 - - - ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/std.inc" 6 D1:AA6B - - - - #include "includes/lib/std/Char.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/Char.asm" 1 D1:AA6B - - - - #include "includes/tables/CSC.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/tables/CSC.asm" 1 D1:AA6B - - - - charMapCSC: 2 D1:AA6B 22 57 52 4D 48 FF FF - .DB "\"WRMH", $FF, $FF 3 D1:AA72 3F 5B 56 51 4C 47 FF FF .DB Lquestion, Ltheta, "VQLG", $FF, $FF 4 D1:AA7A 3A 5A 55 50 4B 46 43 FF .DB ":ZUPKFC", $FF 5 D1:AA82 20 59 54 4F 4A 45 42 FF .DB " YTOJEB", $FF 6 D1:AA8A FF 58 53 4E 49 44 41 - .DB $FF, "XSNIDA" 7 D1:AA91 - - - - 8 D1:AA91 - - - - numsymMapCSC 9 D1:AA91 2B 2D 2A 2F 5E FF FF - .DB "+-*/^", $FF, $FF 10 D1:AA98 5F 33 36 39 29 C1 5D FF .DB "_369)", $C1, "]", $FF 11 D1:AAA0 2E 32 35 38 28 7B 7D 3B .DB ".258({};" 12 D1:AAA8 30 31 34 37 2C 20 3C 3E 7C FF - - .DB "0147, <>|", $FF 13 D1:AAB2 05 21 40 23 25 26 - - .DB $05, "!@#%&" 14 D1:AAB8 - - - - 15 D1:AAB8 - - - - numMapCSC 16 D1:AAB8 FF FF FF FF FF FF FF - .DB $FF, $FF, $FF, $FF, $FF, $FF, $FF 17 D1:AABF FF 33 36 39 FF FF FF FF .DB $FF, "369", $FF, $FF, $FF, $FF 18 D1:AAC7 FF 32 35 38 FF FF FF FF .DB $FF, "258", $FF, $FF, $FF, $FF 19 D1:AACF 30 31 34 37 FF FF FF FF FF FF - - .DB "0147", $FF, $FF, $FF, $FF, $FF, $FF 20 D1:AAD9 FF FF FF FF FF FF - - .DB $FF, $FF, $FF, $FF, $FF, $FF Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/Char.asm" 2 D1:AADF - - - - ;;chartoascii 3 D1:AADF - - - - ;;Converts a char to "ascii" 4 D1:AADF - - - - ;;Inputs: 5 D1:AADF - - - - ;; A: char code (csc) 6 D1:AADF - - - - ;;Outputs: 7 D1:AADF - - - - ;; A: ascii char 8 D1:AADF - - - - chartoascii: 9 D1:AADF E5 - - - push hl 10 D1:AAE0 21 00 00 00 ld hl, 0 11 D1:AAE4 26 00 - - ld h, 0 12 D1:AAE6 6F - - - ld l, a 13 D1:AAE7 11 6B AA D1 ld de, charMapCSC 14 D1:AAEB 19 - - - add hl, de 15 D1:AAEC 7E - - - ld a, (hl) 16 D1:AAED E1 - - - pop hl 17 D1:AAEE C9 - - - ret 18 D1:AAEF - - - - 19 D1:AAEF - - - - ;;Charnumtoascii 20 D1:AAEF - - - - ;;Converts a char to "ascii" 21 D1:AAEF - - - - ;;Inputs: 22 D1:AAEF - - - - ;; A: char code (csc) 23 D1:AAEF - - - - ;;Outputs: 24 D1:AAEF - - - - ;; A: ascii char 25 D1:AAEF - - - - charnumtoascii: 26 D1:AAEF E5 - - - push hl 27 D1:AAF0 21 00 00 00 ld hl, 0 28 D1:AAF4 26 00 - - ld h, 0 29 D1:AAF6 6F - - - ld l, a 30 D1:AAF7 11 B8 AA D1 ld de, numMapCSC 31 D1:AAFB 19 - - - add hl, de 32 D1:AAFC 7E - - - ld a, (hl) 33 D1:AAFD E1 - - - pop hl 34 D1:AAFE C9 - - - ret 35 D1:AAFF - - - - 36 D1:AAFF - - - - ;;charnumsymtoascii 37 D1:AAFF - - - - ;;Converts a char to "ascii" 38 D1:AAFF - - - - ;;Inputs: 39 D1:AAFF - - - - ;; A: char code (csc) 40 D1:AAFF - - - - ;;Outputs: 41 D1:AAFF - - - - ;; A: ascii char 42 D1:AAFF - - - - charnumsymtoascii: 43 D1:AAFF E5 - - - push hl 44 D1:AB00 21 00 00 00 ld hl, 0 45 D1:AB04 26 00 - - ld h, 0 46 D1:AB06 6F - - - ld l, a 47 D1:AB07 11 91 AA D1 ld de, numsymMapCSC 48 D1:AB0B 19 - - - add hl, de 49 D1:AB0C 7E - - - ld a, (hl) 50 D1:AB0D E1 - - - pop hl 51 D1:AB0E C9 - - - ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/std.inc" 7 D1:AB0F - - - - #include "includes/lib/std/Cursor.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/Cursor.asm" 1 D1:AB0F - - - - ;;cursorcharunderreset 2 D1:AB0F - - - - ;;Sets curUnder to 0 3 D1:AB0F - - - - cursorcurunderreset: 4 D1:AB0F E5 - - - push hl 5 D1:AB10 21 99 05 D0 ld hl, curUnder 6 D1:AB14 36 20 - - ld (hl), ' ' 7 D1:AB16 E1 - - - pop hl 8 D1:AB17 C9 - - - ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/std.inc" 8 D1:AB18 - - - - #include "includes/lib/std/Print.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/Print.asm" 1 D1:AB18 - - - - ;;printprompt 2 D1:AB18 - - - - ;;Sets curcol to 0 and prints prompt 3 D1:AB18 - - - - ;;Inputs: 4 D1:AB18 - - - - ;; HL: Prompt String Location 5 D1:AB18 - - - - printprompt: 6 D1:AB18 E5 - - - push hl 7 D1:AB19 AF - - - xor a 8 D1:AB1A 32 96 05 D0 ld (CurCol), a 9 D1:AB1E CD C0 07 02 call _PutS 10 D1:AB22 E1 - - - pop hl 11 D1:AB23 C9 - - - ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/std.inc" 9 D1:AB24 - - - - #include "includes/lib/std/Draw.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/Draw.asm" 1 D1:AB24 - - - - ;;drawpixel 2 D1:AB24 - - - - ;;Sets a pixel to specified color (565) 3 D1:AB24 - - - - ;;Inputs: 4 D1:AB24 - - - - ;; HL: color 5 D1:AB24 - - - - ;; DE: vRam location 6 D1:AB24 - - - - drawpixel: 7 D1:AB24 E5 - - - push hl 8 D1:AB25 D5 - - - push de 9 D1:AB26 EB - - - ex de, hl 10 D1:AB27 73 - - - ld (hl), e 11 D1:AB28 23 - - - inc hl 12 D1:AB29 72 - - - ld (hl), d 13 D1:AB2A D1 - - - pop de 14 D1:AB2B E1 - - - pop hl 15 D1:AB2C C9 - - - ret 16 D1:AB2D - - - - 17 D1:AB2D - - - - ;;drawpixelxy 18 D1:AB2D - - - - ;;Sets a pixel to specified color 19 D1:AB2D - - - - ;;Inputs: 20 D1:AB2D - - - - ;; HL: color 21 D1:AB2D - - - - ;; DE: x 22 D1:AB2D - - - - ;; A: y 23 D1:AB2D - - - - drawpixelxy 24 D1:AB2D D5 - - - push de 25 D1:AB2E E5 - - - push hl 26 D1:AB2F EB - - - ex de, hl 27 D1:AB30 29 - - - add hl, hl 28 D1:AB31 E5 - - - push hl 29 D1:AB32 21 80 02 00 ld hl, 640 30 D1:AB36 CD 8B A9 D1 call mulAbyHL 31 D1:AB3A EB - - - ex de, hl 32 D1:AB3B E1 - - - pop hl 33 D1:AB3C 19 - - - add hl, de 34 D1:AB3D 11 00 00 D4 ld de, vRam 35 D1:AB41 19 - - - add hl, de 36 D1:AB42 EB - - - ex de, hl 37 D1:AB43 E1 - - - pop hl 38 D1:AB44 CD 24 AB D1 call drawpixel 39 D1:AB48 D1 - - - pop de 40 D1:AB49 C9 - - - ret 41 D1:AB4A - - - - 42 D1:AB4A - - - - ;;drawrow 43 D1:AB4A - - - - ;;Draws a row on lcd 44 D1:AB4A - - - - ;;Inputs: 45 D1:AB4A - - - - ;; A: y 46 D1:AB4A - - - - ;; HL: color 47 D1:AB4A - - - - drawrow: 48 D1:AB4A E5 - - - push hl 49 D1:AB4B C5 - - - push bc 50 D1:AB4C E5 - - - push hl 51 D1:AB4D 21 E0 01 00 ld hl, lcdHeight * 2 52 D1:AB51 CD 8B A9 D1 call mulAbyHL 53 D1:AB55 11 00 00 D4 ld de, vRam 54 D1:AB59 19 - - - add hl, de 55 D1:AB5A EB - - - ex de, hl 56 D1:AB5B E1 - - - pop hl 57 D1:AB5C 01 40 01 00 ld bc, lcdWidth 58 D1:AB60 - - - - drawrowLoop: 59 D1:AB60 CD 24 AB D1 call drawpixel 60 D1:AB64 13 - - - inc de 61 D1:AB65 13 - - - inc de 62 D1:AB66 0B - - - dec bc 63 D1:AB67 E5 - - - push hl 64 D1:AB68 21 00 00 00 ld hl, 0 65 D1:AB6C CD 76 A9 D1 call cpHLBC 66 D1:AB70 E1 - - - pop hl 67 D1:AB71 20 ED - - jr nz, drawrowLoop 68 D1:AB73 C1 - - - pop bc 69 D1:AB74 E1 - - - pop hl 70 D1:AB75 C9 - - - ret 71 D1:AB76 - - - - 72 D1:AB76 - - - - ;;drawbar 73 D1:AB76 - - - - ;;Loops drawing row 74 D1:AB76 - - - - ;;Inputs: 75 D1:AB76 - - - - ;; A: y 76 D1:AB76 - - - - ;; [B]C: height 77 D1:AB76 - - - - ;; HL: color 78 D1:AB76 - - - - drawbar: 79 D1:AB76 C5 - - - push bc 80 D1:AB77 - - - - drawbarLoop: 81 D1:AB77 CD 4A AB D1 call drawrow 82 D1:AB7B 0B - - - dec bc 83 D1:AB7C 3C - - - inc a 84 D1:AB7D E5 - - - push hl 85 D1:AB7E 21 00 00 00 ld hl, 0 86 D1:AB82 CD 76 A9 D1 call cpHLBC 87 D1:AB86 E1 - - - pop hl 88 D1:AB87 20 EE - - jr nz, drawbarLoop 89 D1:AB89 C1 - - - pop bc 90 D1:AB8A C9 - - - ret 91 D1:AB8B - - - - 92 D1:AB8B - - - - ;;drawrectfilled 93 D1:AB8B - - - - ;;Draws a rectangle from coordinates (Slow) 94 D1:AB8B - - - - ;;Inputs: 95 D1:AB8B - - - - ;; DE: x 96 D1:AB8B - - - - ;; C: y 97 D1:AB8B - - - - ;; HL: width 98 D1:AB8B - - - - ;; A: height 99 D1:AB8B - - - - ;; IXH+IXL: color 100 D1:AB8B - - - - drawrectfilled: 101 D1:AB8B 19 - - - add hl, de 102 D1:AB8C 81 - - - add a, c 103 D1:AB8D 47 - - - ld b, a 104 D1:AB8E - - - - drawrectfilledLoopY: 105 D1:AB8E D5 - - - push de 106 D1:AB8F - - - - drawrectfilledLoopX: 107 D1:AB8F E5 - - - push hl 108 D1:AB90 C5 - - - push bc 109 D1:AB91 EB - - - ex de, hl 110 D1:AB92 DD 54 - - ld d, ixh 111 D1:AB94 DD 5D - - ld e, ixl 112 D1:AB96 EB - - - ex de, hl 113 D1:AB97 79 - - - ld a, c 114 D1:AB98 CD 2D AB D1 call drawpixelxy 115 D1:AB9C C1 - - - pop bc 116 D1:AB9D E1 - - - pop hl 117 D1:AB9E 13 - - - inc de 118 D1:AB9F CD 71 A9 D1 call cpHLDE 119 D1:ABA3 20 EA - - jr nz, drawrectfilledLoopX 120 D1:ABA5 D1 - - - pop de 121 D1:ABA6 0C - - - inc c 122 D1:ABA7 78 - - - ld a, b 123 D1:ABA8 B9 - - - cp c 124 D1:ABA9 20 E3 - - jr nz, drawrectfilledLoopY 125 D1:ABAB C9 - - - ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/std.inc" 10 D1:ABAC - - - - #include "includes/lib/std/Array.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/Array.asm" 1 D1:ABAC - - - - ;;array2d 2 D1:ABAC - - - - ;;gets the address of 2d array 3 D1:ABAC - - - - ;;Inputs: 4 D1:ABAC - - - - ;; H: y 5 D1:ABAC - - - - ;; L: x width 6 D1:ABAC - - - - ;; B: x 7 D1:ABAC - - - - ;; DE: Array start 8 D1:ABAC - - - - ;;Outputs: 9 D1:ABAC - - - - ;; DE: Array loc address 10 D1:ABAC - - - - array2d: 11 D1:ABAC E5 - - - push hl 12 D1:ABAD ED 6C - - mlt hl 13 D1:ABAF 19 - - - add hl, de 14 D1:ABB0 11 00 00 00 ld de, 0 15 D1:ABB4 58 - - - ld e, b 16 D1:ABB5 19 - - - add hl, de 17 D1:ABB6 EB - - - ex de, hl 18 D1:ABB7 E1 - - - pop hl 19 D1:ABB8 C9 - - - ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/std.inc" 11 D1:ABB9 - - - - #include "includes/lib/std/Hex.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/Hex.asm" 1 D1:ABB9 - - - - ;;bytetohexstr 2 D1:ABB9 - - - - ;;converts byte to hex string 3 D1:ABB9 - - - - ;;Inputs: 4 D1:ABB9 - - - - ;; A: input byte 5 D1:ABB9 - - - - ;;Outputs: 6 D1:ABB9 - - - - ;; hl: output string location 7 D1:ABB9 - - - - bytetohexstr: 8 D1:ABB9 E5 - - - push hl 9 D1:ABBA C5 - - - push bc 10 D1:ABBB 01 00 00 00 ld bc, 0 11 D1:ABBF 4F - - - ld c, a 12 D1:ABC0 06 0F - - ld b, $0F 13 D1:ABC2 A0 - - - and a, b 14 D1:ABC3 47 - - - ld b, a 15 D1:ABC4 79 - - - ld a, c 16 D1:ABC5 48 - - - ld c, b 17 D1:ABC6 06 00 - - ld b, 0 18 D1:ABC8 21 02 AC D1 ld hl, hexLUT 19 D1:ABCC 09 - - - add hl, bc 20 D1:ABCD 46 - - - ld b, (hl) 21 D1:ABCE 21 FF AB D1 ld hl, bytetohexstrBuf + 1 22 D1:ABD2 70 - - - ld (hl), b 23 D1:ABD3 C1 - - - pop bc 24 D1:ABD4 C5 - - - push bc 25 D1:ABD5 01 00 00 00 ld bc, 0 26 D1:ABD9 CB 3F - - srl a 27 D1:ABDB CB 3F - - srl a 28 D1:ABDD CB 3F - - srl a 29 D1:ABDF CB 3F - - srl a 30 D1:ABE1 47 - - - ld b, a 31 D1:ABE2 79 - - - ld a, c 32 D1:ABE3 48 - - - ld c, b 33 D1:ABE4 06 00 - - ld b, 0 34 D1:ABE6 21 02 AC D1 ld hl, hexLUT 35 D1:ABEA 09 - - - add hl, bc 36 D1:ABEB 46 - - - ld b, (hl) 37 D1:ABEC 21 FE AB D1 ld hl, bytetohexstrBuf 38 D1:ABF0 70 - - - ld (hl), b 39 D1:ABF1 C1 - - - pop bc 40 D1:ABF2 21 00 AC D1 ld hl, bytetohexstrBuf + 2 41 D1:ABF6 36 00 - - ld (hl), $00 42 D1:ABF8 E1 - - - pop hl 43 D1:ABF9 21 FE AB D1 ld hl, bytetohexstrBuf 44 D1:ABFD C9 - - - ret 45 D1:ABFE - - - - 46 D1:ABFE 00 00 00 00 bytetohexstrBuf: .db $00, $00, $00, $00 47 D1:AC02 - - - - 48 D1:AC02 - - - - #include "includes/tables/hexLUT.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/tables/hexLUT.asm" 1 D1:AC02 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-shell/includes/lib/std/Hex.asm" 49 D1:AC13 - - - - 50 D1:AC13 - - - - ;;hexToA 51 D1:AC13 - - - - ;;Converts a hexadecimal string to a number. 52 D1:AC13 - - - - ;;Inputs: 53 D1:AC13 - - - - ;; HL: String pointer 54 D1:AC13 - - - - ;;Outputs: 55 D1:AC13 - - - - ;; A: Value 56 D1:AC13 - - - - hexToA: 57 D1:AC13 C5 - - - push bc 58 D1:AC14 E5 - - - push hl 59 D1:AC15 06 00 - - ld b, 0 60 D1:AC17 7E - - - _: ld a, (hl) 61 D1:AC18 B7 - - - or a 62 D1:AC19 28 11 - - jr z, hexToA_ret 63 D1:AC1B CB 10 CB 10 CB 10 CB 10 rl b \ rl b \ rl b \ rl b 64 D1:AC23 CD 30 AC D1 call hexToA_doConvert 65 D1:AC27 B0 - - - or b 66 D1:AC28 47 - - - ld b, a 67 D1:AC29 23 - - - inc hl 68 D1:AC2A 18 EB - - jr -_ 69 D1:AC2C - - - - hexToA_ret: 70 D1:AC2C 78 - - - ld a, b 71 D1:AC2D E1 - - - pop hl 72 D1:AC2E C1 - - - pop bc 73 D1:AC2F C9 - - - ret 74 D1:AC30 - - - - 75 D1:AC30 - - - - hexToA_doConvert: 76 D1:AC30 FE 61 - - cp 'a' ; Convert to lowercase 77 D1:AC32 38 02 - - jr c, _ 78 D1:AC34 D6 20 - - sub 'a' - 'A' 79 D1:AC36 FE 41 - - _: cp 'A' ; Close gap between numbers and letter 80 D1:AC38 38 02 - - jr c, _ 81 D1:AC3A D6 07 - - sub 'A'-('9'+1) 82 D1:AC3C D6 30 - - _: sub '0' ; To number 83 D1:AC3E C9 - - - ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/std.inc" 12 D1:AC3F - - - - 13 D1:AC3F - - - - #include "includes/lib/std/String.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/String.asm" 1 D1:AC3F - - - - ;;strlen 2 D1:AC3F - - - - ;;Determines the length of a zero delimited string. 3 D1:AC3F - - - - ;;Inputs: 4 D1:AC3F - - - - ;; HL: String pointer 5 D1:AC3F - - - - ;;Outputs: 6 D1:AC3F - - - - ;; BC: String length 7 D1:AC3F - - - - strlen: 8 D1:AC3F F5 - - - push af 9 D1:AC40 E5 - - - push hl 10 D1:AC41 AF - - - xor a 11 D1:AC42 47 - - - ld b, a 12 D1:AC43 4F - - - ld c, a 13 D1:AC44 ED B1 - - cpir 14 D1:AC46 - - - - ; bc = -bc 15 D1:AC46 AF 91 4F 9F 90 47 - - xor a \ sub c \ ld c, a \ sbc a, a \ sub b \ ld b, a 16 D1:AC4C 0B - - - dec bc 17 D1:AC4D E1 - - - pop hl 18 D1:AC4E F1 - - - pop af 19 D1:AC4F C9 - - - ret 20 D1:AC50 - - - - 21 D1:AC50 - - - - ;;strcmp 22 D1:AC50 - - - - ;;Determines if two strings are equal, and checks alphabetical sort order. 23 D1:AC50 - - - - ;;Inputs: 24 D1:AC50 - - - - ;; HL: String pointer 25 D1:AC50 - - - - ;; DE: String pointer 26 D1:AC50 - - - - ;;Outputs: 27 D1:AC50 - - - - ;; Z: Set if equal, reset if not equal 28 D1:AC50 - - - - ;; C: Set if string HL is alphabetically earlier than string DE 29 D1:AC50 - - - - strcmp: 30 D1:AC50 E5 - - - push hl 31 D1:AC51 D5 - - - push de 32 D1:AC52 - - - - strcmpLoop: 33 D1:AC52 1A - - - ld a, (de) 34 D1:AC53 B7 - - - or a 35 D1:AC54 28 07 - - jr z, strCmpEnd 36 D1:AC56 BE - - - cp (hl) 37 D1:AC57 20 06 - - jr nz, strcmpExit 38 D1:AC59 23 - - - inc hl 39 D1:AC5A 13 - - - inc de 40 D1:AC5B 18 F5 - - jr strcmpLoop 41 D1:AC5D - - - - strcmpEnd: 42 D1:AC5D 7E - - - ld a, (hl) 43 D1:AC5E B7 - - - or a 44 D1:AC5F - - - - strcmpExit: 45 D1:AC5F 3F - - - ccf 46 D1:AC60 D1 - - - pop de 47 D1:AC61 E1 - - - pop hl 48 D1:AC62 C9 - - - ret 49 D1:AC63 - - - - 50 D1:AC63 - - - - ;;strcpy 51 D1:AC63 - - - - ;;Copies a string. 52 D1:AC63 - - - - ;;Inputs: 53 D1:AC63 - - - - ;; HL: String pointer 54 D1:AC63 - - - - ;; DE: Destination 55 D1:AC63 - - - - ;;Notes: 56 D1:AC63 - - - - ;; This will trample into undefined territory if you try to copy a string into some 57 D1:AC63 - - - - ;;allocated memory it won't fit in. 58 D1:AC63 - - - - strcpy: 59 D1:AC63 D5 - - - push de 60 D1:AC64 E5 - - - push hl 61 D1:AC65 EB - - - ex de, hl 62 D1:AC66 1A - - - _: ld a, (de) 63 D1:AC67 77 - - - ld (hl), a 64 D1:AC68 B7 - - - or a 65 D1:AC69 28 04 - - jr z, _ 66 D1:AC6B 23 13 - - inc hl \ inc de 67 D1:AC6D 18 F7 - - jr -_ 68 D1:AC6F E1 - - - _: pop hl 69 D1:AC70 D1 - - - pop de 70 D1:AC71 C9 - - - ret 71 D1:AC72 - - - - 72 D1:AC72 - - - - ;;strchr 73 D1:AC72 - - - - ;;Returns a pointer on the first occurence of a character in a string. 74 D1:AC72 - - - - ;;Inputs: 75 D1:AC72 - - - - ;; HL: Haystack 76 D1:AC72 - - - - ;; B: Needle 77 D1:AC72 - - - - ;;Outputs: 78 D1:AC72 - - - - ;; HL: Pointer to first occurence of character 79 D1:AC72 - - - - ;; Z: Set if character found 80 D1:AC72 - - - - ;; A: Destroyed 81 D1:AC72 - - - - strchr: 82 D1:AC72 - - - - strchrLoop: 83 D1:AC72 7E - - - ld a, (hl) 84 D1:AC73 B7 - - - or a 85 D1:AC74 28 05 - - jr z, strchrNoCharFound 86 D1:AC76 B8 - - - cp b 87 D1:AC77 C8 - - - ret z 88 D1:AC78 23 - - - inc hl 89 D1:AC79 18 F7 - - jr strchrLoop 90 D1:AC7B - - - - strchrNoCharFound: 91 D1:AC7B 3C - - - inc a 92 D1:AC7C C9 - - - ret 93 D1:AC7D - - - - 94 D1:AC7D - - - - ;;strtob 95 D1:AC7D - - - - ;;Converts a string to a byte 96 D1:AC7D - - - - ;;Inputs: 97 D1:AC7D - - - - ;; HL: string pointer 98 D1:AC7D - - - - ;;Outputs: 99 D1:AC7D - - - - ;; A: byte 100 D1:AC7D - - - - strtob: 101 D1:AC7D C5 - - - push bc 102 D1:AC7E D5 - - - push de 103 D1:AC7F 0E 00 - - ld c, 0 104 D1:AC81 - - - - strtobNumFind: 105 D1:AC81 7E - - - ld a, (hl) 106 D1:AC82 FE 00 - - cp $00 107 D1:AC84 CA D6 AC D1 jp z, strtobEXIT 108 D1:AC88 0E 00 - - ld c, 0 109 D1:AC8A D6 31 - - sub '1' 110 D1:AC8C FE 3A - - cp '9' + 1 111 D1:AC8E 38 03 - - jr c, strtobNumWhile 112 D1:AC90 23 - - - inc hl 113 D1:AC91 18 EE - - jr strtobNumFind 114 D1:AC93 - - - - strtobNumWhile: 115 D1:AC93 E5 - - - push hl 116 D1:AC94 - - - - strtobNumWhileLoop: 117 D1:AC94 79 - - - ld a, c 118 D1:AC95 FE 03 - - cp 3 119 D1:AC97 D2 A8 AC D1 jp nc, strtobConvert 120 D1:AC9B 7E - - - ld a, (hl) 121 D1:AC9C D6 2F - - sub '0' - 1 122 D1:AC9E 38 08 - - jr c, strtobConvert 123 D1:ACA0 FE 3A - - cp '9' + 1 124 D1:ACA2 30 04 - - jr nc, strtobConvert 125 D1:ACA4 23 - - - inc hl 126 D1:ACA5 0C - - - inc c 127 D1:ACA6 18 EC - - jr strtobNumWhileLoop 128 D1:ACA8 - - - - strtobConvert: 129 D1:ACA8 2B - - - dec hl 130 D1:ACA9 7E - - - ld a, (hl) 131 D1:ACAA D6 30 - - sub '0' 132 D1:ACAC 4F - - - ld c, a 133 D1:ACAD 2B - - - dec hl 134 D1:ACAE D1 - - - pop de 135 D1:ACAF CD 71 A9 D1 call cpHLDE 136 D1:ACB3 DA D6 AC D1 jp c, strtobExit 137 D1:ACB7 7E - - - ld a, (hl) 138 D1:ACB8 D6 30 - - sub '0' 139 D1:ACBA 06 0A - - ld b, 10 140 D1:ACBC CD 83 A9 D1 call mulAbyB 141 D1:ACC0 81 - - - add a, c 142 D1:ACC1 4F - - - ld c, a 143 D1:ACC2 2B - - - dec hl 144 D1:ACC3 CD 71 A9 D1 call cpHLDE 145 D1:ACC7 DA D6 AC D1 jp c, strtobExit 146 D1:ACCB 7E - - - ld a, (hl) 147 D1:ACCC D6 30 - - sub '0' 148 D1:ACCE 06 64 - - ld b, 100 149 D1:ACD0 CD 83 A9 D1 call mulAbyB 150 D1:ACD4 81 - - - add a, c 151 D1:ACD5 4F - - - ld c, a 152 D1:ACD6 - - - - strtobExit: 153 D1:ACD6 79 - - - ld a, c 154 D1:ACD7 D1 - - - pop de 155 D1:ACD8 C1 - - - pop bc 156 D1:ACD9 C9 - - - ret 157 D1:ACDA - - - - 158 D1:ACDA - - - - ;;strtow 159 D1:ACDA - - - - ;;Converts a string to a byte 160 D1:ACDA - - - - ;;Inputs: 161 D1:ACDA - - - - ;; HL: string pointer 162 D1:ACDA - - - - ;;Outputs: 163 D1:ACDA - - - - ;; HL: byte 164 D1:ACDA - - - - strtow: 165 D1:ACDA C5 - - - push bc 166 D1:ACDB D5 - - - push de 167 D1:ACDC 01 00 00 00 ld bc, 0 168 D1:ACE0 - - - - strtowNumFind: 169 D1:ACE0 7E - - - ld a, (hl) 170 D1:ACE1 FE 00 - - cp $00 171 D1:ACE3 CA 79 AD D1 jp z, strtowEXIT 172 D1:ACE7 0E 00 - - ld c, 0 173 D1:ACE9 D6 31 - - sub '1' 174 D1:ACEB FE 3A - - cp '9' + 1 175 D1:ACED 38 03 - - jr c, strtowNumWhile 176 D1:ACEF 23 - - - inc hl 177 D1:ACF0 18 EE - - jr strtowNumFind 178 D1:ACF2 - - - - strtowNumWhile: 179 D1:ACF2 E5 - - - push hl 180 D1:ACF3 - - - - strtowNumWhileLoop: 181 D1:ACF3 79 - - - ld a, c 182 D1:ACF4 FE 05 - - cp 5 183 D1:ACF6 D2 07 AD D1 jp nc, strtowConvert 184 D1:ACFA 7E - - - ld a, (hl) 185 D1:ACFB D6 2F - - sub '0' - 1 186 D1:ACFD 38 08 - - jr c, strtowConvert 187 D1:ACFF FE 3A - - cp '9' + 1 188 D1:AD01 30 04 - - jr nc, strtowConvert 189 D1:AD03 23 - - - inc hl 190 D1:AD04 0C - - - inc c 191 D1:AD05 18 EC - - jr strtowNumWhileLoop 192 D1:AD07 - - - - strtowConvert: 193 D1:AD07 01 00 00 00 ld bc, 0 194 D1:AD0B 2B - - - dec hl 195 D1:AD0C 7E - - - ld a, (hl) 196 D1:AD0D D6 30 - - sub '0' 197 D1:AD0F 01 00 00 00 ld bc, 0 198 D1:AD13 4F - - - ld c, a 199 D1:AD14 2B - - - dec hl 200 D1:AD15 - - - - 201 D1:AD15 D1 - - - pop de 202 D1:AD16 CD 71 A9 D1 call cpHLDE 203 D1:AD1A DA 79 AD D1 jp c, strtowExit 204 D1:AD1E 7E - - - ld a, (hl) 205 D1:AD1F D6 30 - - sub '0' 206 D1:AD21 E5 - - - push hl 207 D1:AD22 21 0A 00 00 ld hl, 10 208 D1:AD26 CD 8B A9 D1 call mulAbyHL 209 D1:AD2A 09 - - - add hl, bc 210 D1:AD2B 44 - - - ld b, h 211 D1:AD2C 4D - - - ld c, l 212 D1:AD2D E1 - - - pop hl 213 D1:AD2E 2B - - - dec hl 214 D1:AD2F - - - - 215 D1:AD2F CD 71 A9 D1 call cpHLDE 216 D1:AD33 DA 79 AD D1 jp c, strtowExit 217 D1:AD37 7E - - - ld a, (hl) 218 D1:AD38 D6 30 - - sub '0' 219 D1:AD3A E5 - - - push hl 220 D1:AD3B 21 64 00 00 ld hl, 100 221 D1:AD3F CD 8B A9 D1 call mulAbyHL 222 D1:AD43 09 - - - add hl, bc 223 D1:AD44 44 - - - ld b, h 224 D1:AD45 4D - - - ld c, l 225 D1:AD46 E1 - - - pop hl 226 D1:AD47 2B - - - dec hl 227 D1:AD48 - - - - 228 D1:AD48 CD 71 A9 D1 call cpHLDE 229 D1:AD4C DA 79 AD D1 jp c, strtowExit 230 D1:AD50 7E - - - ld a, (hl) 231 D1:AD51 D6 30 - - sub '0' 232 D1:AD53 E5 - - - push hl 233 D1:AD54 21 E8 03 00 ld hl, 1000 234 D1:AD58 CD 8B A9 D1 call mulAbyHL 235 D1:AD5C 09 - - - add hl, bc 236 D1:AD5D 44 - - - ld b, h 237 D1:AD5E 4D - - - ld c, l 238 D1:AD5F E1 - - - pop hl 239 D1:AD60 2B - - - dec hl 240 D1:AD61 - - - - 241 D1:AD61 CD 71 A9 D1 call cpHLDE 242 D1:AD65 DA 79 AD D1 jp c, strtowExit 243 D1:AD69 7E - - - ld a, (hl) 244 D1:AD6A D6 30 - - sub '0' 245 D1:AD6C E5 - - - push hl 246 D1:AD6D 21 10 27 00 ld hl, 10000 247 D1:AD71 CD 8B A9 D1 call mulAbyHL 248 D1:AD75 09 - - - add hl, bc 249 D1:AD76 44 - - - ld b, h 250 D1:AD77 4D - - - ld c, l 251 D1:AD78 E1 - - - pop hl 252 D1:AD79 - - - - 253 D1:AD79 - - - - strtowExit: 254 D1:AD79 21 00 00 00 ld hl, 0 255 D1:AD7D 60 - - - ld h, b 256 D1:AD7E 69 - - - ld l, c 257 D1:AD7F D1 - - - pop de 258 D1:AD80 C1 - - - pop bc 259 D1:AD81 C9 - - - ret 260 D1:AD82 - - - - 261 D1:AD82 - - - - ;;strxor 262 D1:AD82 - - - - ;;xor 2 strings together 263 D1:AD82 - - - - ;;Inputs: 264 D1:AD82 - - - - ;; HL: string 1 265 D1:AD82 - - - - ;; DE: string 2 266 D1:AD82 - - - - ;;Outputs: 267 D1:AD82 - - - - ;; HL: Xor String Pointer 268 D1:AD82 - - - - strxor: 269 D1:AD82 E5 - - - push hl 270 D1:AD83 D5 - - - push de 271 D1:AD84 EB - - - ex de, hl 272 D1:AD85 - - - - strxorLoop: 273 D1:AD85 1A - - - ld a, (de) 274 D1:AD86 B7 - - - or a, a 275 D1:AD87 28 0A - - jr z, strxorEnd 276 D1:AD89 AE - - - xor (hl) 277 D1:AD8A B7 - - - or a, a 278 D1:AD8B 20 01 - - jr nz, strxorLoopLD 279 D1:AD8D 7E - - - ld a, (hl) 280 D1:AD8E - - - - strxorLoopLD: 281 D1:AD8E 12 - - - ld (de), a 282 D1:AD8F 13 - - - inc de 283 D1:AD90 23 - - - inc hl 284 D1:AD91 18 F2 - - jr strxorLoop 285 D1:AD93 - - - - strxorEnd: 286 D1:AD93 D1 - - - pop de 287 D1:AD94 E1 - - - pop hl 288 D1:AD95 C9 - - - ret 289 D1:AD96 - - - - 290 D1:AD96 - - - - 291 D1:AD96 - - - - ;;toLower [Strings] 292 D1:AD96 - - - - ;;Converts every alpha character of a string to lowercase. 293 D1:AD96 - - - - ;;Inputs: 294 D1:AD96 - - - - ;; HL: Pointer to string 295 D1:AD96 - - - - ;;Notes: 296 D1:AD96 - - - - ;; This modifies the string in-place. 297 D1:AD96 - - - - ;toLower: 298 D1:AD96 - - - - ; push af \ push hl 299 D1:AD96 - - - - ; ld a, (hl) 300 D1:AD96 - - - - ; or a 301 D1:AD96 - - - - ; jr z, toLowerExit 302 D1:AD96 - - - - ; call isAlphaNum 303 D1:AD96 - - - - ; jr nc, toLowerNotUpperAlpha 304 D1:AD96 - - - - ; cp 'a' 305 D1:AD96 - - - - ; jr nc, toLowerNotUpperAlpha 306 D1:AD96 - - - - ; add a, 'a' - 'A' 307 D1:AD96 - - - - ; ld (hl), a 308 D1:AD96 - - - - ;toLowerNotUpperAlpha: 309 D1:AD96 - - - - ; inc hl 310 D1:AD96 - - - - ; jr toLower + 2 311 D1:AD96 - - - - ;toLowerExit: 312 D1:AD96 - - - - ; pop hl \ pop af 313 D1:AD96 - - - - ; ret 314 D1:AD96 - - - - 315 D1:AD96 - - - - ;;toUpper [Strings] 316 D1:AD96 - - - - ;;Converts every alpha character of a string to uppercase. 317 D1:AD96 - - - - ;;Inputs: 318 D1:AD96 - - - - ;; HL: Pointer to string 319 D1:AD96 - - - - ;;Notes: 320 D1:AD96 - - - - ;; This modifies the string in-place. 321 D1:AD96 - - - - ;toUpper: 322 D1:AD96 - - - - ; push af \ push hl 323 D1:AD96 - - - - ; ld a, (hl) 324 D1:AD96 - - - - ; or a 325 D1:AD96 - - - - ; jr z, toUpperExit 326 D1:AD96 - - - - ; call isAlphaNum 327 D1:AD96 - - - - ; jr nc, toUpperNotLowerAlpha 328 D1:AD96 - - - - ; cp 'a' 329 D1:AD96 - - - - ; jr c, toUpperNotLowerAlpha 330 D1:AD96 - - - - ; sub 'a' - 'A' 331 D1:AD96 - - - - ; ld (hl), a 332 D1:AD96 - - - - ;toUpperNotLowerAlpha: 333 D1:AD96 - - - - ; inc hl 334 D1:AD96 - - - - ; jr toUpper + 2 335 D1:AD96 - - - - ;toUpperExit: 336 D1:AD96 - - - - ; pop hl \ pop af 337 D1:AD96 - - - - ; ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/std.inc" 14 D1:AD96 - - - - 15 D1:AD96 - - - - #include "includes/lib/std/Input.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/Input.asm" 1 D1:AD96 - - - - ;;inputgetkey 2 D1:AD96 - - - - ;;Gets keycode 3 D1:AD96 - - - - ;;Outputs: 4 D1:AD96 - - - - ;; A: keycode 5 D1:AD96 - - - - ;;Destroys: 6 D1:AD96 - - - - ;; DE 7 D1:AD96 - - - - inputgetkey: 8 D1:AD96 EB - - - ex de, hl 9 D1:AD97 CD 4C 01 02 call _GetCSC 10 D1:AD9B EB - - - ex de, hl 11 D1:AD9C B7 - - - or a 12 D1:AD9D 28 F7 - - jr z, inputgetkey 13 D1:AD9F C9 - - - ret 14 D1:ADA0 - - - - 15 D1:ADA0 - - - - ;;inputstr 16 D1:ADA0 - - - - ;;Inputs string of length [Buffer Size] and puts it in (Destination) 17 D1:ADA0 - - - - ;;Inputs: 18 D1:ADA0 - - - - ;; HL: Destination 19 D1:ADA0 - - - - ;; D[E]: Buffer Size 20 D1:ADA0 - - - - ;;Ouptuts: 21 D1:ADA0 - - - - ;; (HL): String 22 D1:ADA0 - - - - inputstr: 23 D1:ADA0 D5 - - - push de 24 D1:ADA1 E5 - - - push hl 25 D1:ADA2 ED 53 C0 AE D1 - - - ld (inputstrSizeBuf), de 26 D1:ADA7 E5 - - - push hl 27 D1:ADA8 D5 - - - push de 28 D1:ADA9 21 96 05 D0 ld hl, CurCol 29 D1:ADAD 11 C2 AE D1 ld de, inputstrCurColBuf 30 D1:ADB1 CD 41 AA D1 call bytecpy 31 D1:ADB5 21 95 05 D0 ld hl, CurRow 32 D1:ADB9 11 C3 AE D1 ld de, inputstrCurRowBuf 33 D1:ADBD CD 41 AA D1 call bytecpy 34 D1:ADC1 D1 - - - pop de 35 D1:ADC2 E1 - - - pop hl 36 D1:ADC3 - - - - 37 D1:ADC3 FD CB 12 9E res Shift2nd, (IY + ShiftFlags) 38 D1:ADC7 CD B0 08 02 call _CursorOn 39 D1:ADCB - - - - 40 D1:ADCB AF - - - xor a 41 D1:ADCC 47 - - - ld b, a 42 D1:ADCD - - - - inputstrKeyInput: 43 D1:ADCD CD 0F AB D1 call cursorcurunderreset 44 D1:ADD1 CD 96 AD D1 call inputgetkey 45 D1:ADD5 - - - - 46 D1:ADD5 FE 36 - - cp sk2nd 47 D1:ADD7 CA 2E AE D1 jp z, inputstrKey2nd 48 D1:ADDB FE 38 - - cp skDel 49 D1:ADDD CA 3C AE D1 jp z, inputstrKeyDel 50 D1:ADE1 FE 0F - - cp skClear 51 D1:ADE3 CA 5C AE D1 jp z, inputstrKeyClear 52 D1:ADE7 FE 09 - - cp skEnter 53 D1:ADE9 CA AC AE D1 jp z, inputstrKeyEnter 54 D1:ADED - - - - 55 D1:ADED 4F - - - ld c, a 56 D1:ADEE 78 - - - ld a, b 57 D1:ADEF D5 - - - push de 58 D1:ADF0 ED 5B C0 AE D1 - - - ld de, (inputstrSizeBuf) 59 D1:ADF5 BB - - - cp e 60 D1:ADF6 D1 - - - pop de 61 D1:ADF7 28 D4 - - jr z, inputstrKeyInput 62 D1:ADF9 79 - - - ld a, c 63 D1:ADFA - - - - 64 D1:ADFA D6 0A - - sub skAdd 65 D1:ADFC 38 CF - - jr c, inputstrKeyInput 66 D1:ADFE FE 26 - - cp skMath - skAdd + 1 67 D1:AE00 30 CB - - jr nc, inputstrKeyInput 68 D1:AE02 - - - - 69 D1:AE02 FD CB 12 5E bit Shift2nd, (IY + ShiftFlags) ; TIOS BASED 70 D1:AE06 CC DF AA D1 call z, chartoascii 71 D1:AE0A C4 FF AA D1 call nz, charnumsymtoascii 72 D1:AE0E - - - - 73 D1:AE0E FE FF - - cp $FF 74 D1:AE10 28 BB - - jr z, inputstrKeyInput 75 D1:AE12 - - - - 76 D1:AE12 FD CB 05 96 res textScrolled, (iy+textFlags) 77 D1:AE16 - - - - 78 D1:AE16 CD B8 07 02 call _PutC 79 D1:AE1A - - - - 80 D1:AE1A 77 - - - ld (hl), a 81 D1:AE1B 23 - - - inc hl 82 D1:AE1C 04 - - - inc b 83 D1:AE1D - - - - 84 D1:AE1D FD CB 05 56 bit textScrolled, (iy+textFlags) 85 D1:AE21 28 AA - - jr z, inputstrKeyInput 86 D1:AE23 E5 - - - push hl 87 D1:AE24 21 C3 AE D1 ld hl, inputstrCurRowBuf 88 D1:AE28 7E - - - ld a, (hl) 89 D1:AE29 3D - - - dec a 90 D1:AE2A 77 - - - ld (hl), a 91 D1:AE2B E1 - - - pop hl 92 D1:AE2C 18 9F - - jr inputstrKeyInput 93 D1:AE2E - - - - inputstrKey2nd: 94 D1:AE2E E5 - - - push hl 95 D1:AE2F 21 92 00 D0 ld hl, Flags + ShiftFlags 96 D1:AE33 7E - - - ld a, (hl) 97 D1:AE34 EE 08 - - xor 1 << Shift2nd ; Toggle state of Shift2nd flag 98 D1:AE36 77 - - - ld (hl), a 99 D1:AE37 E1 - - - pop hl 100 D1:AE38 C3 CD AD D1 jp inputstrKeyInput 101 D1:AE3C - - - - inputstrKeyDel: 102 D1:AE3C 78 - - - ld a, b 103 D1:AE3D FE 00 - - cp 0 104 D1:AE3F CA CD AD D1 jp z, inputstrKeyInput 105 D1:AE43 - - - - 106 D1:AE43 3E 20 - - ld a, ' ' 107 D1:AE45 CD B4 07 02 call _PutMap 108 D1:AE49 - - - - 109 D1:AE49 E5 - - - push hl 110 D1:AE4A 21 96 05 D0 ld hl, CurCol 111 D1:AE4E 35 - - - dec (hl) 112 D1:AE4F E1 - - - pop hl 113 D1:AE50 - - - - 114 D1:AE50 3E 20 - - ld a, ' ' 115 D1:AE52 CD B4 07 02 call _PutMap 116 D1:AE56 - - - - 117 D1:AE56 2B - - - dec hl 118 D1:AE57 05 - - - dec b 119 D1:AE58 C3 CD AD D1 jp inputstrKeyInput 120 D1:AE5C - - - - 121 D1:AE5C - - - - inputstrKeyClear: 122 D1:AE5C 78 - - - ld a, b 123 D1:AE5D FE 00 - - cp 0 124 D1:AE5F CA CD AD D1 jp z, inputstrKeyInput 125 D1:AE63 - - - - 126 D1:AE63 E5 - - - push hl 127 D1:AE64 D5 - - - push de 128 D1:AE65 21 C2 AE D1 ld hl, inputstrCurColBuf 129 D1:AE69 11 96 05 D0 ld de, CurCol 130 D1:AE6D CD 41 AA D1 call bytecpy 131 D1:AE71 21 C3 AE D1 ld hl, inputstrCurRowBuf 132 D1:AE75 11 95 05 D0 ld de, CurRow 133 D1:AE79 CD 41 AA D1 call bytecpy 134 D1:AE7D D1 - - - pop de 135 D1:AE7E E1 - - - pop hl 136 D1:AE7F - - - - 137 D1:AE7F 3E 20 - - ld a, ' ' 138 D1:AE81 04 - - - inc b 139 D1:AE82 - - - - inputstrKeyClearLoop: 140 D1:AE82 CD B8 07 02 call _PutC 141 D1:AE86 10 FA - - djnz inputstrKeyClearLoop 142 D1:AE88 06 00 - - ld b, 0 143 D1:AE8A - - - - 144 D1:AE8A D5 - - - push de 145 D1:AE8B E5 - - - push hl 146 D1:AE8C 21 C2 AE D1 ld hl, inputstrCurColBuf 147 D1:AE90 11 96 05 D0 ld de, CurCol 148 D1:AE94 CD 41 AA D1 call bytecpy 149 D1:AE98 21 C3 AE D1 ld hl, inputstrCurRowBuf 150 D1:AE9C 11 95 05 D0 ld de, CurRow 151 D1:AEA0 CD 41 AA D1 call bytecpy 152 D1:AEA4 E1 - - - pop hl 153 D1:AEA5 D1 - - - pop de 154 D1:AEA6 E1 - - - pop hl 155 D1:AEA7 E5 - - - push hl 156 D1:AEA8 C3 CD AD D1 jp inputstrKeyInput 157 D1:AEAC - - - - 158 D1:AEAC - - - - inputstrKeyEnter: 159 D1:AEAC 36 00 - - ld (hl), 0 160 D1:AEAE CD A8 08 02 call _CursorOff 161 D1:AEB2 3E 20 - - ld a, ' ' 162 D1:AEB4 CD B4 07 02 call _PutMap 163 D1:AEB8 E1 - - - pop hl 164 D1:AEB9 D1 - - - pop de 165 D1:AEBA FD CB 12 9E res Shift2nd, (IY + ShiftFlags) 166 D1:AEBE C9 - - - ret 167 D1:AEBF - - - - 168 D1:AEBF 00 - - - inputstrFlags: .db %00000000 169 D1:AEC0 - - - - ; 0: num Flag 170 D1:AEC0 00 00 - - inputstrSizeBuf: .dw $0000 171 D1:AEC2 00 - - - inputstrCurColBuf: .db $00 172 D1:AEC3 00 - - - inputstrCurRowBuf: .db $00 173 D1:AEC4 - - - - 174 D1:AEC4 - - - - ;;inputcharstr 175 D1:AEC4 - - - - ;;Inputs string of (only letters) of length [Buffer Size] and puts it in (Destination) 176 D1:AEC4 - - - - ;;Inputs: 177 D1:AEC4 - - - - ;; HL: Destination 178 D1:AEC4 - - - - ;; D[E]: Buffer Size 179 D1:AEC4 - - - - ;;Ouptuts: 180 D1:AEC4 - - - - ;; (HL): String 181 D1:AEC4 - - - - inputcharstr: 182 D1:AEC4 D5 - - - push de 183 D1:AEC5 E5 - - - push hl 184 D1:AEC6 ED 53 D4 AF D1 - - - ld (inputcharstrSizeBuf), de 185 D1:AECB E5 - - - push hl 186 D1:AECC D5 - - - push de 187 D1:AECD 21 96 05 D0 ld hl, CurCol 188 D1:AED1 11 D6 AF D1 ld de, inputcharstrCurColBuf 189 D1:AED5 CD 41 AA D1 call bytecpy 190 D1:AED9 21 95 05 D0 ld hl, CurRow 191 D1:AEDD 11 D7 AF D1 ld de, inputcharstrCurRowBuf 192 D1:AEE1 CD 41 AA D1 call bytecpy 193 D1:AEE5 D1 - - - pop de 194 D1:AEE6 E1 - - - pop hl 195 D1:AEE7 - - - - 196 D1:AEE7 CD B0 08 02 call _CursorOn 197 D1:AEEB - - - - 198 D1:AEEB AF - - - xor a 199 D1:AEEC 47 - - - ld b, a 200 D1:AEED - - - - inputcharstrKeyInput: 201 D1:AEED CD 0F AB D1 call cursorcurunderreset 202 D1:AEF1 CD 96 AD D1 call inputgetkey 203 D1:AEF5 - - - - 204 D1:AEF5 FE 38 - - cp skDel 205 D1:AEF7 CA 40 AF D1 jp z, inputcharstrKeyDel 206 D1:AEFB FE 0F - - cp skClear 207 D1:AEFD CA 60 AF D1 jp z, inputcharstrKeyClear 208 D1:AF01 FE 09 - - cp skEnter 209 D1:AF03 CA C5 AF D1 jp z, inputcharstrKeyEnter 210 D1:AF07 - - - - 211 D1:AF07 4F - - - ld c, a 212 D1:AF08 78 - - - ld a, b 213 D1:AF09 D5 - - - push de 214 D1:AF0A ED 5B D4 AF D1 - - - ld de, (inputcharstrSizeBuf) 215 D1:AF0F BB - - - cp e 216 D1:AF10 D1 - - - pop de 217 D1:AF11 28 DA - - jr z, inputcharstrKeyInput 218 D1:AF13 79 - - - ld a, c 219 D1:AF14 - - - - 220 D1:AF14 D6 0A - - sub skAdd 221 D1:AF16 38 D5 - - jr c, inputcharstrKeyInput 222 D1:AF18 FE 26 - - cp skMath - skAdd + 1 223 D1:AF1A 30 D1 - - jr nc, inputcharstrKeyInput 224 D1:AF1C - - - - 225 D1:AF1C CD DF AA D1 call chartoascii 226 D1:AF20 - - - - 227 D1:AF20 FE FF - - cp $FF 228 D1:AF22 28 C9 - - jr z, inputcharstrKeyInput 229 D1:AF24 - - - - 230 D1:AF24 FD CB 05 96 res textScrolled, (iy+textFlags) 231 D1:AF28 - - - - 232 D1:AF28 CD B8 07 02 call _PutC 233 D1:AF2C - - - - 234 D1:AF2C 77 - - - ld (hl), a 235 D1:AF2D 23 - - - inc hl 236 D1:AF2E 04 - - - inc b 237 D1:AF2F - - - - 238 D1:AF2F FD CB 05 56 bit textScrolled, (iy+textFlags) 239 D1:AF33 28 B8 - - jr z, inputcharstrKeyInput 240 D1:AF35 E5 - - - push hl 241 D1:AF36 21 D7 AF D1 ld hl, inputcharstrCurRowBuf 242 D1:AF3A 7E - - - ld a, (hl) 243 D1:AF3B 3D - - - dec a 244 D1:AF3C 77 - - - ld (hl), a 245 D1:AF3D E1 - - - pop hl 246 D1:AF3E 18 AD - - jr inputcharstrKeyInput 247 D1:AF40 - - - - inputcharstrKeyDel: 248 D1:AF40 78 - - - ld a, b 249 D1:AF41 FE 00 - - cp 0 250 D1:AF43 CA ED AE D1 jp z, inputcharstrKeyInput 251 D1:AF47 - - - - 252 D1:AF47 3E 20 - - ld a, ' ' 253 D1:AF49 CD B4 07 02 call _PutMap 254 D1:AF4D - - - - 255 D1:AF4D E5 - - - push hl 256 D1:AF4E 21 96 05 D0 ld hl, CurCol 257 D1:AF52 35 - - - dec (hl) 258 D1:AF53 E1 - - - pop hl 259 D1:AF54 - - - - 260 D1:AF54 3E 20 - - ld a, ' ' 261 D1:AF56 CD B4 07 02 call _PutMap 262 D1:AF5A - - - - 263 D1:AF5A 2B - - - dec hl 264 D1:AF5B 05 - - - dec b 265 D1:AF5C C3 ED AE D1 jp inputcharstrKeyInput 266 D1:AF60 - - - - 267 D1:AF60 - - - - inputcharstrKeyClear: 268 D1:AF60 78 - - - ld a, b 269 D1:AF61 FE 00 - - cp 0 270 D1:AF63 CA ED AE D1 jp z, inputcharstrKeyInput 271 D1:AF67 - - - - 272 D1:AF67 E5 - - - push hl 273 D1:AF68 21 95 05 D0 ld hl, CurRow 274 D1:AF6C 4E - - - ld c, (hl) 275 D1:AF6D E1 - - - pop hl 276 D1:AF6E - - - - 277 D1:AF6E E5 - - - push hl 278 D1:AF6F D5 - - - push de 279 D1:AF70 21 D6 AF D1 ld hl, inputcharstrCurColBuf 280 D1:AF74 11 96 05 D0 ld de, CurCol 281 D1:AF78 CD 41 AA D1 call bytecpy 282 D1:AF7C 21 D7 AF D1 ld hl, inputcharstrCurRowBuf 283 D1:AF80 11 95 05 D0 ld de, CurRow 284 D1:AF84 CD 41 AA D1 call bytecpy 285 D1:AF88 D1 - - - pop de 286 D1:AF89 E1 - - - pop hl 287 D1:AF8A - - - - 288 D1:AF8A 3E 20 - - ld a, ' ' 289 D1:AF8C 04 - - - inc b 290 D1:AF8D - - - - inputcharstrKeyClearLoop: 291 D1:AF8D CD B8 07 02 call _PutC 292 D1:AF91 10 FA - - djnz inputcharstrKeyClearLoop 293 D1:AF93 - - - - 294 D1:AF93 E5 - - - push hl 295 D1:AF94 D5 - - - push de 296 D1:AF95 21 D6 AF D1 ld hl, inputcharstrCurColBuf 297 D1:AF99 11 96 05 D0 ld de, CurCol 298 D1:AF9D CD 41 AA D1 call bytecpy 299 D1:AFA1 D1 - - - pop de 300 D1:AFA2 E1 - - - pop hl 301 D1:AFA3 - - - - 302 D1:AFA3 D5 - - - push de 303 D1:AFA4 E5 - - - push hl 304 D1:AFA5 21 D6 AF D1 ld hl, inputcharstrCurColBuf 305 D1:AFA9 11 96 05 D0 ld de, CurCol 306 D1:AFAD CD 41 AA D1 call bytecpy 307 D1:AFB1 21 D7 AF D1 ld hl, inputcharstrCurRowBuf 308 D1:AFB5 11 95 05 D0 ld de, CurRow 309 D1:AFB9 CD 41 AA D1 call bytecpy 310 D1:AFBD E1 - - - pop hl 311 D1:AFBE D1 - - - pop de 312 D1:AFBF E1 - - - pop hl 313 D1:AFC0 E5 - - - push hl 314 D1:AFC1 C3 ED AE D1 jp inputcharstrKeyInput 315 D1:AFC5 - - - - 316 D1:AFC5 - - - - inputcharstrKeyEnter: 317 D1:AFC5 36 00 - - ld (hl), 0 318 D1:AFC7 CD A8 08 02 call _CursorOff 319 D1:AFCB 3E 20 - - ld a, ' ' 320 D1:AFCD CD B4 07 02 call _PutMap 321 D1:AFD1 E1 - - - pop hl 322 D1:AFD2 D1 - - - pop de 323 D1:AFD3 C9 - - - ret 324 D1:AFD4 - - - - 325 D1:AFD4 00 00 - - inputcharstrSizeBuf: .dw $0000 326 D1:AFD6 00 - - - inputcharstrCurColBuf: .db $00 327 D1:AFD7 00 - - - inputcharstrCurRowBuf: .db $00 328 D1:AFD8 - - - - 329 D1:AFD8 - - - - ;;inputnumstr 330 D1:AFD8 - - - - ;;Inputs string of (only numbers) of length [Buffer Size] and puts it in (Destination) 331 D1:AFD8 - - - - ;;Inputs: 332 D1:AFD8 - - - - ;; HL: Destination 333 D1:AFD8 - - - - ;; D[E]: Buffer Size 334 D1:AFD8 - - - - ;;Ouptuts: 335 D1:AFD8 - - - - ;; (HL): String 336 D1:AFD8 - - - - inputnumstr: 337 D1:AFD8 D5 - - - push de 338 D1:AFD9 E5 - - - push hl 339 D1:AFDA ED 53 D8 B0 D1 - - - ld (inputnumstrSizeBuf), de 340 D1:AFDF E5 - - - push hl 341 D1:AFE0 D5 - - - push de 342 D1:AFE1 21 96 05 D0 ld hl, CurCol 343 D1:AFE5 11 DA B0 D1 ld de, inputnumstrCurColBuf 344 D1:AFE9 CD 41 AA D1 call bytecpy 345 D1:AFED 21 95 05 D0 ld hl, CurRow 346 D1:AFF1 11 DB B0 D1 ld de, inputnumstrCurRowBuf 347 D1:AFF5 CD 41 AA D1 call bytecpy 348 D1:AFF9 D1 - - - pop de 349 D1:AFFA E1 - - - pop hl 350 D1:AFFB - - - - 351 D1:AFFB CD B0 08 02 call _CursorOn 352 D1:AFFF - - - - 353 D1:AFFF AF - - - xor a 354 D1:B000 47 - - - ld b, a 355 D1:B001 - - - - 356 D1:B001 - - - - inputnumstrKeyInput: 357 D1:B001 CD 0F AB D1 call cursorcurunderreset 358 D1:B005 CD 96 AD D1 call inputgetkey 359 D1:B009 - - - - 360 D1:B009 FE 38 - - cp skDel 361 D1:B00B CA 54 B0 D1 jp z, inputnumstrKeyDel 362 D1:B00F FE 0F - - cp skClear 363 D1:B011 CA 74 B0 D1 jp z, inputnumstrKeyClear 364 D1:B015 FE 09 - - cp skEnter 365 D1:B017 CA C9 B0 D1 jp z, inputnumstrKeyEnter 366 D1:B01B - - - - 367 D1:B01B 4F - - - ld c, a 368 D1:B01C 78 - - - ld a, b 369 D1:B01D D5 - - - push de 370 D1:B01E ED 5B D8 B0 D1 - - - ld de, (inputnumstrSizeBuf) 371 D1:B023 BB - - - cp e 372 D1:B024 D1 - - - pop de 373 D1:B025 28 DA - - jr z, inputnumstrKeyInput 374 D1:B027 79 - - - ld a, c 375 D1:B028 - - - - 376 D1:B028 D6 0A - - sub skAdd 377 D1:B02A 38 D5 - - jr c, inputnumstrKeyInput 378 D1:B02C FE 26 - - cp skMath - skAdd + 1 379 D1:B02E 30 D1 - - jr nc, inputnumstrKeyInput 380 D1:B030 - - - - 381 D1:B030 CD EF AA D1 call charnumtoascii 382 D1:B034 FE FF - - cp $FF 383 D1:B036 28 C9 - - jr z, inputnumstrKeyInput 384 D1:B038 - - - - 385 D1:B038 FD CB 05 96 res textScrolled, (iy+textFlags) 386 D1:B03C - - - - 387 D1:B03C CD B8 07 02 call _PutC 388 D1:B040 - - - - 389 D1:B040 77 - - - ld (hl), a 390 D1:B041 23 - - - inc hl 391 D1:B042 04 - - - inc b 392 D1:B043 - - - - 393 D1:B043 FD CB 05 56 bit textScrolled, (iy+textFlags) 394 D1:B047 28 B8 - - jr z, inputnumstrKeyInput 395 D1:B049 E5 - - - push hl 396 D1:B04A 21 DB B0 D1 ld hl, inputnumstrCurRowBuf 397 D1:B04E 7E - - - ld a, (hl) 398 D1:B04F 3D - - - dec a 399 D1:B050 77 - - - ld (hl), a 400 D1:B051 E1 - - - pop hl 401 D1:B052 18 AD - - jr inputnumstrKeyInput 402 D1:B054 - - - - inputnumstrkeydel: 403 D1:B054 78 - - - ld a, b 404 D1:B055 FE 00 - - cp 0 405 D1:B057 CA 01 B0 D1 jp z, inputnumstrKeyInput 406 D1:B05B - - - - 407 D1:B05B 3E 20 - - ld a, ' ' 408 D1:B05D CD B4 07 02 call _PutMap 409 D1:B061 - - - - 410 D1:B061 E5 - - - push hl 411 D1:B062 21 96 05 D0 ld hl, CurCol 412 D1:B066 35 - - - dec (hl) 413 D1:B067 E1 - - - pop hl 414 D1:B068 - - - - 415 D1:B068 3E 20 - - ld a, ' ' 416 D1:B06A CD B4 07 02 call _PutMap 417 D1:B06E - - - - 418 D1:B06E 2B - - - dec hl 419 D1:B06F 05 - - - dec b 420 D1:B070 C3 01 B0 D1 jp inputnumstrKeyInput 421 D1:B074 - - - - 422 D1:B074 - - - - inputnumstrKeyClear: 423 D1:B074 78 - - - ld a, b 424 D1:B075 FE 00 - - cp 0 425 D1:B077 CA 01 B0 D1 jp z, inputnumstrKeyInput 426 D1:B07B - - - - 427 D1:B07B E5 - - - push hl 428 D1:B07C 21 95 05 D0 ld hl, CurRow 429 D1:B080 4E - - - ld c, (hl) 430 D1:B081 E1 - - - pop hl 431 D1:B082 - - - - 432 D1:B082 E5 - - - push hl 433 D1:B083 D5 - - - push de 434 D1:B084 21 DA B0 D1 ld hl, inputnumstrCurColBuf 435 D1:B088 11 96 05 D0 ld de, CurCol 436 D1:B08C CD 41 AA D1 call bytecpy 437 D1:B090 21 DB B0 D1 ld hl, inputnumstrCurRowBuf 438 D1:B094 11 95 05 D0 ld de, CurRow 439 D1:B098 CD 41 AA D1 call bytecpy 440 D1:B09C D1 - - - pop de 441 D1:B09D E1 - - - pop hl 442 D1:B09E - - - - 443 D1:B09E 3E 20 - - ld a, ' ' 444 D1:B0A0 04 - - - inc b 445 D1:B0A1 - - - - inputnumstrKeyClearLoop: 446 D1:B0A1 CD B8 07 02 call _PutC 447 D1:B0A5 10 FA - - djnz inputnumstrKeyClearLoop 448 D1:B0A7 - - - - 449 D1:B0A7 D5 - - - push de 450 D1:B0A8 E5 - - - push hl 451 D1:B0A9 21 DA B0 D1 ld hl, inputnumstrCurColBuf 452 D1:B0AD 11 96 05 D0 ld de, CurCol 453 D1:B0B1 CD 41 AA D1 call bytecpy 454 D1:B0B5 21 DB B0 D1 ld hl, inputnumstrCurRowBuf 455 D1:B0B9 11 95 05 D0 ld de, CurRow 456 D1:B0BD CD 41 AA D1 call bytecpy 457 D1:B0C1 E1 - - - pop hl 458 D1:B0C2 D1 - - - pop de 459 D1:B0C3 E1 - - - pop hl 460 D1:B0C4 E5 - - - push hl 461 D1:B0C5 C3 01 B0 D1 jp inputnumstrKeyInput 462 D1:B0C9 - - - - 463 D1:B0C9 - - - - inputnumstrKeyEnter: 464 D1:B0C9 36 00 - - ld (hl), 0 465 D1:B0CB CD A8 08 02 call _CursorOff 466 D1:B0CF 3E 20 - - ld a, ' ' 467 D1:B0D1 CD B4 07 02 call _PutMap 468 D1:B0D5 E1 - - - pop hl 469 D1:B0D6 D1 - - - pop de 470 D1:B0D7 C9 - - - ret 471 D1:B0D8 - - - - 472 D1:B0D8 00 00 - - inputnumstrSizeBuf: .dw $0000 473 D1:B0DA 00 - - - inputnumstrCurColBuf: .db $00 474 D1:B0DB 00 - - - inputnumstrCurRowBuf: .db $00 Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/std.inc" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/lib.inc" 2 D1:B0DC - - - - #include "includes/lib/fsh/fsh.inc" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/fsh/fsh.inc" 1 D1:B0DC - - - - #include "includes/lib/fsh/Command.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/fsh/Command.asm" 1 D1:B0DC - - - - ;;commandfill 2 D1:B0DC - - - - ;;Fills command mem with byte a 3 D1:B0DC - - - - ;;Inputs: 4 D1:B0DC - - - - ;; A: byte 5 D1:B0DC - - - - commandfill: 6 D1:B0DC E5 - - - push hl 7 D1:B0DD C5 - - - push bc 8 D1:B0DE D5 - - - push de 9 D1:B0DF 06 00 - - ld b, 0 10 D1:B0E1 11 00 00 00 ld de, 0 11 D1:B0E5 4F - - - ld c, a 12 D1:B0E6 21 9F EA D0 ld hl, FshCmd 13 D1:B0EA - - - - commandfillLoop: 14 D1:B0EA 71 - - - ld (hl), c 15 D1:B0EB 23 - - - inc hl 16 D1:B0EC 04 - - - inc b 17 D1:B0ED 13 - - - inc de 18 D1:B0EE 78 - - - ld a, b 19 D1:B0EF FE 40 - - cp FshCmdSize 20 D1:B0F1 38 F7 - - jr c, commandfillLoop 21 D1:B0F3 D1 - - - pop de 22 D1:B0F4 C1 - - - pop bc 23 D1:B0F5 E1 - - - pop hl 24 D1:B0F6 C9 - - - ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/fsh/fsh.inc" 2 D1:B0F7 - - - - #include "includes/lib/fsh/Parse.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/fsh/Parse.asm" 1 D1:B0F7 - - - - ;;fshparsecommand 2 D1:B0F7 - - - - ;;Inputs: 3 D1:B0F7 - - - - ;; HL: FshCmd 4 D1:B0F7 - - - - ;;b = buf row 5 D1:B0F7 - - - - ;;c = char in row 6 D1:B0F7 - - - - ;de = scratch 7 D1:B0F7 - - - - fshparsecommand: 8 D1:B0F7 E5 - - - push hl 9 D1:B0F8 C5 - - - push bc 10 D1:B0F9 D5 - - - push de 11 D1:B0FA E5 - - - push hl 12 D1:B0FB E5 - - - push hl 13 D1:B0FC 21 0E B2 D1 ld hl, fshparsecommandCmd 14 D1:B100 06 2D - - ld b, 45 15 D1:B102 3E 00 - - ld a, $00 16 D1:B104 CD 62 AA D1 call memset 17 D1:B108 E1 - - - pop hl 18 D1:B109 - - - - 19 D1:B109 01 00 00 00 ld bc, 0 20 D1:B10D 11 00 00 00 ld de, 0 21 D1:B111 - - - - fshparsecommandLoop: 22 D1:B111 7E - - - ld a, (hl) 23 D1:B112 - - - - fshparsecommandCheckSpace: 24 D1:B112 FE 20 - - cp ' ' ;end of word 25 D1:B114 20 0C - - jr nz, fshparsecommandCheckEnd 26 D1:B116 3E 00 - - ld a, $00 27 D1:B118 CD 41 B2 D1 call fshparsecommandCopyChar 28 D1:B11C 0E 00 - - ld c, 0 29 D1:B11E 04 - - - inc b 30 D1:B11F 23 - - - inc hl 31 D1:B120 18 EF - - jr fshparsecommandLoop 32 D1:B122 - - - - 33 D1:B122 - - - - fshparsecommandCheckEnd: 34 D1:B122 FE 00 - - cp $00 ;end of string 35 D1:B124 28 13 - - jr z, fshparsecommandCheckArgStatus 36 D1:B126 - - - - 37 D1:B126 - - - - fshparsecommandLoopEnd: 38 D1:B126 CD 41 B2 D1 call fshparsecommandCopyChar 39 D1:B12A 23 - - - inc hl 40 D1:B12B 0C - - - inc c 41 D1:B12C - - - - 42 D1:B12C 79 - - - ld a, c 43 D1:B12D FE 08 - - cp FshCmdCmdSize 44 D1:B12F 20 E0 - - jr nz, fshparsecommandLoop 45 D1:B131 - - - - ;inc hl 46 D1:B131 0E 00 - - ld c, 0 47 D1:B133 04 - - - inc b 48 D1:B134 78 - - - ld a, b 49 D1:B135 FE 05 - - cp 5 50 D1:B137 20 D8 - - jr nz, fshparsecommandLoop 51 D1:B139 - - - - ; ld bc, 0 52 D1:B139 - - - - 53 D1:B139 - - - - fshparsecommandCheckArgStatus: 54 D1:B139 AF - - - xor a 55 D1:B13A 21 CD EA D0 ld hl, FshCmdArgFlags 56 D1:B13E 77 - - - ld (hl), a 57 D1:B13F - - - - fshparsecommandCheckArg0: 58 D1:B13F 21 17 B2 D1 ld hl, fshparsecommandArg0 59 D1:B143 7E - - - ld a, (hl) 60 D1:B144 FE 00 - - cp $00 61 D1:B146 28 27 - - jr z, fshparsecommandCheckArg1 62 D1:B148 21 CD EA D0 ld hl, FshCmdArgFlags 63 D1:B14C CB C6 - - set 0, (hl) 64 D1:B14E 7E - - - ld a, (hl) 65 D1:B14F 21 17 B2 D1 ld hl, fshparsecommandArg0 66 D1:B153 7E - - - ld a, (hl) 67 D1:B154 D6 30 - - sub '0' 68 D1:B156 FE 0A - - cp '9' - '0' + 1 69 D1:B158 30 15 - - jr nc, fshparsecommandCheckArg1 70 D1:B15A CD DA AC D1 call strtow 71 D1:B15E 11 17 B2 D1 ld de, fshparsecommandArg0 72 D1:B162 EB - - - ex de, hl 73 D1:B163 73 - - - ld (hl), e 74 D1:B164 23 - - - inc hl 75 D1:B165 72 - - - ld (hl), d 76 D1:B166 34 - - - inc (hl) 77 D1:B167 36 00 - - ld (hl), $00 78 D1:B169 21 CD EA D0 ld hl, FshCmdArgFlags 79 D1:B16D CB CE - - set 1, (hl) 80 D1:B16F - - - - fshparsecommandCheckArg1: 81 D1:B16F 21 20 B2 D1 ld hl, fshparsecommandArg1 82 D1:B173 7E - - - ld a, (hl) 83 D1:B174 FE 00 - - cp $00 84 D1:B176 28 26 - - jr z, fshparsecommandCheckArg2 85 D1:B178 21 CD EA D0 ld hl, FshCmdArgFlags 86 D1:B17C CB D6 - - set 2, (hl) 87 D1:B17E 21 20 B2 D1 ld hl, fshparsecommandArg1 88 D1:B182 7E - - - ld a, (hl) 89 D1:B183 D6 30 - - sub '0' 90 D1:B185 FE 0A - - cp '9' - '0' + 1 91 D1:B187 30 15 - - jr nc, fshparsecommandCheckArg2 92 D1:B189 CD DA AC D1 call strtow 93 D1:B18D 11 20 B2 D1 ld de, fshparsecommandArg1 94 D1:B191 EB - - - ex de, hl 95 D1:B192 73 - - - ld (hl), e 96 D1:B193 23 - - - inc hl 97 D1:B194 72 - - - ld (hl), d 98 D1:B195 23 - - - inc hl 99 D1:B196 36 00 - - ld (hl), $00 100 D1:B198 21 CD EA D0 ld hl, FshCmdArgFlags 101 D1:B19C CB DE - - set 3, (hl) 102 D1:B19E - - - - fshparsecommandCheckArg2: 103 D1:B19E 21 29 B2 D1 ld hl, fshparsecommandArg2 104 D1:B1A2 7E - - - ld a, (hl) 105 D1:B1A3 FE 00 - - cp $00 106 D1:B1A5 28 26 - - jr z, fshparsecommandCheckArg3 107 D1:B1A7 21 CD EA D0 ld hl, FshCmdArgFlags 108 D1:B1AB CB E6 - - set 4, (hl) 109 D1:B1AD 21 29 B2 D1 ld hl, fshparsecommandArg2 110 D1:B1B1 7E - - - ld a, (hl) 111 D1:B1B2 D6 30 - - sub '0' 112 D1:B1B4 FE 0A - - cp '9' - '0' + 1 113 D1:B1B6 30 15 - - jr nc, fshparsecommandCheckArg3 114 D1:B1B8 CD DA AC D1 call strtow 115 D1:B1BC 11 29 B2 D1 ld de, fshparsecommandArg2 116 D1:B1C0 EB - - - ex de, hl 117 D1:B1C1 73 - - - ld (hl), e 118 D1:B1C2 23 - - - inc hl 119 D1:B1C3 72 - - - ld (hl), d 120 D1:B1C4 23 - - - inc hl 121 D1:B1C5 36 00 - - ld (hl), $00 122 D1:B1C7 21 CD EA D0 ld hl, FshCmdArgFlags 123 D1:B1CB CB EE - - set 5, (hl) 124 D1:B1CD - - - - fshparsecommandCheckArg3: 125 D1:B1CD 21 32 B2 D1 ld hl, fshparsecommandArg3 126 D1:B1D1 7E - - - ld a, (hl) 127 D1:B1D2 FE 00 - - cp $00 128 D1:B1D4 28 26 - - jr z, fshparsecommandCopyBack 129 D1:B1D6 21 CD EA D0 ld hl, FshCmdArgFlags 130 D1:B1DA CB F6 - - set 6, (hl) 131 D1:B1DC 21 32 B2 D1 ld hl, fshparsecommandArg3 132 D1:B1E0 7E - - - ld a, (hl) 133 D1:B1E1 D6 30 - - sub '0' 134 D1:B1E3 FE 0A - - cp '9' - '0' + 1 135 D1:B1E5 30 15 - - jr nc, fshparsecommandCopyBack 136 D1:B1E7 CD DA AC D1 call strtow 137 D1:B1EB 11 32 B2 D1 ld de, fshparsecommandArg3 138 D1:B1EF EB - - - ex de, hl 139 D1:B1F0 73 - - - ld (hl), e 140 D1:B1F1 23 - - - inc hl 141 D1:B1F2 72 - - - ld (hl), d 142 D1:B1F3 23 - - - inc hl 143 D1:B1F4 36 00 - - ld (hl), $00 144 D1:B1F6 21 CD EA D0 ld hl, FshCmdArgFlags 145 D1:B1FA CB FE - - set 7, (hl) 146 D1:B1FC - - - - fshparsecommandCopyBack: 147 D1:B1FC E1 - - - pop hl 148 D1:B1FD C5 - - - push bc 149 D1:B1FE EB - - - ex de, hl 150 D1:B1FF 21 0E B2 D1 ld hl, fshparsecommandCmd 151 D1:B203 01 2D 00 00 ld bc, 45 152 D1:B207 ED B0 - - ldir 153 D1:B209 C1 - - - pop bc 154 D1:B20A - - - - 155 D1:B20A D1 - - - pop de 156 D1:B20B C1 - - - pop bc 157 D1:B20C E1 - - - pop hl 158 D1:B20D C9 - - - ret 159 D1:B20E - - - - 160 D1:B20E 00 00 00 00 00 00 00 00 00 - - - fshparsecommandCmd: .db $00, $00, $00, $00, $00, $00, $00, $00, $00 161 D1:B217 00 00 00 00 00 00 00 00 00 - - - fshparsecommandArg0: .db $00, $00, $00, $00, $00, $00, $00, $00, $00 162 D1:B220 00 00 00 00 00 00 00 00 00 - - - fshparsecommandArg1: .db $00, $00, $00, $00, $00, $00, $00, $00, $00 163 D1:B229 00 00 00 00 00 00 00 00 00 - - - fshparsecommandArg2: .db $00, $00, $00, $00, $00, $00, $00, $00, $00 164 D1:B232 00 00 00 00 00 00 00 00 00 - - - fshparsecommandArg3: .db $00, $00, $00, $00, $00, $00, $00, $00, $00 165 D1:B23B 00 00 00 00 00 00 - - fshparsecommandOverB: .db $00, $00, $00, $00, $00, $00 166 D1:B241 - - - - 167 D1:B241 - - - - fshparsecommandCopyChar: 168 D1:B241 - - - - ;Copy 169 D1:B241 E5 - - - push hl 170 D1:B242 C5 - - - push bc 171 D1:B243 21 00 00 00 ld hl, 0 172 D1:B247 60 - - - ld h, b 173 D1:B248 2E 09 - - ld l, 9 174 D1:B24A 41 - - - ld b, c 175 D1:B24B 11 0E B2 D1 ld de, fshparsecommandCmd 176 D1:B24F CD AC AB D1 call array2d 177 D1:B253 C1 - - - pop bc 178 D1:B254 E1 - - - pop hl 179 D1:B255 - - - - ;push hl 180 D1:B255 - - - - ; ld hl, fshparsecommandCmd+45+1 181 D1:B255 - - - - ; call cpHLDE 182 D1:B255 - - - - ;pop hl 183 D1:B255 - - - - ;pop de 184 D1:B255 - - - - ;ret c 185 D1:B255 - - - - ;push de 186 D1:B255 12 - - - ld (de), a ;ld buffer 187 D1:B256 C9 - - - ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/fsh/fsh.inc" 3 D1:B257 - - - - #include "includes/lib/fsh/FshVar.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/fsh/FshVar.asm" 1 D1:B257 - - - - ;;fshvarset 2 D1:B257 - - - - ;;Sets a Word in FshVars. 3 D1:B257 - - - - ;;Inputs: 4 D1:B257 - - - - ;; HL: 16b 5 D1:B257 - - - - ;; DE: Destination Word Relitive to FshVars 6 D1:B257 - - - - fshvarset: 7 D1:B257 C5 - - - push bc 8 D1:B258 01 3F 00 00 ld bc, FshVarsSize / 2 - 1 9 D1:B25C CD 7B A9 D1 call cpBCDE 10 D1:B260 C1 - - - pop bc 11 D1:B261 38 11 - - jr c, fshvarsetOOBException 12 D1:B263 C5 - - - push bc 13 D1:B264 D5 - - - push de 14 D1:B265 E5 - - - push hl 15 D1:B266 01 1F EA D0 ld bc, FshVars 16 D1:B26A EB - - - ex de, hl 17 D1:B26B 29 - - - add hl, hl 18 D1:B26C 09 - - - add hl, bc 19 D1:B26D 73 - - - ld (hl), e 20 D1:B26E 23 - - - inc hl 21 D1:B26F 72 - - - ld (hl), d 22 D1:B270 E1 - - - pop hl 23 D1:B271 D1 - - - pop de 24 D1:B272 C1 - - - pop bc 25 D1:B273 C9 - - - ret 26 D1:B274 - - - - fshvarsetOOBException: 27 D1:B274 E5 - - - push hl 28 D1:B275 21 99 B3 D1 ld hl, ErrOutOfBoundso 29 D1:B279 CD 54 B3 D1 call ErrSet 30 D1:B27D E1 - - - pop hl 31 D1:B27E C9 - - - ret 32 D1:B27F - - - - 33 D1:B27F - - - - ;;fshvarget 34 D1:B27F - - - - ;;Gets a Word in FshVars. 35 D1:B27F - - - - ;;Inputs: 36 D1:B27F - - - - ;; DE: Destination Word Relitive to FshVars 37 D1:B27F - - - - ;;Outputs: 38 D1:B27F - - - - ;; HL: Word in (DE) 39 D1:B27F - - - - fshvarget: 40 D1:B27F C5 - - - push bc 41 D1:B280 01 3F 00 00 ld bc, FshVarsSize / 2 - 1 42 D1:B284 CD 7B A9 D1 call cpBCDE 43 D1:B288 C1 - - - pop bc 44 D1:B289 38 14 - - jr c, fshvargetOOBException 45 D1:B28B C5 - - - push bc 46 D1:B28C D5 - - - push de 47 D1:B28D 21 00 00 00 ld hl, 0 48 D1:B291 01 1F EA D0 ld bc, FshVars 49 D1:B295 EB - - - ex de, hl 50 D1:B296 29 - - - add hl, hl 51 D1:B297 09 - - - add hl, bc 52 D1:B298 5E - - - ld e, (hl) 53 D1:B299 23 - - - inc hl 54 D1:B29A 56 - - - ld d, (hl) 55 D1:B29B EB - - - ex de, hl 56 D1:B29C D1 - - - pop de 57 D1:B29D C1 - - - pop bc 58 D1:B29E C9 - - - ret 59 D1:B29F - - - - fshvargetOOBException: 60 D1:B29F E5 - - - push hl 61 D1:B2A0 21 99 B3 D1 ld hl, ErrOutOfBoundso 62 D1:B2A4 CD 54 B3 D1 call ErrSet 63 D1:B2A8 E1 - - - pop hl 64 D1:B2A9 C9 - - - ret 65 D1:B2AA - - - - ;;fshvarcpy 66 D1:B2AA - - - - ;;Copies a word. 67 D1:B2AA - - - - ;;Inputs: 68 D1:B2AA - - - - ;; HL: Byte pointer 69 D1:B2AA - - - - ;; DE: Destination 70 D1:B2AA - - - - fshvarcpy: 71 D1:B2AA C5 - - - push bc 72 D1:B2AB 01 3F 00 00 ld bc, FshVarsSize / 2 - 1 73 D1:B2AF CD 7B A9 D1 call cpBCDE 74 D1:B2B3 C1 - - - pop bc 75 D1:B2B4 38 2A - - jr c, fshvarcpyOOBException 76 D1:B2B6 C5 - - - push bc 77 D1:B2B7 01 40 00 00 ld bc, FshVarsSize / 2 78 D1:B2BB CD 76 A9 D1 call cpHLBC 79 D1:B2BF C1 - - - pop bc 80 D1:B2C0 30 1E - - jr nc, fshvarcpyOOBException 81 D1:B2C2 D5 - - - push de 82 D1:B2C3 E5 - - - push hl 83 D1:B2C4 01 40 00 00 ld bc, FshVarsSize / 2 84 D1:B2C8 CD 7B A9 D1 call cpBCDE 85 D1:B2CC 38 12 - - jr c, fshvarcpyOOBException 86 D1:B2CE 01 1F EA D0 ld bc, FshVars 87 D1:B2D2 29 - - - add hl, hl 88 D1:B2D3 09 - - - add hl, bc 89 D1:B2D4 EB - - - ex de, hl 90 D1:B2D5 29 - - - add hl, hl 91 D1:B2D6 09 - - - add hl, bc 92 D1:B2D7 1A - - - ld a, (de) 93 D1:B2D8 77 - - - ld (hl), a 94 D1:B2D9 13 - - - inc de 95 D1:B2DA 23 - - - inc hl 96 D1:B2DB 1A - - - ld a, (de) 97 D1:B2DC 77 - - - ld (hl), a 98 D1:B2DD E1 - - - pop hl 99 D1:B2DE D1 - - - pop de 100 D1:B2DF C9 - - - ret 101 D1:B2E0 - - - - 102 D1:B2E0 - - - - fshvarcpyOOBException: 103 D1:B2E0 E5 - - - push hl 104 D1:B2E1 21 99 B3 D1 ld hl, ErrOutOfBoundso 105 D1:B2E5 CD 54 B3 D1 call ErrSet 106 D1:B2E9 E1 - - - pop hl 107 D1:B2EA C9 - - - ret 108 D1:B2EB - - - - 109 D1:B2EB - - - - ;;fshvarreset 110 D1:B2EB - - - - ;;Fills fshvars with $00 111 D1:B2EB - - - - fshvarreset: 112 D1:B2EB E5 - - - push hl 113 D1:B2EC C5 - - - push bc 114 D1:B2ED D5 - - - push de 115 D1:B2EE 06 00 - - ld b, 0 116 D1:B2F0 11 00 00 00 ld de, 0 117 D1:B2F4 21 00 00 00 ld hl, 0 118 D1:B2F8 - - - - fshvarfillLoop: 119 D1:B2F8 CD 57 B2 D1 call fshvarset 120 D1:B2FC 04 - - - inc b 121 D1:B2FD 13 - - - inc de 122 D1:B2FE 78 - - - ld a, b 123 D1:B2FF FE 40 - - cp FshVarsSize / 2 124 D1:B301 38 F5 - - jr c, fshvarfillLoop 125 D1:B303 D1 - - - pop de 126 D1:B304 C1 - - - pop bc 127 D1:B305 E1 - - - pop hl 128 D1:B306 C9 - - - ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/fsh/fsh.inc" 4 D1:B307 - - - - #include "includes/lib/fsh/Err.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/fsh/Err.asm" 1 D1:B307 - - - - ;;ErrCatch 2 D1:B307 - - - - ;;Checks err bit and jp to err route 3 D1:B307 - - - - ErrCatch: 4 D1:B307 C1 - - - pop bc 5 D1:B308 E5 - - - push hl 6 D1:B309 21 70 A9 D1 ld hl, FshFlags 7 D1:B30D CB 4E - - bit 1, (hl) 8 D1:B30F E1 - - - pop hl 9 D1:B310 C2 16 B3 D1 jp nz, ErrRoute 10 D1:B314 C5 - - - push bc 11 D1:B315 C9 - - - ret 12 D1:B316 - - - - 13 D1:B316 - - - - ;;ErrRoute 14 D1:B316 - - - - ;;Routes err codes. 15 D1:B316 - - - - ErrRoute: 16 D1:B316 - - - - 17 D1:B316 21 70 A9 D1 ld hl, FshFlags 18 D1:B31A CB 8E - - res 1, (hl) 19 D1:B31C - - - - 20 D1:B31C 21 CE EA D0 ld hl, FshCmdErrCode 21 D1:B320 - - - - 22 D1:B320 11 63 B3 D1 ld de, ErrCmdNotFoundo 23 D1:B324 CD 39 AA D1 call bytecmp 24 D1:B328 CA 64 B3 D1 jp z, ErrCmdNotFoundf 25 D1:B32C - - - - 26 D1:B32C 11 99 B3 D1 ld de, ErrOutOfBoundso 27 D1:B330 CD 39 AA D1 call bytecmp 28 D1:B334 CA 9A B3 D1 jp z, ErrOutOfBoundsf 29 D1:B338 - - - - 30 D1:B338 11 BF B3 D1 ld de, ErrArgso 31 D1:B33C CD 39 AA D1 call bytecmp 32 D1:B340 CA C0 B3 D1 jp z, ErrArgsf 33 D1:B344 - - - - 34 D1:B344 11 E9 B3 D1 ld de, ErrUsageo 35 D1:B348 CD 39 AA D1 call bytecmp 36 D1:B34C CA EA B3 D1 jp z, ErrUsagef 37 D1:B350 - - - - 38 D1:B350 C3 15 B4 D1 jp ErrDefault 39 D1:B354 - - - - 40 D1:B354 - - - - 41 D1:B354 - - - - ;;ErrSet 42 D1:B354 - - - - ;;Sets all things relating to Err codes 43 D1:B354 - - - - ;;Inputs: 44 D1:B354 - - - - ;; HL: Err_____o 45 D1:B354 - - - - ErrSet: 46 D1:B354 E5 - - - push hl 47 D1:B355 7E - - - ld a, (hl) 48 D1:B356 21 CE EA D0 ld hl, FshCmdErrCode 49 D1:B35A 77 - - - ld (hl), a 50 D1:B35B 21 70 A9 D1 ld hl, FshFlags 51 D1:B35F CB CE - - set 1, (hl) 52 D1:B361 E1 - - - pop hl 53 D1:B362 C9 - - - ret 54 D1:B363 - - - - 55 D1:B363 - - - - ;;ERR FUNCS------------------- 56 D1:B363 - - - - 57 D1:B363 01 - - - ErrCmdNotFoundo: .db $01 58 D1:B364 - - - - ErrCmdNotFoundf: 59 D1:B364 21 9F EA D0 ld hl, FshCmd 60 D1:B368 7E - - - ld a, (hl) 61 D1:B369 FE 00 - - cp $00 62 D1:B36B CA DB A8 D1 jp z, Fin 63 D1:B36F 21 87 B3 D1 ld hl, ErrCmdNotFoundt 64 D1:B373 CD C0 07 02 call _PutS 65 D1:B377 21 9F EA D0 ld hl, FshCmd 66 D1:B37B CD C0 07 02 call _PutS 67 D1:B37F CD F0 07 02 call _NewLine 68 D1:B383 C3 DB A8 D1 jp Fin 69 D1:B387 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:B399 - - - - 71 D1:B399 02 - - - ErrOutOfBoundso: .db $02 72 D1:B39A - - - - ErrOutOfBoundsf: 73 D1:B39A 21 AA B3 D1 ld hl, ErrOutOfBoundst 74 D1:B39E CD C0 07 02 call _PutS 75 D1:B3A2 CD F0 07 02 call _NewLine 76 D1:B3A6 C3 DB A8 D1 jp Fin 77 D1:B3AA 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:B3BF - - - - 79 D1:B3BF 03 - - - ErrArgso: .db $03 80 D1:B3C0 - - - - ErrArgsf: 81 D1:B3C0 21 D0 B3 D1 ld hl, ErrArgst 82 D1:B3C4 CD C0 07 02 call _PutS 83 D1:B3C8 CD F0 07 02 call _NewLine 84 D1:B3CC C3 DB A8 D1 jp Fin 85 D1:B3D0 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:B3E9 - - - - 87 D1:B3E9 04 - - - ErrUsageo: .db $04 88 D1:B3EA - - - - ErrUsagef: 89 D1:B3EA 21 06 B4 D1 ld hl, ErrUsaget 90 D1:B3EE CD C0 07 02 call _PutS 91 D1:B3F2 21 9F EA D0 ld hl, FshCmd 92 D1:B3F6 CD 57 B6 D1 call manrouteu 93 D1:B3FA CD C0 07 02 call _PutS 94 D1:B3FE CD F0 07 02 call _NewLine 95 D1:B402 C3 DB A8 D1 jp Fin 96 D1:B406 65 72 72 6F 72 3A 20 55 73 61 67 65 3A 20 00 - ErrUsaget: .db "error: Usage: ", 0 97 D1:B415 - - - - 98 D1:B415 - - - - ErrDefault: 99 D1:B415 21 21 B4 D1 ld hl, ErrDefaultt 100 D1:B419 CD C0 07 02 call _PutS 101 D1:B41D C3 FB A8 D1 jp Exit 102 D1:B421 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-shell/includes/lib/fsh/fsh.inc" 5 D1:B436 - - - - #include "includes/lib/fsh/Print.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/fsh/Print.asm" 1 D1:B436 - - - - ;;printfshnamelong 2 D1:B436 - - - - ;;prints Name + Varsv + Version to screen 3 D1:B436 - - - - printfshnamelong: 4 D1:B436 E5 - - - push hl 5 D1:B437 21 00 A9 D1 ld hl, FshName 6 D1:B43B CD C0 07 02 call _PutS 7 D1:B43F 3E 20 - - ld a, ' ' 8 D1:B441 CD B8 07 02 call _PutC 9 D1:B445 21 35 A9 D1 ld hl, FshVVars 10 D1:B449 CD C0 07 02 call _PutS 11 D1:B44D 3E 20 - - ld a, ' ' 12 D1:B44F CD B8 07 02 call _PutC 13 D1:B453 3E 76 - - ld a, 'v' 14 D1:B455 CD B8 07 02 call _PutC 15 D1:B459 21 39 A9 D1 ld hl, FshVMajor 16 D1:B45D CD C0 07 02 call _PutS 17 D1:B461 21 43 A9 D1 ld hl, FshVSeparator 18 D1:B465 CD C0 07 02 call _PutS 19 D1:B469 21 3B A9 D1 ld hl, FshVMinor 20 D1:B46D CD C0 07 02 call _PutS 21 D1:B471 21 43 A9 D1 ld hl, FshVSeparator 22 D1:B475 CD C0 07 02 call _PutS 23 D1:B479 21 3D A9 D1 ld hl, FshVPatch 24 D1:B47D CD C0 07 02 call _PutS 25 D1:B481 3E 20 - - ld a, ' ' 26 D1:B483 CD B8 07 02 call _PutC 27 D1:B487 21 3F A9 D1 ld hl, FshVBuild 28 D1:B48B CD C0 07 02 call _PutS 29 D1:B48F E1 - - - pop hl 30 D1:B490 C9 - - - ret 31 D1:B491 - - - - 32 D1:B491 - - - - ;;printmotd 33 D1:B491 - - - - ;;prints the motd to screen 34 D1:B491 - - - - printmotd: 35 D1:B491 CD 36 B4 D1 call printfshnamelong 36 D1:B495 CD F0 07 02 call _NewLine 37 D1:B499 CD F0 07 02 call _NewLine 38 D1:B49D 21 45 A9 D1 ld hl, FshMotd2nd 39 D1:B4A1 CD C0 07 02 call _PutS 40 D1:B4A5 CD F0 07 02 call _NewLine 41 D1:B4A9 21 5B A9 D1 ld hl, FshMotdHelp 42 D1:B4AD CD C0 07 02 call _PutS 43 D1:B4B1 CD F0 07 02 call _NewLine 44 D1:B4B5 C9 - - - ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/fsh/fsh.inc" 6 D1:B4B6 - - - - #include "includes/lib/fsh/Draw.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/fsh/Draw.asm" 1 D1:B4B6 - - - - ;;drawstatusbar 2 D1:B4B6 - - - - ;;draws the FSH status bar 3 D1:B4B6 - - - - drawstatusbar: 4 D1:B4B6 - - - - ;rgbto565(84, 84, 84) 5 D1:B4B6 21 AA 52 00 ld hl, $52AA 6 D1:B4BA 3E 00 - - ld a, 0 7 D1:B4BC 01 1E 00 00 ld bc, 30 8 D1:B4C0 CD 76 AB D1 call drawbar 9 D1:B4C4 - - - - ;rgbto565(0, 159, 209) 10 D1:B4C4 21 FA 04 00 ld hl, $04FA 11 D1:B4C8 - - - - ;ld hl, %1111100000000000 12 D1:B4C8 EB DD 6B DD 62 EB 21 02 00 00 11 00 00 00 01 00 00 00 0E 00 3E 1E CD 8B AB D1 - - drawrectfilledM(0, 0, 2, 30) Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/fsh/Draw.asm" 13 D1:B4E2 CD 21 B5 D1 call drawbatteryind 14 D1:B4E6 - - - - ;draw name 15 D1:B4E6 FD CB 32 D6 set fracDrawLFont, (iy + fontFlags) 16 D1:B4EA 3E 06 - - ld a, 6 17 D1:B4EC 32 D5 08 D0 ld (penRow), a 18 D1:B4F0 21 07 00 00 ld hl, 7 19 D1:B4F4 22 D2 08 D0 ld (penCol), hl 20 D1:B4F8 21 AA 52 00 ld hl, $52AA 21 D1:B4FC 22 AA 26 D0 ld (drawBGcolor), hl 22 D1:B500 21 FF FF 00 ld hl, $ffff 23 D1:B504 22 AC 26 D0 ld (drawFGcolor), hl 24 D1:B508 21 00 A9 D1 ld hl, FshName 25 D1:B50C CD 34 08 02 call _VPutS 26 D1:B510 21 FF FF 00 ld hl, $ffff 27 D1:B514 22 AA 26 D0 ld (drawBGcolor), hl 28 D1:B518 21 00 00 00 ld hl, $0000 29 D1:B51C 22 AC 26 D0 ld (drawFGcolor), hl 30 D1:B520 C9 - - - ret 31 D1:B521 - - - - 32 D1:B521 - - - - drawbatteryind: 33 D1:B521 CD 50 1A 02 call _DrawBatteryIndicator 34 D1:B525 C9 - - - ret 35 D1:B526 - - - - 36 D1:B526 - - - - 37 D1:B526 - - - - updatestatusbar: 38 D1:B526 CD 21 B5 D1 call drawbatteryind 39 D1:B52A C9 - - - ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/fsh/fsh.inc" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/lib.inc" 3 D1:B52B - - - - #include "includes/lib/prgm/prgm.inc" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/prgm/prgm.inc" 1 D1:B52B - - - - #include "includes/lib/prgm/Prgm.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/prgm/Prgm.asm" 1 D1:B52B - - - - prgmbasic: 2 D1:B52B - - - - 3 D1:B52B - - - - prgmasm: 4 D1:B52B CD 18 08 02 call _ClrTxtShdw 5 D1:B52F CD 28 08 02 call _HomeUp 6 D1:B533 CD 44 08 02 call _RunIndicOn 7 D1:B537 CD 44 11 02 call _APDSetup 8 D1:B53B CD 38 11 02 call _EnableAPD 9 D1:B53F - - - - ;jp prgmloaderloc 10 D1:B53F - - - - 11 D1:B53F - - - - prgmloader: 12 D1:B53F - - - - ;load prgm to userMem 13 D1:B53F - - - - ;ld hl, prgmunloaderloc 14 D1:B53F - - - - ;push hl 15 D1:B53F FD CB 0D D6 set appAutoScroll,(iy + appflags) 16 D1:B543 C3 81 A8 D1 jp userMem 17 D1:B547 - - - - prgmloaderend: 18 D1:B547 - - - - #define prgmloadersize prgmloaderend - prgmloader 19 D1:B547 - - - - 20 D1:B547 - - - - prgmunloader: 21 D1:B547 - - - - ;ld FSHA to userMem 22 D1:B547 CD 48 08 02 call _RunIndicOff 23 D1:B54B C3 DB A8 D1 jp Fin 24 D1:B54F - - - - prgmunloaderend: 25 D1:B54F - - - - #define prgmunloadersize prgmunloaderend - prgmunloader 26 D1:B54F - - - - 27 D1:B54F - - - - 28 D1:B54F - - - - prgminstallload: 29 D1:B54F - - - - 30 D1:B54F - - - - 31 D1:B54F C9 - - - ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/prgm/prgm.inc" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/lib.inc" 4 D1:B550 - - - - #include "includes/lib/crypto/crypto.inc" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/crypto/crypto.inc" 1 D1:B550 - - - - #include "includes/lib/crypto/Rot.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/crypto/Rot.asm" 1 D1:B550 - - - - ;;rotletencrypt 2 D1:B550 - - - - ;;Encrypts a string in rot-n (uses $41 to $5B) 3 D1:B550 - - - - ;;Inputs: 4 D1:B550 - - - - ;; HL: string pointer 5 D1:B550 - - - - ;; A: rot-n 6 D1:B550 - - - - ;;Notes: 7 D1:B550 - - - - ;; Changes string in place. 8 D1:B550 - - - - rotletencrypt: 9 D1:B550 E5 - - - push hl 10 D1:B551 C5 - - - push bc 11 D1:B552 - - - - rotletencryptMod: 12 D1:B552 E5 - - - push hl 13 D1:B553 67 - - - ld h, a 14 D1:B554 2E 19 - - ld l, 'Z' + 1 - 'A' - 1 15 D1:B556 CD 9D A9 D1 call modHL 16 D1:B55A 44 - - - ld b, h 17 D1:B55B E1 - - - pop hl 18 D1:B55C - - - - rotletencryptLoop: 19 D1:B55C 7E - - - ld a, (hl) 20 D1:B55D FE 00 - - cp a, $00 21 D1:B55F 28 0F - - jr z, rotletencryptEnd 22 D1:B561 FE 20 - - cp a, ' ' 23 D1:B563 28 07 - - jr z, rotletencryptLD 24 D1:B565 80 - - - add a, b 25 D1:B566 FE 5C - - cp a, 'Z' + 2 26 D1:B568 38 02 - - jr c , rotletencryptLD 27 D1:B56A D6 1B - - sub a, 'Z' + 2 - 'A' 28 D1:B56C - - - - rotletencryptLD: 29 D1:B56C 77 - - - ld (hl), a 30 D1:B56D 23 - - - inc hl 31 D1:B56E 18 EC - - jr rotletencryptLoop 32 D1:B570 - - - - rotletencryptEnd: 33 D1:B570 36 00 - - ld (hl), $00 34 D1:B572 C1 - - - pop bc 35 D1:B573 E1 - - - pop hl 36 D1:B574 C9 - - - ret 37 D1:B575 - - - - 38 D1:B575 - - - - ;;rotletdecrypt 39 D1:B575 - - - - ;;Decrypts a string in rot-n (uses $41 to $5B) 40 D1:B575 - - - - ;;Inputs: 41 D1:B575 - - - - ;; HL: string pointer 42 D1:B575 - - - - ;; A: rot-n 43 D1:B575 - - - - ;;Notes: 44 D1:B575 - - - - ;; Changes string in place. 45 D1:B575 - - - - rotletdecrypt: 46 D1:B575 E5 - - - push hl 47 D1:B576 C5 - - - push bc 48 D1:B577 - - - - rotletdecryptMod: 49 D1:B577 E5 - - - push hl 50 D1:B578 67 - - - ld h, a 51 D1:B579 2E 19 - - ld l, 'Z' + 1 - 'A' - 1 52 D1:B57B CD 9D A9 D1 call modHL 53 D1:B57F 44 - - - ld b, h 54 D1:B580 E1 - - - pop hl 55 D1:B581 - - - - rotletdecryptLoop: 56 D1:B581 7E - - - ld a, (hl) 57 D1:B582 FE 00 - - cp a, $00 58 D1:B584 28 0F - - jr z, rotletdecryptEnd 59 D1:B586 FE 20 - - cp a, ' ' 60 D1:B588 28 07 - - jr z, rotletdecryptLD 61 D1:B58A 90 - - - sub a, b 62 D1:B58B FE 41 - - cp a, 'A' 63 D1:B58D 30 02 - - jr nc , rotletdecryptLD 64 D1:B58F C6 1B - - add a, 'Z' + 2 - 'A' 65 D1:B591 - - - - rotletdecryptLD: 66 D1:B591 77 - - - ld (hl), a 67 D1:B592 23 - - - inc hl 68 D1:B593 18 EC - - jr rotletdecryptLoop 69 D1:B595 - - - - rotletdecryptEnd: 70 D1:B595 36 00 - - ld (hl), $00 71 D1:B597 C1 - - - pop bc 72 D1:B598 E1 - - - pop hl 73 D1:B599 C9 - - - ret 74 D1:B59A - - - - 75 D1:B59A - - - - ;;rotasciiencrypt 76 D1:B59A - - - - ;;Encrypts a string in rot-x (uses $00 to $EF) 77 D1:B59A - - - - ;;Inputs: 78 D1:B59A - - - - ;; HL: string pointer 79 D1:B59A - - - - ;; A: x 80 D1:B59A - - - - ;;Notes: 81 D1:B59A - - - - ;; Changes string in place. 82 D1:B59A - - - - rotasciiencrypt: 83 D1:B59A E5 - - - push hl 84 D1:B59B C5 - - - push bc 85 D1:B59C 0E 00 - - ld c, 0 86 D1:B59E 4F - - - ld c, a 87 D1:B59F - - - - rotasciiencryptLoop: 88 D1:B59F 7E - - - ld a, (hl) 89 D1:B5A0 FE 00 - - cp 0 90 D1:B5A2 28 13 - - jr z, rotasciiencryptEnd 91 D1:B5A4 81 - - - add a, c 92 D1:B5A5 FE 00 - - cp 0 93 D1:B5A7 20 01 - - jr nz, rotasciiencryptLd 94 D1:B5A9 3C - - - inc a 95 D1:B5AA - - - - rotasciiencryptLd: 96 D1:B5AA 77 - - - ld (hl), a 97 D1:B5AB 23 - - - inc hl 98 D1:B5AC FE EF - - cp a, $EF 99 D1:B5AE 38 EF - - jr c, rotasciiencryptLoop 100 D1:B5B0 2B - - - dec hl 101 D1:B5B1 D6 0F - - sub a, $0F 102 D1:B5B3 77 - - - ld (hl), a 103 D1:B5B4 23 - - - inc hl 104 D1:B5B5 18 E8 - - jr rotasciiencryptLoop 105 D1:B5B7 - - - - rotasciiencryptEnd: 106 D1:B5B7 36 00 - - ld (hl), $00 107 D1:B5B9 C1 - - - pop bc 108 D1:B5BA E1 - - - pop hl 109 D1:B5BB C9 - - - ret 110 D1:B5BC - - - - 111 D1:B5BC - - - - ;;rotasciidecrypt 112 D1:B5BC - - - - ;;Encrypts a string in rot-x (uses $00 to $EF) 113 D1:B5BC - - - - ;;Inputs: 114 D1:B5BC - - - - ;; HL: string pointer 115 D1:B5BC - - - - ;; A: x 116 D1:B5BC - - - - ;;Notes: 117 D1:B5BC - - - - ;; Changes string in place. 118 D1:B5BC - - - - rotasciidecrypt: 119 D1:B5BC E5 - - - push hl 120 D1:B5BD C5 - - - push bc 121 D1:B5BE 0E 00 - - ld c, 0 122 D1:B5C0 4F - - - ld c, a 123 D1:B5C1 - - - - rotasciidecryptLoop: 124 D1:B5C1 7E - - - ld a, (hl) 125 D1:B5C2 FE 00 - - cp 0 126 D1:B5C4 28 13 - - jr z, rotasciidecryptEnd 127 D1:B5C6 91 - - - sub a, c 128 D1:B5C7 FE 00 - - cp 0 129 D1:B5C9 20 01 - - jr nz, rotasciidecryptLd 130 D1:B5CB 3D - - - dec a 131 D1:B5CC - - - - rotasciidecryptLd: 132 D1:B5CC 77 - - - ld (hl), a 133 D1:B5CD 23 - - - inc hl 134 D1:B5CE FE EF - - cp a, $EF 135 D1:B5D0 38 EF - - jr c, rotasciidecryptLoop 136 D1:B5D2 2B - - - dec hl 137 D1:B5D3 C6 0F - - add a, $0F 138 D1:B5D5 77 - - - ld (hl), a 139 D1:B5D6 23 - - - inc hl 140 D1:B5D7 18 E8 - - jr rotasciidecryptLoop 141 D1:B5D9 - - - - rotasciidecryptEnd: 142 D1:B5D9 36 00 - - ld (hl), $00 143 D1:B5DB C1 - - - pop bc 144 D1:B5DC E1 - - - pop hl 145 D1:B5DD C9 - - - ret 146 D1:B5DE - - - - Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/crypto/crypto.inc" 2 D1:B5DE - - - - #include "includes/lib/crypto/Xor.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/crypto/Xor.asm" 1 D1:B5DE - - - - ;;xorcrypt 2 D1:B5DE - - - - ;;crypts a string using xor 3 D1:B5DE - - - - ;;Inputs: 4 D1:B5DE - - - - ;; HL: string pointer 5 D1:B5DE - - - - ;; DE: seed pointer (shorter) 6 D1:B5DE - - - - ;;Notes: 7 D1:B5DE - - - - ;; Changes string in place. 8 D1:B5DE - - - - xorcrypt: 9 D1:B5DE E5 - - - push hl 10 D1:B5DF D5 - - - push de 11 D1:B5E0 C5 - - - push bc 12 D1:B5E1 CD 3F AC D1 call strlen 13 D1:B5E5 D5 - - - push de 14 D1:B5E6 E5 - - - push hl 15 D1:B5E7 21 00 00 00 ld hl, 0 16 D1:B5EB 60 - - - ld h, b 17 D1:B5EC 69 - - - ld l, c 18 D1:B5ED EB - - - ex de, hl 19 D1:B5EE CD 3F AC D1 call strlen 20 D1:B5F2 EB - - - ex de, hl 21 D1:B5F3 7D - - - ld a, l ;C = len(seed) l=len(string) 22 D1:B5F4 91 - - - sub a,c 23 D1:B5F5 D2 FF B5 D1 jp nc, xorcryptNSmaller 24 D1:B5F9 0E 01 - - ld c, $01 25 D1:B5FB 3E 00 - - ld a, 0 26 D1:B5FD 2E 00 - - ld l, 0 27 D1:B5FF - - - - xorcryptNSmaller: 28 D1:B5FF 0D - - - dec c 29 D1:B600 D2 06 B6 D1 jp nc, xorcryptNSmaller2 30 D1:B604 0E 00 - - ld c, 0 31 D1:B606 - - - - xorcryptNSmaller2: 32 D1:B606 41 - - - ld b, c 33 D1:B607 4D - - - ld c, l ;b=len(seed) c=len(string) 34 D1:B608 E1 - - - pop hl 35 D1:B609 B7 - - - or a, a 36 D1:B60A D1 - - - pop de 37 D1:B60B 28 2C - - jr z, xorcryptEnd 38 D1:B60D D5 - - - push de 39 D1:B60E EB - - - ex de, hl; hl=seed 40 D1:B60F E1 - - - pop hl 41 D1:B610 C5 - - - push bc 42 D1:B611 D5 - - - push de 43 D1:B612 11 00 00 00 ld de, 0 44 D1:B616 58 - - - ld e, b 45 D1:B617 01 00 00 00 ld bc, 0 46 D1:B61B 4B - - - ld c, e 47 D1:B61C 09 - - - add hl, bc 48 D1:B61D D1 - - - pop de 49 D1:B61E C1 - - - pop bc 50 D1:B61F 23 - - - inc hl 51 D1:B620 36 80 - - ld (hl), %10000000 52 D1:B622 C5 - - - push bc 53 D1:B623 05 - - - dec b 54 D1:B624 3E FF - - ld a, $FF 55 D1:B626 B8 - - - cp a, b 56 D1:B627 28 0B - - jr z, xorcryptPadLoopEnd 57 D1:B629 3E 00 - - ld a, $00 58 D1:B62B B8 - - - cp a, b 59 D1:B62C 20 01 - - jr nz, xorcryptPadLoop 60 D1:B62E 04 - - - inc b 61 D1:B62F - - - - xorcryptPadLoop: 62 D1:B62F 23 - - - inc hl 63 D1:B630 36 65 - - ld (hl), 'e' 64 D1:B632 10 FB - - djnz xorcryptPadLoop 65 D1:B634 - - - - xorcryptPadLoopEnd: 66 D1:B634 C1 - - - pop bc 67 D1:B635 70 - - - ld (hl), b 68 D1:B636 23 - - - inc hl 69 D1:B637 36 00 - - ld (hl), $00 70 D1:B639 - - - - xorcryptEnd: 71 D1:B639 C1 - - - pop bc 72 D1:B63A D1 - - - pop de 73 D1:B63B E1 - - - pop hl 74 D1:B63C - - - - ;push hl 75 D1:B63C - - - - ;xorcryptRandLoop: 76 D1:B63C - - - - ;ld a, (hl) 77 D1:B63C - - - - ;or a, a 78 D1:B63C - - - - ;jr z, xorcryptRandLoopEnd 79 D1:B63C - - - - ;call randomint 80 D1:B63C - - - - ;or a, a 81 D1:B63C - - - - ;jr nz, xorcryptRandLoopLD 82 D1:B63C - - - - ;ld a, '/' 83 D1:B63C - - - - ;xorcryptRandLoopLD: 84 D1:B63C - - - - ;ld (hl), a 85 D1:B63C - - - - ;inc hl 86 D1:B63C - - - - ;jr xorcryptRandLoop 87 D1:B63C - - - - ;xorcryptRandLoopEnd: 88 D1:B63C - - - - ;pop hl 89 D1:B63C CD 82 AD D1 call strxor 90 D1:B640 C9 - - - ret 91 D1:B641 - - - - Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/crypto/crypto.inc" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/lib.inc" Listing for file "FSHa.asm" 72 D1:B641 - - - - 73 D1:B641 - - - - #include "includes/man-db.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/man-db.asm" 1 D1:B641 - - - - ;;TODO: move module specific macros to diffrent file 2 D1:B641 - - - - ;;manroute 3 D1:B641 - - - - ;;routes command string to discription 4 D1:B641 - - - - ;;Inputs: 5 D1:B641 - - - - ;; HL: Command String 6 D1:B641 - - - - ;;Outputs: 7 D1:B641 - - - - ;; HL: Command Discription String 8 D1:B641 - - - - manroute: 9 D1:B641 D5 - - - push de 10 D1:B642 - - - - #macro routestrjp(cmdXs, cmdXm) 11 D1:B642 ld de, cmdXs 12 D1:B642 call strcmp 13 D1:B642 ld de, cmdXm 14 D1:B642 jp z, manrouteReturn 15 D1:B642 #endmacro 16 D1:B642 - - - - 17 D1:B642 - - - - #macro subroutestrjp(cmdXs, cmdYs, cmdYm) 18 D1:B642 push hl 19 D1:B642 ld de, cmdXs 20 D1:B642 call strcmp 21 D1:B642 ld hl, 0 22 D1:B642 jr nz, +_ 23 D1:B642 ld hl, FshCmdArg1 24 D1:B642 _: 25 D1:B642 ld de, cmdYs 26 D1:B642 call strcmp 27 D1:B642 pop hl 28 D1:B642 ld de, cmdYm 29 D1:B642 jp z, manrouteReturn 30 D1:B642 #endmacro 31 D1:B642 - - - - 32 D1:B642 CD F6 B7 D1 call fshcmdmanroute 33 D1:B646 CD 48 C1 D1 call cryptocmdmanroute 34 D1:B64A - - - - ;Extention Point 35 D1:B64A - - - - 36 D1:B64A 21 CE EA D0 ld hl, FshCmdErrCode 37 D1:B64E 36 01 - - ld (hl), $01 38 D1:B650 11 00 00 00 ld de, $00 39 D1:B654 - - - - manrouteReturn: 40 D1:B654 EB - - - ex de, hl 41 D1:B655 D1 - - - pop de 42 D1:B656 C9 - - - ret 43 D1:B657 - - - - 44 D1:B657 - - - - ;;manrouteu 45 D1:B657 - - - - ;;routes command string to usage 46 D1:B657 - - - - ;;Inputs: 47 D1:B657 - - - - ;; HL: Command String 48 D1:B657 - - - - ;;Outputs: 49 D1:B657 - - - - ;; HL: Command Usage String 50 D1:B657 - - - - manrouteu: 51 D1:B657 D5 - - - push de 52 D1:B658 - - - - #macro routeustrjp(cmdXs, cmdXu) 53 D1:B658 ld de, cmdXs 54 D1:B658 call strcmp 55 D1:B658 ld de, cmdXu 56 D1:B658 jp z, manrouteuReturn 57 D1:B658 #endmacro 58 D1:B658 - - - - 59 D1:B658 - - - - #macro subrouteustrjp(cmdXs, cmdYs, cmdYu) 60 D1:B658 push hl 61 D1:B658 ld de, cmdXs 62 D1:B658 call strcmp 63 D1:B658 ld hl, 0 64 D1:B658 jr nz, +_ 65 D1:B658 ld hl, FshCmdArg1 66 D1:B658 _: 67 D1:B658 ld de, cmdYs 68 D1:B658 call strcmp 69 D1:B658 pop hl 70 D1:B658 ld de, cmdYu 71 D1:B658 jp z, manrouteuReturn 72 D1:B658 #endmacro 73 D1:B658 - - - - 74 D1:B658 CD A9 B8 D1 call fshcmdmanrouteu 75 D1:B65C CD 43 C2 D1 call cryptocmdmanrouteu 76 D1:B660 - - - - ;Extention Point 77 D1:B660 - - - - 78 D1:B660 21 CE EA D0 ld hl, FshCmdErrCode 79 D1:B664 36 01 - - ld (hl), $01 80 D1:B666 11 00 00 00 ld de, $00 81 D1:B66A - - - - manrouteuReturn: 82 D1:B66A EB - - - ex de, hl 83 D1:B66B D1 - - - pop de 84 D1:B66C C9 - - - ret Listing for file "FSHa.asm" 74 D1:B66D - - - - #include "includes/Command.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/Command.asm" 1 D1:B66D - - - - ;;Commanddecode 2 D1:B66D - - - - ;;Decodes all commands. 3 D1:B66D - - - - ;;Inputs: 4 D1:B66D - - - - ;; HL: Cmd String mem loc 5 D1:B66D - - - - ;; DE: Op code mem loc 6 D1:B66D - - - - ;;Output: 7 D1:B66D - - - - ;; Sets (DE) with command op code 8 D1:B66D - - - - commanddecode: 9 D1:B66D - - - - #macro decodecmdopt(cmdXs, cmdXo) 10 D1:B66D push hl 11 D1:B66D push de 12 D1:B66D ld de, cmdXs 13 D1:B66D call strcmp 14 D1:B66D ld hl, cmdXo 15 D1:B66D pop de 16 D1:B66D call z, wordcpy 17 D1:B66D pop hl 18 D1:B66D #endmacro 19 D1:B66D - - - - 20 D1:B66D CD 92 B6 D1 call fshcmddecode 21 D1:B671 CD 04 C1 D1 call cryptocmddecode 22 D1:B675 - - - - ;Extention Point 23 D1:B675 - - - - 24 D1:B675 C9 - - - ret 25 D1:B676 - - - - 26 D1:B676 - - - - ;;commandroute 27 D1:B676 - - - - ;;Routes all commamds. 28 D1:B676 - - - - ;;Inputs: 29 D1:B676 - - - - ;; HL: Op code mem loc 30 D1:B676 - - - - commandroute: 31 D1:B676 - - - - #macro routeoptjp(cmdXo, cmdXf) 32 D1:B676 ld de, cmdXo 33 D1:B676 call wordcmp 34 D1:B676 jp z, cmdXf 35 D1:B676 #endmacro 36 D1:B676 - - - - 37 D1:B676 CD 6F B7 D1 call fshcmdroute 38 D1:B67A CD 2D C1 D1 call cryptocmdroute 39 D1:B67E - - - - ;Extention Point 40 D1:B67E - - - - 41 D1:B67E 21 63 B3 D1 ld hl, ErrCmdNotFoundo 42 D1:B682 11 CE EA D0 ld de, FshCmdErrCode 43 D1:B686 CD 41 AA D1 call bytecpy 44 D1:B68A CD 54 B3 D1 call ErrSet 45 D1:B68E C3 E3 A8 D1 jp Err 46 D1:B692 - - - - 47 D1:B692 - - - - #include "includes/FshCommands/FshCommand.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/FshCommand.asm" 1 D1:B692 - - - - fshcmddecode: 2 D1:B692 E5 D5 11 5C B9 D1 CD 50 AC D1 21 61 B9 D1 D1 CC 49 AA D1 E1 decodecmdopt(fshcmdEXIT, fshcmdEXITo) Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/FshCommand.asm" 3 D1:B6A6 E5 D5 11 76 B9 D1 CD 50 AC D1 21 7A B9 D1 D1 CC 49 AA D1 E1 decodecmdopt(fshcmdSET, fshcmdSETo) 4 D1:B6BA E5 D5 11 6E BA D1 CD 50 AC D1 21 73 BA D1 D1 CC 49 AA D1 E1 decodecmdopt(fshcmdCOPY, fshcmdCOPYo) 5 D1:B6CE E5 D5 11 7D BB D1 CD 50 AC D1 21 82 BB D1 D1 CC 49 AA D1 E1 decodecmdopt(fshcmdMOVE, fshcmdMOVEo) 6 D1:B6E2 E5 D5 11 94 BC D1 CD 50 AC D1 21 98 BC D1 D1 CC 49 AA D1 E1 decodecmdopt(fshcmdCLS, fshcmdCLSo) 7 D1:B6F6 E5 D5 11 C1 BC D1 CD 50 AC D1 21 C5 BC D1 D1 CC 49 AA D1 E1 decodecmdopt(fshcmdVAR, fshcmdVARo) 8 D1:B70A E5 D5 11 64 BD D1 CD 50 AC D1 21 69 BD D1 D1 CC 49 AA D1 E1 decodecmdopt(fshcmdVARS, fshcmdVARSo) 9 D1:B71E E5 D5 11 D5 BD D1 CD 50 AC D1 21 DB BD D1 D1 CC 49 AA D1 E1 decodecmdopt(fshcmdSLEEP, fshcmdSLEEPo) 10 D1:B732 E5 D5 11 24 BE D1 CD 50 AC D1 21 29 BE D1 D1 CC 49 AA D1 E1 decodecmdopt(fshcmdINFO, fshcmdINFOo) 11 D1:B746 E5 D5 11 C7 BE D1 CD 50 AC D1 21 CC BE D1 D1 CC 49 AA D1 E1 decodecmdopt(fshcmdHELP, fshcmdHELPo) 12 D1:B75A E5 D5 11 1B C0 D1 CD 50 AC D1 21 1F C0 D1 D1 CC 49 AA D1 E1 decodecmdopt(fshcmdMAN, fshcmdMANo) 13 D1:B76E C9 - - - ret 14 D1:B76F - - - - 15 D1:B76F - - - - fshcmdroute: 16 D1:B76F C1 - - - pop bc ;pop the ret loc from stack into bc 17 D1:B770 11 61 B9 D1 CD 55 AA D1 CA 72 B9 D1 routeoptjp(fshcmdEXITo, fshcmdEXITf) 18 D1:B77C 11 7A B9 D1 CD 55 AA D1 CA B9 B9 D1 routeoptjp(fshcmdSETo, fshcmdSETf) 19 D1:B788 11 73 BA D1 CD 55 AA D1 CA CF BA D1 routeoptjp(fshcmdCOPYo, fshcmdCOPYf) 20 D1:B794 11 82 BB D1 CD 55 AA D1 CA DD BB D1 routeoptjp(fshcmdMOVEo, fshcmdMOVEf) 21 D1:B7A0 11 98 BC D1 CD 55 AA D1 CA B0 BC D1 routeoptjp(fshcmdCLSo, fshcmdCLSf) 22 D1:B7AC 11 C5 BC D1 CD 55 AA D1 CA FD BC D1 routeoptjp(fshcmdVARo, fshcmdVARf) 23 D1:B7B8 11 69 BD D1 CD 55 AA D1 CA 86 BD D1 routeoptjp(fshcmdVARSo, fshcmdVARSf) 24 D1:B7C4 11 DB BD D1 CD 55 AA D1 CA 0D BE D1 routeoptjp(fshcmdSLEEPo, fshcmdSLEEPf) 25 D1:B7D0 11 29 BE D1 CD 55 AA D1 CA 56 BE D1 routeoptjp(fshcmdINFOo, fshcmdINFOf) 26 D1:B7DC 11 CC BE D1 CD 55 AA D1 CA E9 BE D1 routeoptjp(fshcmdHELPo, fshcmdHELPf) 27 D1:B7E8 11 1F C0 D1 CD 55 AA D1 CA 4D C0 D1 routeoptjp(fshcmdMANo, fshcmdMANf) 28 D1:B7F4 C5 - - - push bc ;put ret location back on stack 29 D1:B7F5 C9 - - - ret 30 D1:B7F6 - - - - 31 D1:B7F6 - - - - fshcmdmanroute: 32 D1:B7F6 C1 - - - pop bc 33 D1:B7F7 11 5C B9 D1 CD 50 AC D1 11 63 B9 D1 CA 54 B6 D1 routestrjp(fshcmdEXIT, fshCmdEXITm) 34 D1:B807 11 76 B9 D1 CD 50 AC D1 11 7C B9 D1 CA 54 B6 D1 routestrjp(fshcmdSET, fshCmdSETm) 35 D1:B817 11 6E BA D1 CD 50 AC D1 11 75 BA D1 CA 54 B6 D1 routestrjp(fshcmdCOPY, fshCmdCOPYm) 36 D1:B827 11 7D BB D1 CD 50 AC D1 11 84 BB D1 CA 54 B6 D1 routestrjp(fshcmdMOVE, fshCmdMOVEm) 37 D1:B837 11 94 BC D1 CD 50 AC D1 11 9A BC D1 CA 54 B6 D1 routestrjp(fshcmdCLS, fshCmdCLSm) 38 D1:B847 11 C1 BC D1 CD 50 AC D1 11 C7 BC D1 CA 54 B6 D1 routestrjp(fshcmdVAR, fshCmdVARm) 39 D1:B857 11 64 BD D1 CD 50 AC D1 11 6B BD D1 CA 54 B6 D1 routestrjp(fshcmdVARS, fshCmdVARSm) 40 D1:B867 11 D5 BD D1 CD 50 AC D1 11 DD BD D1 CA 54 B6 D1 routestrjp(fshcmdSLEEP, fshCmdSLEEPm) 41 D1:B877 11 24 BE D1 CD 50 AC D1 11 2B BE D1 CA 54 B6 D1 routestrjp(fshcmdINFO, fshCmdINFOm) 42 D1:B887 11 C7 BE D1 CD 50 AC D1 11 CE BE D1 CA 54 B6 D1 routestrjp(fshcmdHELP, fshCmdHELPm) 43 D1:B897 11 1B C0 D1 CD 50 AC D1 11 21 C0 D1 CA 54 B6 D1 routestrjp(fshcmdMAN, fshCmdMANm) 44 D1:B8A7 C5 - - - push bc 45 D1:B8A8 C9 - - - ret 46 D1:B8A9 - - - - 47 D1:B8A9 - - - - fshcmdmanrouteu: 48 D1:B8A9 C1 - - - pop bc 49 D1:B8AA 11 5C B9 D1 CD 50 AC D1 11 6D B9 D1 CA 6A B6 D1 routeustrjp(fshcmdEXIT, fshCmdEXITu) 50 D1:B8BA 11 76 B9 D1 CD 50 AC D1 11 97 B9 D1 CA 6A B6 D1 routeustrjp(fshcmdSET, fshCmdSETu) 51 D1:B8CA 11 6E BA D1 CD 50 AC D1 11 A3 BA D1 CA 6A B6 D1 routeustrjp(fshcmdCOPY, fshCmdCOPYu) 52 D1:B8DA 11 7D BB D1 CD 50 AC D1 11 B1 BB D1 CA 6A B6 D1 routeustrjp(fshcmdMOVE, fshCmdMOVEu) 53 D1:B8EA 11 94 BC D1 CD 50 AC D1 11 AC BC D1 CA 6A B6 D1 routeustrjp(fshcmdCLS, fshCmdCLSu) 54 D1:B8FA 11 C1 BC D1 CD 50 AC D1 11 E8 BC D1 CA 6A B6 D1 routeustrjp(fshcmdVAR, fshCmdVARu) 55 D1:B90A 11 64 BD D1 CD 50 AC D1 11 81 BD D1 CA 6A B6 D1 routeustrjp(fshcmdVARS, fshCmdVARSu) 56 D1:B91A 11 D5 BD D1 CD 50 AC D1 11 07 BE D1 CA 6A B6 D1 routeustrjp(fshcmdSLEEP, fshCmdSLEEPu) 57 D1:B92A 11 24 BE D1 CD 50 AC D1 11 51 BE D1 CA 6A B6 D1 routeustrjp(fshcmdINFO, fshCmdINFOu) 58 D1:B93A 11 C7 BE D1 CD 50 AC D1 11 E4 BE D1 CA 6A B6 D1 routeustrjp(fshcmdHELP, fshCmdHELPu) 59 D1:B94A 11 1B C0 D1 CD 50 AC D1 11 3F C0 D1 CA 6A B6 D1 routeustrjp(fshcmdMAN, fshCmdMANu) 60 D1:B95A C5 - - - push bc 61 D1:B95B C9 - - - ret 62 D1:B95C - - - - 63 D1:B95C - - - - #include "includes/FshCommands/FshCommands.inc" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/FshCommands.inc" 1 D1:B95C - - - - #include "includes/FshCommands/EXIT.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/EXIT.asm" 1 D1:B95C 45 58 49 54 00 - - - fshcmdEXIT: .db "EXIT", 0 2 D1:B961 FF 00 - - fshcmdEXITo: .dw $00FF 3 D1:B963 45 78 69 74 73 20 46 73 68 00 - - fshcmdEXITm: .db "Exits Fsh", 0 4 D1:B96D 45 58 49 54 00 - - - fshcmdEXITu: .db "EXIT", 0 5 D1:B972 C3 E7 A8 D1 fshcmdEXITf: JP Cleanup Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/FshCommands.inc" 2 D1:B976 - - - - #include "includes/FshCommands/SET.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/SET.asm" 1 D1:B976 53 45 54 00 fshcmdSET: .db "SET", 0 2 D1:B97A 01 00 - - fshcmdSETo: .dw $0001 3 D1:B97C 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:B997 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:B9B9 - - - - fshcmdSETf: 6 D1:B9B9 - - - - fshcmdSETfArg0: 7 D1:B9B9 21 CD EA D0 ld hl, FshCmdArgFlags 8 D1:B9BD CB 4E - - bit 1, (hl) 9 D1:B9BF 20 34 - - jr nz, fshcmdSETfArg1 10 D1:B9C1 CB 46 - - bit 0, (hl) 11 D1:B9C3 28 0C - - jr z, fshcmdSETfArg0Get 12 D1:B9C5 21 E9 B3 D1 ld hl, ErrUsageo 13 D1:B9C9 CD 54 B3 D1 call ErrSet 14 D1:B9CD CD 07 B3 D1 call ErrCatch 15 D1:B9D1 - - - - fshcmdSETfArg0Get: 16 D1:B9D1 21 58 BA D1 ld hl, fshcmdSETfDIndex 17 D1:B9D5 CD 18 AB D1 call printprompt 18 D1:B9D9 21 52 BA D1 ld hl, fshcmdSETfInputBuffer 19 D1:B9DD 11 03 00 00 ld de, 3 20 D1:B9E1 CD D8 AF D1 call inputnumstr 21 D1:B9E5 CD DA AC D1 call strtow 22 D1:B9E9 11 A8 EA D0 ld de, FshCmdArg0 23 D1:B9ED EB - - - ex de, hl 24 D1:B9EE 73 - - - ld (hl), e 25 D1:B9EF 23 - - - inc hl 26 D1:B9F0 72 - - - ld (hl), d 27 D1:B9F1 CD F0 07 02 call _NewLine 28 D1:B9F5 - - - - fshcmdSETfArg1: 29 D1:B9F5 21 CD EA D0 ld hl, FshCmdArgFlags 30 D1:B9F9 CB 5E - - bit 3, (hl) 31 D1:B9FB 20 34 - - jr nz, fshcmdSETfExe 32 D1:B9FD CB 56 - - bit 2, (hl) 33 D1:B9FF 28 0C - - jr z, fshcmdSETfArg1Get 34 D1:BA01 21 E9 B3 D1 ld hl, ErrUsageo 35 D1:BA05 CD 54 B3 D1 call ErrSet 36 D1:BA09 CD 07 B3 D1 call ErrCatch 37 D1:BA0D - - - - fshcmdSETfArg1Get: 38 D1:BA0D 21 66 BA D1 ld hl, fshcmdSETfDValue 39 D1:BA11 CD 18 AB D1 call printprompt 40 D1:BA15 21 52 BA D1 ld hl, fshcmdSETfInputBuffer 41 D1:BA19 11 05 00 00 ld de, 5 42 D1:BA1D CD D8 AF D1 call inputnumstr 43 D1:BA21 CD DA AC D1 call strtow 44 D1:BA25 EB - - - ex de, hl 45 D1:BA26 21 B1 EA D0 ld hl, FshCmdArg1 46 D1:BA2A 73 - - - ld (hl), e 47 D1:BA2B 23 - - - inc hl 48 D1:BA2C 72 - - - ld (hl), d 49 D1:BA2D CD F0 07 02 call _NewLine 50 D1:BA31 - - - - fshcmdSETfExe: 51 D1:BA31 21 A8 EA D0 ld hl, FshCmdArg0 52 D1:BA35 11 00 00 00 ld de, 0 53 D1:BA39 5E - - - ld e, (hl) 54 D1:BA3A 23 - - - inc hl 55 D1:BA3B 56 - - - ld d, (hl) 56 D1:BA3C D5 - - - push de 57 D1:BA3D 21 B1 EA D0 ld hl, FshCmdArg1 58 D1:BA41 5E - - - ld e, (hl) 59 D1:BA42 23 - - - inc hl 60 D1:BA43 56 - - - ld d, (hl) 61 D1:BA44 EB - - - ex de, hl 62 D1:BA45 D1 - - - pop de 63 D1:BA46 CD 57 B2 D1 call fshvarset 64 D1:BA4A CD 07 B3 D1 call ErrCatch 65 D1:BA4E C3 DB A8 D1 jp Fin 66 D1:BA52 - - - - 67 D1:BA52 00 00 00 00 00 00 - - fshcmdSETfInputBuffer: .db $00, $00, $00, $00, $00, $00 68 D1:BA58 44 65 73 74 69 6E 61 74 69 6F 6E 3D 20 00 - - fshcmdSETfDIndex: .db "Destination= ", 0 69 D1:BA66 56 61 6C 75 65 3D 20 00 fshcmdSETfDValue: .db "Value= ", 0 Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/FshCommands.inc" 3 D1:BA6E - - - - #include "includes/FshCommands/COPY.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/COPY.asm" 1 D1:BA6E 43 4F 50 59 00 - - - fshcmdCOPY: .db "COPY", 0 2 D1:BA73 02 00 - - fshcmdCOPYo: .dw $0002 3 D1:BA75 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:BAA3 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:BACF - - - - fshcmdCOPYf: 6 D1:BACF - - - - fshcmdCOPYfArg0: 7 D1:BACF 21 CD EA D0 ld hl, FshCmdArgFlags 8 D1:BAD3 CB 4E - - bit 1, (hl) 9 D1:BAD5 20 31 - - jr nz, fshcmdCOPYfArg1 10 D1:BAD7 CB 46 - - bit 0, (hl) 11 D1:BAD9 28 0C - - jr z, fshcmdCOPYfArg0Get 12 D1:BADB 21 E9 B3 D1 ld hl, ErrUsageo 13 D1:BADF CD 54 B3 D1 call ErrSet 14 D1:BAE3 CD 07 B3 D1 call ErrCatch 15 D1:BAE7 - - - - fshcmdCOPYfArg0Get: 16 D1:BAE7 21 66 BB D1 ld hl, fshcmdCOPYfDSource 17 D1:BAEB CD 18 AB D1 call printprompt 18 D1:BAEF 21 62 BB D1 ld hl, fshcmdCOPYfInputBuffer 19 D1:BAF3 11 03 00 00 ld de, 3 20 D1:BAF7 CD D8 AF D1 call inputnumstr 21 D1:BAFB CD 7D AC D1 call strtob 22 D1:BAFF 21 A8 EA D0 ld hl, FshCmdArg0 23 D1:BB03 77 - - - ld (hl), a 24 D1:BB04 CD F0 07 02 call _NewLine 25 D1:BB08 - - - - fshcmdCOPYfArg1: 26 D1:BB08 21 CD EA D0 ld hl, FshCmdArgFlags 27 D1:BB0C CB 5E - - bit 3, (hl) 28 D1:BB0E 20 31 - - jr nz, fshcmdCOPYfExe 29 D1:BB10 CB 56 - - bit 2, (hl) 30 D1:BB12 28 0C - - jr z, fshcmdCOPYfArg1Get 31 D1:BB14 21 E9 B3 D1 ld hl, ErrUsageo 32 D1:BB18 CD 54 B3 D1 call ErrSet 33 D1:BB1C CD 07 B3 D1 call ErrCatch 34 D1:BB20 - - - - fshcmdCOPYfArg1Get: 35 D1:BB20 21 66 BB D1 ld hl, fshcmdCOPYfDSource 36 D1:BB24 CD 18 AB D1 call printprompt 37 D1:BB28 21 62 BB D1 ld hl, fshcmdCOPYfInputBuffer 38 D1:BB2C 11 03 00 00 ld de, 3 39 D1:BB30 CD D8 AF D1 call inputnumstr 40 D1:BB34 CD 7D AC D1 call strtob 41 D1:BB38 21 B1 EA D0 ld hl, FshCmdArg1 42 D1:BB3C 77 - - - ld (hl), a 43 D1:BB3D CD F0 07 02 call _NewLine 44 D1:BB41 - - - - fshcmdCOPYfExe: 45 D1:BB41 21 A8 EA D0 ld hl, FshCmdArg0 46 D1:BB45 11 00 00 00 ld de, 0 47 D1:BB49 5E - - - ld e, (hl) 48 D1:BB4A EB - - - ex de, hl 49 D1:BB4B E5 - - - push hl 50 D1:BB4C 21 B1 EA D0 ld hl, FshCmdArg1 51 D1:BB50 11 00 00 00 ld de, 0 52 D1:BB54 5E - - - ld e, (hl) 53 D1:BB55 E1 - - - pop hl 54 D1:BB56 CD AA B2 D1 call fshvarcpy 55 D1:BB5A CD 07 B3 D1 call ErrCatch 56 D1:BB5E C3 DB A8 D1 jp Fin 57 D1:BB62 - - - - 58 D1:BB62 00 00 00 00 fshcmdCOPYfInputBuffer: .db $00, $00, $00, $00 59 D1:BB66 53 6F 75 72 63 65 3D 20 00 - - - fshcmdCOPYfDSource: .db "Source= ", 0 60 D1:BB6F 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-shell/includes/FshCommands/FshCommands.inc" 4 D1:BB7D - - - - #include "includes/FshCommands/MOVE.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/MOVE.asm" 1 D1:BB7D 4D 4F 56 45 00 - - - fshcmdMOVE: .db "MOVE", 0 2 D1:BB82 03 00 - - fshcmdMOVEo: .dw $0003 3 D1:BB84 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:BBB1 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:BBDD - - - - fshcmdMOVEf: 6 D1:BBDD - - - - fshcmdMOVEfArg0: 7 D1:BBDD 21 CD EA D0 ld hl, FshCmdArgFlags 8 D1:BBE1 CB 4E - - bit 1, (hl) 9 D1:BBE3 20 31 - - jr nz, fshcmdMOVEfArg1 10 D1:BBE5 CB 46 - - bit 0, (hl) 11 D1:BBE7 28 0C - - jr z, fshcmdMOVEfArg0Get 12 D1:BBE9 21 E9 B3 D1 ld hl, ErrUsageo 13 D1:BBED CD 54 B3 D1 call ErrSet 14 D1:BBF1 CD 07 B3 D1 call ErrCatch 15 D1:BBF5 - - - - fshcmdMOVEfArg0Get: 16 D1:BBF5 21 7D BC D1 ld hl, fshcmdMOVEfDSource 17 D1:BBF9 CD 18 AB D1 call printprompt 18 D1:BBFD 21 79 BC D1 ld hl, fshcmdMOVEfInputBuffer 19 D1:BC01 11 03 00 00 ld de, 3 20 D1:BC05 CD D8 AF D1 call inputnumstr 21 D1:BC09 CD 7D AC D1 call strtob 22 D1:BC0D 21 A8 EA D0 ld hl, FshCmdArg0 23 D1:BC11 77 - - - ld (hl), a 24 D1:BC12 CD F0 07 02 call _NewLine 25 D1:BC16 - - - - fshcmdMOVEfArg1: 26 D1:BC16 21 CD EA D0 ld hl, FshCmdArgFlags 27 D1:BC1A CB 5E - - bit 3, (hl) 28 D1:BC1C 20 31 - - jr nz, fshcmdMOVEfExe 29 D1:BC1E CB 56 - - bit 2, (hl) 30 D1:BC20 28 0C - - jr z, fshcmdMOVEfArg1Get 31 D1:BC22 21 E9 B3 D1 ld hl, ErrUsageo 32 D1:BC26 CD 54 B3 D1 call ErrSet 33 D1:BC2A CD 07 B3 D1 call ErrCatch 34 D1:BC2E - - - - fshcmdMOVEfArg1Get: 35 D1:BC2E 21 86 BC D1 ld hl, fshcmdMOVEfDDestination 36 D1:BC32 CD 18 AB D1 call printprompt 37 D1:BC36 21 79 BC D1 ld hl, fshcmdMOVEfInputBuffer 38 D1:BC3A 11 03 00 00 ld de, 3 39 D1:BC3E CD D8 AF D1 call inputnumstr 40 D1:BC42 CD 7D AC D1 call strtob 41 D1:BC46 21 B1 EA D0 ld hl, FshCmdArg1 42 D1:BC4A 77 - - - ld (hl), a 43 D1:BC4B CD F0 07 02 call _NewLine 44 D1:BC4F - - - - fshcmdMOVEfExe: 45 D1:BC4F 21 A8 EA D0 ld hl, FshCmdArg0 46 D1:BC53 11 00 00 00 ld de, 0 47 D1:BC57 5E - - - ld e, (hl) 48 D1:BC58 EB - - - ex de, hl 49 D1:BC59 E5 - - - push hl 50 D1:BC5A 21 B1 EA D0 ld hl, FshCmdArg1 51 D1:BC5E 11 00 00 00 ld de, 0 52 D1:BC62 5E - - - ld e, (hl) 53 D1:BC63 E1 - - - pop hl 54 D1:BC64 CD AA B2 D1 call fshvarcpy 55 D1:BC68 EB - - - ex de, hl 56 D1:BC69 21 00 00 00 ld hl, 0 57 D1:BC6D CD 57 B2 D1 call fshvarset 58 D1:BC71 CD 07 B3 D1 call ErrCatch 59 D1:BC75 C3 DB A8 D1 jp Fin 60 D1:BC79 - - - - 61 D1:BC79 00 00 00 00 fshcmdMOVEfInputBuffer: .db $00, $00, $00, $00 62 D1:BC7D 53 6F 75 72 63 65 3D 20 00 - - - fshcmdMOVEfDSource: .db "Source= ", 0 63 D1:BC86 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-shell/includes/FshCommands/FshCommands.inc" 5 D1:BC94 - - - - #include "includes/FshCommands/CLS.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/CLS.asm" 1 D1:BC94 43 4C 53 00 fshcmdCLS: .db "CLS", 0 2 D1:BC98 10 00 - - fshcmdCLSo: .dw $0010 3 D1:BC9A 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:BCAC 43 4C 53 00 fshcmdCLSu: .db "CLS", 0 5 D1:BCB0 - - - - fshcmdCLSf: 6 D1:BCB0 CD 08 08 02 call _ClrLCDFull 7 D1:BCB4 AF - - - xor a 8 D1:BCB5 32 95 05 D0 ld (CurRow), a 9 D1:BCB9 32 96 05 D0 ld (CurCol), a 10 D1:BCBD C3 DB A8 D1 jp Fin Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/FshCommands.inc" 6 D1:BCC1 - - - - #include "includes/FshCommands/VAR.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/VAR.asm" 1 D1:BCC1 56 41 52 00 fshcmdVAR: .db "VAR", 0 2 D1:BCC5 11 00 - - fshcmdVARo: .dw $0011 3 D1:BCC7 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:BCE8 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:BCFD - - - - fshcmdVARf: 6 D1:BCFD - - - - fshcmdVARfArg0: 7 D1:BCFD 21 CD EA D0 ld hl, FshCmdArgFlags 8 D1:BD01 CB 4E - - bit 1, (hl) 9 D1:BD03 20 34 - - jr nz, fshcmdVARfExe 10 D1:BD05 CB 46 - - bit 0, (hl) 11 D1:BD07 28 0C - - jr z, fshcmdVARfArg0Get 12 D1:BD09 21 E9 B3 D1 ld hl, ErrUsageo 13 D1:BD0D CD 54 B3 D1 call ErrSet 14 D1:BD11 CD 07 B3 D1 call ErrCatch 15 D1:BD15 - - - - fshcmdVARfArg0Get: 16 D1:BD15 21 5C BD D1 ld hl, fshcmdVARfDIndex 17 D1:BD19 CD 18 AB D1 call printprompt 18 D1:BD1D 21 58 BD D1 ld hl, fshcmdVARfInputBuffer 19 D1:BD21 11 03 00 00 ld de, 3 20 D1:BD25 CD D8 AF D1 call inputnumstr 21 D1:BD29 CD DA AC D1 call strtow 22 D1:BD2D 11 A8 EA D0 ld de, FshCmdArg0 23 D1:BD31 EB - - - ex de, hl 24 D1:BD32 73 - - - ld (hl), e 25 D1:BD33 23 - - - inc hl 26 D1:BD34 72 - - - ld (hl), d 27 D1:BD35 CD F0 07 02 call _NewLine 28 D1:BD39 - - - - fshcmdVARfExe: 29 D1:BD39 21 A8 EA D0 ld hl, FshCmdArg0 30 D1:BD3D 11 00 00 00 ld de, 0 31 D1:BD41 5E - - - ld e, (hl) 32 D1:BD42 23 - - - inc hl 33 D1:BD43 56 - - - ld d, (hl) 34 D1:BD44 CD 7F B2 D1 call fshvarget 35 D1:BD48 CD 07 B3 D1 call ErrCatch 36 D1:BD4C CD BC 07 02 call _DispHL_s 37 D1:BD50 CD F0 07 02 call _NewLine 38 D1:BD54 C3 DB A8 D1 jp Fin 39 D1:BD58 - - - - 40 D1:BD58 00 00 00 00 fshcmdVARfInputBuffer: .db $00, $00, $00, $00 41 D1:BD5C 49 6E 64 65 78 3D 20 00 fshcmdVARfDIndex: .db "Index= ", 0 Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/FshCommands.inc" 7 D1:BD64 - - - - #include "includes/FshCommands/VARS.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/VARS.asm" 1 D1:BD64 56 41 52 53 00 - - - fshcmdVARS: .db "VARS", 0 2 D1:BD69 12 00 - - fshcmdVARSo: .dw $0012 3 D1:BD6B 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:BD81 56 41 52 53 00 - - - fshcmdVARSu: .db "VARS", 0 5 D1:BD86 - - - - fshcmdVARSf: 6 D1:BD86 21 CD EA D0 ld hl, FshCmdArgFlags 7 D1:BD8A CB 46 - - bit 0, (hl) 8 D1:BD8C 28 0C - - jr z, fshcmdVARSfExe 9 D1:BD8E 21 E9 B3 D1 ld hl, ErrUsageo 10 D1:BD92 CD 54 B3 D1 call ErrSet 11 D1:BD96 CD 07 B3 D1 call ErrCatch 12 D1:BD9A - - - - fshcmdVARSfExe: 13 D1:BD9A 06 00 - - ld b, 0 14 D1:BD9C 0E 00 - - ld c, 0 15 D1:BD9E 11 00 00 00 ld de, 0 16 D1:BDA2 - - - - fshcmdVARSfLoop: 17 D1:BDA2 CD 7F B2 D1 call fshvarget 18 D1:BDA6 7C - - - ld a, h 19 D1:BDA7 CD B8 07 02 call _PutC 20 D1:BDAB 7D - - - ld a, l 21 D1:BDAC CD B8 07 02 call _PutC 22 D1:BDB0 79 - - - ld a, c 23 D1:BDB1 0C - - - inc c 24 D1:BDB2 FE 07 - - cp 7 25 D1:BDB4 20 0E - - jr nz, fshcmdVARSfLoopU 26 D1:BDB6 E5 - - - push hl 27 D1:BDB7 C5 - - - push bc 28 D1:BDB8 D5 - - - push de 29 D1:BDB9 CD F0 07 02 call _NewLine 30 D1:BDBD D1 - - - pop de 31 D1:BDBE C1 - - - pop bc 32 D1:BDBF E1 - - - pop hl 33 D1:BDC0 0E 00 - - ld c, 0 34 D1:BDC2 18 06 - - jr fshcmdVARSfLoopEnd 35 D1:BDC4 - - - - fshcmdVARSfLoopU: 36 D1:BDC4 3E 5F - - ld a, '_' 37 D1:BDC6 CD B8 07 02 call _PutC 38 D1:BDCA - - - - fshcmdVARSfLoopEnd: 39 D1:BDCA 04 - - - inc b 40 D1:BDCB 13 - - - inc de 41 D1:BDCC 78 - - - ld a, b 42 D1:BDCD FE 40 - - cp FshVarsSize / 2 43 D1:BDCF 38 D1 - - jr c, fshcmdVARSfLoop 44 D1:BDD1 C3 DB A8 D1 jp Fin Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/FshCommands.inc" 8 D1:BDD5 - - - - #include "includes/FshCommands/SLEEP.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/SLEEP.asm" 1 D1:BDD5 53 4C 45 45 50 00 - - fshcmdSLEEP: .db "SLEEP", 0 2 D1:BDDB 16 00 - - fshcmdSLEEPo: .dw $0016 3 D1:BDDD 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:BE07 53 4C 45 45 50 00 - - fshcmdSLEEPu: .db "SLEEP", 0 5 D1:BE0D - - - - fshcmdSLEEPf: 6 D1:BE0D F3 - - - di 7 D1:BE0E CD 38 11 02 call _EnableAPD 8 D1:BE12 3E 01 - - ld a,1 9 D1:BE14 21 90 05 D0 ld hl,apdSubTimer 10 D1:BE18 77 - - - ld (hl),a 11 D1:BE19 23 - - - inc hl 12 D1:BE1A 77 - - - ld (hl),a 13 D1:BE1B FD CB 08 DE set apdRunning,(iy+apdFlags) 14 D1:BE1F FB - - - ei 15 D1:BE20 C3 DB A8 D1 jp Fin Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/FshCommands.inc" 9 D1:BE24 - - - - #include "includes/FshCommands/INFO.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/INFO.asm" 1 D1:BE24 49 4E 46 4F 00 - - - fshcmdINFO: .db "INFO", 0 2 D1:BE29 20 00 - - fshcmdINFOo: .dw $0020 3 D1:BE2B 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:BE51 49 4E 46 4F 00 - - - fshcmdINFOu: .db "INFO", 0 5 D1:BE56 - - - - fshcmdINFOf: 6 D1:BE56 21 CD EA D0 ld hl, FshCmdArgFlags 7 D1:BE5A CB 46 - - bit 0, (hl) 8 D1:BE5C 28 0C - - jr z, fshcmdINFOfExe 9 D1:BE5E 21 E9 B3 D1 ld hl, ErrUsageo 10 D1:BE62 CD 54 B3 D1 call ErrSet 11 D1:BE66 CD 07 B3 D1 call ErrCatch 12 D1:BE6A - - - - fshcmdINFOfExe: 13 D1:BE6A CD 08 08 02 call _ClrLCDFull 14 D1:BE6E AF - - - xor a 15 D1:BE6F 32 95 05 D0 ld (CurRow), a 16 D1:BE73 32 96 05 D0 ld (CurCol), a 17 D1:BE77 - - - - 18 D1:BE77 CD 36 B4 D1 call printfshnamelong 19 D1:BE7B CD F0 07 02 call _NewLine 20 D1:BE7F - - - - 21 D1:BE7F 21 0A A9 D1 ld hl, FshBy 22 D1:BE83 CD C0 07 02 call _PutS 23 D1:BE87 CD F0 07 02 call _NewLine 24 D1:BE8B - - - - 25 D1:BE8B 21 14 A9 D1 ld hl, FshSite 26 D1:BE8F CD C0 07 02 call _PutS 27 D1:BE93 CD F0 07 02 call _NewLine 28 D1:BE97 - - - - 29 D1:BE97 CD F0 07 02 call _NewLine 30 D1:BE9B 21 BF BE D1 ld hl, fshcmdINFOfSPS1 31 D1:BE9F CD C0 07 02 call _PutS 32 D1:BEA3 3E 27 - - ld a, $27 33 D1:BEA5 CD B8 07 02 call _PutC 34 D1:BEA9 21 2F A9 D1 ld hl, PS1 35 D1:BEAD CD C0 07 02 call _PutS 36 D1:BEB1 3E 27 - - ld a, $27 37 D1:BEB3 CD B8 07 02 call _PutC 38 D1:BEB7 CD F0 07 02 call _NewLine 39 D1:BEBB - - - - 40 D1:BEBB C3 DB A8 D1 jp Fin 41 D1:BEBF - - - - 42 D1:BEBF 50 53 31 CE CE CE 3A 00 fshcmdINFOfSPS1: .db "PS1", $CE, $CE, $CE, ":", 0 Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/FshCommands.inc" 10 D1:BEC7 - - - - #include "includes/FshCommands/HELP.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/HELP.asm" 1 D1:BEC7 48 45 4C 50 00 - - - fshcmdHELP: .db "HELP", 0 2 D1:BECC 21 00 - - fshcmdHELPo: .dw $0021 3 D1:BECE 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:BEE4 48 45 4C 50 00 - - - fshcmdHELPu: .db "HELP", 0 5 D1:BEE9 - - - - fshcmdHELPf: 6 D1:BEE9 21 CD EA D0 ld hl, FshCmdArgFlags 7 D1:BEED CB 46 - - bit 0, (hl) 8 D1:BEEF 28 0C - - jr z, fshcmdHELPfExe 9 D1:BEF1 21 E9 B3 D1 ld hl, ErrUsageo 10 D1:BEF5 CD 54 B3 D1 call ErrSet 11 D1:BEF9 CD 07 B3 D1 call ErrCatch 12 D1:BEFD - - - - fshcmdHELPfExe: 13 D1:BEFD 21 E2 BF D1 ld hl, fshcmdHELPfLine1 14 D1:BF01 CD C0 07 02 call _PutS 15 D1:BF05 CD F0 07 02 call _NewLine 16 D1:BF09 - - - - 17 D1:BF09 - - - - #macro fshcmdHELPmRow1(cmdXs) 18 D1:BF09 xor a 19 D1:BF09 ld (curCol), a 20 D1:BF09 ld hl, cmdXs 21 D1:BF09 call _PutS 22 D1:BF09 call _NewLine 23 D1:BF09 #endmacro 24 D1:BF09 - - - - #macro fshcmdHELPmRow2(cmdXs, cmdYs) 25 D1:BF09 xor a 26 D1:BF09 ld (curCol), a 27 D1:BF09 ld hl, cmdXs 28 D1:BF09 call _PutS 29 D1:BF09 ld a, 9 30 D1:BF09 ld (curcol), a 31 D1:BF09 ld hl, cmdYs 32 D1:BF09 call _PutS 33 D1:BF09 call _NewLine 34 D1:BF09 #endmacro 35 D1:BF09 - - - - #macro fshcmdHELPmRow3(cmdXs, cmdYs, cmdZs) 36 D1:BF09 xor a 37 D1:BF09 ld (curCol), a 38 D1:BF09 ld hl, cmdXs 39 D1:BF09 call _PutS 40 D1:BF09 ld a, 9 41 D1:BF09 ld (curcol), a 42 D1:BF09 ld hl, cmdYs 43 D1:BF09 call _PutS 44 D1:BF09 ld a, 19 45 D1:BF09 ld (curcol), a 46 D1:BF09 ld hl, cmdZs 47 D1:BF09 call _PutS 48 D1:BF09 call _NewLine 49 D1:BF09 #endmacro 50 D1:BF09 - - - - 51 D1:BF09 AF 32 96 05 D0 21 5C B9 D1 CD C0 07 02 3E 09 32 96 05 D0 21 76 B9 D1 CD C0 07 02 3E 13 32 96 05 D0 21 6E BA D1 CD C0 07 02 CD F0 07 02 - - - fshcmdHELPmRow3(fshcmdEXIT, fshcmdSET, fshcmdCOPY) Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/HELP.asm" 52 D1:BF36 AF 32 96 05 D0 21 7D BB D1 CD C0 07 02 3E 09 32 96 05 D0 21 94 BC D1 CD C0 07 02 3E 13 32 96 05 D0 21 C1 BC D1 CD C0 07 02 CD F0 07 02 - - - fshcmdHELPmRow3(fshcmdMOVE, fshcmdCLS, fshcmdVAR) 53 D1:BF63 AF 32 96 05 D0 21 64 BD D1 CD C0 07 02 3E 09 32 96 05 D0 21 D5 BD D1 CD C0 07 02 3E 13 32 96 05 D0 21 24 BE D1 CD C0 07 02 CD F0 07 02 - - - fshcmdHELPmRow3(fshcmdVARS, fshcmdSLEEP, fshcmdINFO) 54 D1:BF90 AF 32 96 05 D0 21 C7 BE D1 CD C0 07 02 3E 09 32 96 05 D0 21 1B C0 D1 CD C0 07 02 CD F0 07 02 - fshcmdHELPmRow2(fshcmdHELP, fshcmdMAN) 55 D1:BFAF AF 32 96 05 D0 21 3E C3 D1 CD C0 07 02 3E 09 32 96 05 D0 21 F4 C6 D1 CD C0 07 02 CD F0 07 02 - fshcmdHELPmRow2(cryptocmdENCRYPT, cryptocmdDECRYPT) 56 D1:BFCE - - - - ; Extention Point 57 D1:BFCE - - - - 58 D1:BFCE CD F0 07 02 call _NewLine 59 D1:BFD2 21 F6 BF D1 ld hl, fshcmdHELPfLine2 60 D1:BFD6 CD C0 07 02 call _PutS 61 D1:BFDA CD F0 07 02 call _NewLine 62 D1:BFDE C3 DB A8 D1 jp Fin 63 D1:BFE2 - - - - 64 D1:BFE2 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:BFF6 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-shell/includes/FshCommands/FshCommands.inc" 11 D1:C01B - - - - #include "includes/FshCommands/MAN.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/MAN.asm" 1 D1:C01B 4D 41 4E 00 fshcmdMAN: .db "MAN", 0 2 D1:C01F 22 00 - - fshcmdMANo: .dw $0022 3 D1:C021 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:C03F 4D 41 4E 20 3C 63 6F 6D 6D 61 6E 64 3E 00 - - fshcmdMANu: .db "MAN ", 0 5 D1:C04D - - - - fshcmdMANf: 6 D1:C04D - - - - fshcmdMANfCheckArgs: 7 D1:C04D 21 CD EA D0 ld hl, FshCmdArgFlags 8 D1:C051 CB 46 - - bit 0, (hl) 9 D1:C053 28 10 - - jr z, fshcmdMANfArg0Get 10 D1:C055 CB 4E - - bit 1, (hl) 11 D1:C057 28 24 - - jr z, fshcmdMANfExe 12 D1:C059 21 E9 B3 D1 ld hl, ErrUsageo 13 D1:C05D CD 54 B3 D1 call ErrSet 14 D1:C061 CD 07 B3 D1 call ErrCatch 15 D1:C065 - - - - fshcmdMANfArg0Get: 16 D1:C065 21 FA C0 D1 ld hl, fshcmdMANfPrompt 17 D1:C069 CD 18 AB D1 call printprompt 18 D1:C06D - - - - 19 D1:C06D 21 A8 EA D0 ld hl, FshCmdArg0 20 D1:C071 11 08 00 00 ld de, FshCmdCmdSize 21 D1:C075 CD A0 AD D1 call inputstr 22 D1:C079 CD F0 07 02 call _NewLine 23 D1:C07D - - - - 24 D1:C07D - - - - fshcmdMANfExe: 25 D1:C07D 21 A8 EA D0 ld hl, FshCmdArg0 26 D1:C081 11 9F EA D0 ld de, FshCmd 27 D1:C085 CD 63 AC D1 call strcpy 28 D1:C089 - - - - 29 D1:C089 21 E9 C0 D1 ld hl, fshcmdMANfPrefix 30 D1:C08D CD C0 07 02 call _PutS 31 D1:C091 - - - - 32 D1:C091 21 9F EA D0 ld hl, FshCmd 33 D1:C095 CD C0 07 02 call _PutS 34 D1:C099 CD F0 07 02 call _NewLine 35 D1:C09D CD F0 07 02 call _NewLine 36 D1:C0A1 - - - - 37 D1:C0A1 21 9F EA D0 ld hl, FshCmd 38 D1:C0A5 CD 41 B6 D1 call manroute 39 D1:C0A9 11 00 00 00 ld de, $00 40 D1:C0AD CD 71 A9 D1 call cpHLDE 41 D1:C0B1 CA E3 A8 D1 jp z, Err 42 D1:C0B5 - - - - 43 D1:C0B5 CD C0 07 02 call _PutS 44 D1:C0B9 CD F0 07 02 call _NewLine 45 D1:C0BD CD F0 07 02 call _NewLine 46 D1:C0C1 - - - - 47 D1:C0C1 21 F2 C0 D1 ld hl, fshcmdMANfUsage 48 D1:C0C5 CD C0 07 02 call _PutS 49 D1:C0C9 - - - - 50 D1:C0C9 21 9F EA D0 ld hl, FshCmd 51 D1:C0CD CD 57 B6 D1 call manrouteu 52 D1:C0D1 11 00 00 00 ld de, $00 53 D1:C0D5 CD 71 A9 D1 call cpHLDE 54 D1:C0D9 CA E3 A8 D1 jp z, Err 55 D1:C0DD CD C0 07 02 call _PutS 56 D1:C0E1 CD F0 07 02 call _NewLine 57 D1:C0E5 - - - - 58 D1:C0E5 C3 DB A8 D1 jp Fin 59 D1:C0E9 - - - - 60 D1:C0E9 4D 41 4E 2D 44 42 DF 20 00 - - - fshcmdMANfPrefix: .db "MAN-DB", $DF, ' ', 0 61 D1:C0F2 55 73 61 67 65 3A 20 00 fshcmdMANfUsage: .db "Usage: ",0 62 D1:C0FA 43 6F 6D 6D 61 6E 64 3D 20 00 - - fshcmdMANfPrompt: .db "Command= ", 0 Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/FshCommands.inc" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/FshCommand.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/Command.asm" 48 D1:C104 - - - - #include "includes/CryptoCommands/CryptoCommand.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/CryptoCommand.asm" 1 D1:C104 - - - - cryptocmddecode: 2 D1:C104 E5 D5 11 3E C3 D1 CD 50 AC D1 21 46 C3 D1 D1 CC 49 AA D1 E1 decodecmdopt(cryptocmdENCRYPT, cryptocmdENCRYPTo) Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/CryptoCommand.asm" 3 D1:C118 E5 D5 11 F4 C6 D1 CD 50 AC D1 21 FC C6 D1 D1 CC 49 AA D1 E1 decodecmdopt(cryptocmdDECRYPT, cryptocmdDECRYPTo) 4 D1:C12C C9 - - - ret 5 D1:C12D - - - - 6 D1:C12D - - - - cryptocmdroute: 7 D1:C12D C1 - - - pop bc 8 D1:C12E 11 46 C3 D1 CD 55 AA D1 CA B6 C3 D1 routeoptjp(cryptocmdENCRYPTo, cryptocmdENCRYPTf) 9 D1:C13A 11 FC C6 D1 CD 55 AA D1 CA 6C C7 D1 routeoptjp(cryptocmdDECRYPTo, cryptocmdDECRYPTf) 10 D1:C146 C5 - - - push bc 11 D1:C147 C9 - - - ret 12 D1:C148 - - - - 13 D1:C148 - - - - cryptocmdmanroute: 14 D1:C148 C1 - - - pop bc 15 D1:C149 E5 11 3E C3 D1 CD 50 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 3F C4 D1 CD 50 AC D1 E1 11 43 C4 D1 CA 54 B6 D1 subroutestrjp(cryptocmdENCRYPT, cryptocmdROT, cryptocmdROTm) 16 D1:C16D E5 11 F4 C6 D1 CD 50 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 F5 C7 D1 CD 50 AC D1 E1 11 F9 C7 D1 CA 54 B6 D1 subroutestrjp(cryptocmdDECRYPT, cryptocmdunROT, cryptocmdunROTm) 17 D1:C191 - - - - 18 D1:C191 E5 11 3E C3 D1 CD 50 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 4D C5 D1 CD 50 AC D1 E1 11 51 C5 D1 CA 54 B6 D1 subroutestrjp(cryptocmdENCRYPT, cryptocmdXOR, cryptocmdXORm) 19 D1:C1B5 E5 11 F4 C6 D1 CD 50 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 FC C8 D1 CD 50 AC D1 E1 11 00 C9 D1 CA 54 B6 D1 subroutestrjp(cryptocmdDECRYPT, cryptocmdunXOR, cryptocmdunXORm) 20 D1:C1D9 - - - - 21 D1:C1D9 E5 11 3E C3 D1 CD 50 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 4C C6 D1 CD 50 AC D1 E1 11 51 C6 D1 CA 54 B6 D1 subroutestrjp(cryptocmdENCRYPT, cryptocmdHELP, cryptocmdHELPm) 22 D1:C1FD E5 11 F4 C6 D1 CD 50 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 11 CA D1 CD 50 AC D1 E1 11 16 CA D1 CA 54 B6 D1 subroutestrjp(cryptocmdDECRYPT, cryptocmdunHELP, cryptocmdunHELPm) 23 D1:C221 - - - - 24 D1:C221 11 3E C3 D1 CD 50 AC D1 11 48 C3 D1 CA 54 B6 D1 routestrjp(cryptocmdENCRYPT, cryptocmdENCRYPTm) 25 D1:C231 11 F4 C6 D1 CD 50 AC D1 11 FE C6 D1 CA 54 B6 D1 routestrjp(cryptocmdDECRYPT, cryptocmdDECRYPTm) 26 D1:C241 - - - - 27 D1:C241 C5 - - - push bc 28 D1:C242 C9 - - - ret 29 D1:C243 - - - - 30 D1:C243 - - - - 31 D1:C243 - - - - cryptocmdmanrouteu: 32 D1:C243 C1 - - - pop bc 33 D1:C244 E5 11 3E C3 D1 CD 50 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 3F C4 D1 CD 50 AC D1 E1 11 7A C4 D1 CA 6A B6 D1 subrouteustrjp(cryptocmdENCRYPT, cryptocmdROT, cryptocmdROTu) 34 D1:C268 E5 11 F4 C6 D1 CD 50 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 F5 C7 D1 CD 50 AC D1 E1 11 30 C8 D1 CA 6A B6 D1 subrouteustrjp(cryptocmdDECRYPT, cryptocmdunROT, cryptocmdunROTu) 35 D1:C28C - - - - 36 D1:C28C E5 11 3E C3 D1 CD 50 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 4D C5 D1 CD 50 AC D1 E1 11 73 C5 D1 CA 6A B6 D1 subrouteustrjp(cryptocmdENCRYPT, cryptocmdXOR, cryptocmdXORu) 37 D1:C2B0 E5 11 F4 C6 D1 CD 50 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 FC C8 D1 CD 50 AC D1 E1 11 22 C9 D1 CA 6A B6 D1 subrouteustrjp(cryptocmdDECRYPT, cryptocmdunXOR, cryptocmdunXORu) 38 D1:C2D4 - - - - 39 D1:C2D4 E5 11 3E C3 D1 CD 50 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 4C C6 D1 CD 50 AC D1 E1 11 62 C6 D1 CA 6A B6 D1 subrouteustrjp(cryptocmdENCRYPT, cryptocmdHELP, cryptocmdHELPu) 40 D1:C2F8 E5 11 F4 C6 D1 CD 50 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 11 CA D1 CD 50 AC D1 E1 11 27 CA D1 CA 6A B6 D1 subrouteustrjp(cryptocmdDECRYPT, cryptocmdunHELP, cryptocmdunHELPu) 41 D1:C31C - - - - 42 D1:C31C 11 3E C3 D1 CD 50 AC D1 11 91 C3 D1 CA 6A B6 D1 routeustrjp(cryptocmdENCRYPT, cryptocmdENCRYPTu) 43 D1:C32C 11 F4 C6 D1 CD 50 AC D1 11 47 C7 D1 CA 6A B6 D1 routeustrjp(cryptocmdDECRYPT, cryptocmdDECRYPTu) 44 D1:C33C - - - - 45 D1:C33C C5 - - - push bc 46 D1:C33D C9 - - - ret 47 D1:C33E - - - - 48 D1:C33E - - - - #include "includes/CryptoCommands/CryptoCommands.inc" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/CryptoCommands.inc" 1 D1:C33E - - - - #include "includes/CryptoCommands/ENCRYPT.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/ENCRYPT.asm" 1 D1:C33E 45 4E 43 52 59 50 54 00 cryptocmdENCRYPT: .db "ENCRYPT", 0 2 D1:C346 01 02 - - cryptocmdENCRYPTo: .dw $0201 3 D1:C348 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:C391 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:C3B6 - - - - cryptocmdENCRYPTf: 6 D1:C3B6 - - - - cryptocmdENCRYPTfArg0: 7 D1:C3B6 21 CD EA D0 ld hl, FshCmdArgFlags 8 D1:C3BA CB 46 - - bit 0, (hl) 9 D1:C3BC 28 10 - - jr z, cryptocmdENCRYPTfArg0Get 10 D1:C3BE CB 4E - - bit 1, (hl) 11 D1:C3C0 28 24 - - jr z, cryptocmdENCRYPTfExe 12 D1:C3C2 21 E9 B3 D1 ld hl, ErrUsageo 13 D1:C3C6 CD 54 B3 D1 call ErrSet 14 D1:C3CA CD 07 B3 D1 call ErrCatch 15 D1:C3CE - - - - cryptocmdENCRYPTfArg0Get: 16 D1:C3CE 21 36 C4 D1 ld hl, cryptocmdENCRYPTfSCypher 17 D1:C3D2 CD 18 AB D1 call printprompt 18 D1:C3D6 21 A8 EA D0 ld hl, FshCmdArg0 19 D1:C3DA 11 2C 00 00 ld de, FshCmdInptSize 20 D1:C3DE CD A0 AD D1 call inputstr 21 D1:C3E2 CD F0 07 02 call _NewLine 22 D1:C3E6 - - - - cryptocmdENCRYPTfExe: 23 D1:C3E6 - - - - 24 D1:C3E6 - - - - #macro cryptocmdENCRYPTcmpjp(cmdX, cmdXf) 25 D1:C3E6 ld hl, FshCmdArg0 26 D1:C3E6 ld de, CmdX 27 D1:C3E6 call strcmp 28 D1:C3E6 jp z, cmdXf 29 D1:C3E6 #endmacro 30 D1:C3E6 - - - - 31 D1:C3E6 21 A8 EA D0 11 3F C4 D1 CD 50 AC D1 CA 99 C4 D1 cryptocmdENCRYPTcmpjp(cryptocmdROT, cryptocmdROTf) Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/ENCRYPT.asm" 32 D1:C3F6 21 A8 EA D0 11 4D C5 D1 CD 50 AC D1 CA 8F C5 D1 cryptocmdENCRYPTcmpjp(cryptocmdXOR, cryptocmdXORf) 33 D1:C406 21 A8 EA D0 11 4C C6 D1 CD 50 AC D1 CA 6F C6 D1 cryptocmdENCRYPTcmpjp(cryptocmdHELP, cryptocmdHELPf) 34 D1:C416 - - - - 35 D1:C416 21 A8 EA D0 ld hl, FshCmdArg0 36 D1:C41A 11 9F EA D0 ld de, FshCmd 37 D1:C41E CD 63 AC D1 call strcpy 38 D1:C422 - - - - 39 D1:C422 21 63 B3 D1 ld hl, ErrCmdNotFoundo 40 D1:C426 11 CE EA D0 ld de, FshCmdErrCode 41 D1:C42A CD 41 AA D1 call bytecpy 42 D1:C42E CD 54 B3 D1 call ErrSet 43 D1:C432 C3 E3 A8 D1 jp Err 44 D1:C436 - - - - 45 D1:C436 43 79 70 68 65 72 3D 20 00 - - - cryptocmdENCRYPTfSCypher: .db "Cypher= ", 0 Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/CryptoCommands.inc" 2 D1:C43F - - - - #include "includes/CryptoCommands/ROT.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/ROT.asm" 1 D1:C43F 52 4F 54 00 cryptocmdROT: .db "ROT", 0 2 D1:C443 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:C47A 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:C499 - - - - cryptocmdROTf: 5 D1:C499 - - - - cryptocmdROTfArg1: 6 D1:C499 21 CD EA D0 ld hl, FshCmdArgFlags 7 D1:C49D CB 5E - - bit 3, (hl) 8 D1:C49F 20 32 - - jr nz, cryptocmdROTfArg2 9 D1:C4A1 CB 56 - - bit 2, (hl) 10 D1:C4A3 28 0C - - jr z, cryptocmdROTfArg1Get 11 D1:C4A5 21 E9 B3 D1 ld hl, ErrUsageo 12 D1:C4A9 CD 54 B3 D1 call ErrSet 13 D1:C4AD CD 07 B3 D1 call ErrCatch 14 D1:C4B1 - - - - cryptocmdROTfArg1Get: 15 D1:C4B1 21 32 C5 D1 ld hl, cryptocmdROTfDShift 16 D1:C4B5 CD 18 AB D1 call printprompt 17 D1:C4B9 21 B1 EA D0 ld hl, FshCmdArg1 18 D1:C4BD 11 03 00 00 ld de, 3 19 D1:C4C1 CD D8 AF D1 call inputnumstr 20 D1:C4C5 CD DA AC D1 call strtow 21 D1:C4C9 11 B1 EA D0 ld de, FshCmdArg1 22 D1:C4CD EB - - - ex de, hl 23 D1:C4CE 73 - - - ld (hl), e 24 D1:C4CF CD F0 07 02 call _NewLine 25 D1:C4D3 - - - - cryptocmdROTfArg2: 26 D1:C4D3 21 BA EA D0 ld hl, FshCmdArg2 27 D1:C4D7 11 D1 EA D0 ld de, FshScratch 28 D1:C4DB CD 63 AC D1 call strcpy 29 D1:C4DF 21 CD EA D0 ld hl, FshCmdArgFlags 30 D1:C4E3 CB 66 - - bit 4, (hl) 31 D1:C4E5 28 10 - - jr z, cryptocmdROTfArg2Get 32 D1:C4E7 CB 6E - - bit 5, (hl) 33 D1:C4E9 28 24 - - jr z, cryptocmdROTfExe 34 D1:C4EB 21 E9 B3 D1 ld hl, ErrUsageo 35 D1:C4EF CD 54 B3 D1 call ErrSet 36 D1:C4F3 CD 07 B3 D1 call ErrCatch 37 D1:C4F7 - - - - cryptocmdROTfArg2Get: 38 D1:C4F7 21 3A C5 D1 ld hl, cryptocmdROTfDMessage 39 D1:C4FB CD 18 AB D1 call printprompt 40 D1:C4FF 21 D1 EA D0 ld hl, FshScratch 41 D1:C503 11 10 00 00 ld de, FshScratchSize - 4 42 D1:C507 CD C4 AE D1 call inputcharstr 43 D1:C50B CD F0 07 02 call _NewLine 44 D1:C50F - - - - cryptocmdROTfExe: 45 D1:C50F 21 B1 EA D0 ld hl, FshCmdArg1 46 D1:C513 7E - - - ld a, (hl) 47 D1:C514 21 D1 EA D0 ld hl, FshScratch 48 D1:C518 CD 50 B5 D1 call rotletencrypt 49 D1:C51C E5 - - - push hl 50 D1:C51D 21 44 C5 D1 ld hl, cryptocmdROTfDResult 51 D1:C521 CD C0 07 02 call _PutS 52 D1:C525 E1 - - - pop hl 53 D1:C526 CD C0 07 02 call _PutS 54 D1:C52A CD F0 07 02 call _NewLine 55 D1:C52E C3 DB A8 D1 jp Fin 56 D1:C532 - - - - 57 D1:C532 53 68 69 66 74 3D 20 00 cryptocmdROTfDShift: .db "Shift= ", 0 58 D1:C53A 4D 65 73 73 61 67 65 3D 20 00 - - cryptocmdROTfDMessage: .db "Message= ", 0 59 D1:C544 52 65 73 75 6C 74 3A 20 00 - - - cryptocmdROTfDResult: .db "Result: ", 0 Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/CryptoCommands.inc" 3 D1:C54D - - - - #include "includes/CryptoCommands/XOR.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/XOR.asm" 1 D1:C54D 58 4F 52 00 cryptocmdXOR: .db "XOR", 0 2 D1:C551 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:C573 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:C58F - - - - cryptocmdXORf: 5 D1:C58F - - - - cryptocmdXORfArg1: 6 D1:C58F 21 CD EA D0 ld hl, FshCmdArgFlags 7 D1:C593 CB 56 - - bit 2, (hl) 8 D1:C595 28 10 - - jr z, cryptocmdXORfArg1Get 9 D1:C597 CB 5E - - bit 3, (hl) 10 D1:C599 28 24 - - jr z, cryptocmdXORfArg2 11 D1:C59B 21 E9 B3 D1 ld hl, ErrUsageo 12 D1:C59F CD 54 B3 D1 call ErrSet 13 D1:C5A3 CD 07 B3 D1 call ErrCatch 14 D1:C5A7 - - - - cryptocmdXORfArg1Get: 15 D1:C5A7 21 33 C6 D1 ld hl, cryptocmdXORfDKey 16 D1:C5AB CD 18 AB D1 call printprompt 17 D1:C5AF 21 B1 EA D0 ld hl, FshCmdArg1 18 D1:C5B3 11 08 00 00 ld de, FshCmdCmdSize 19 D1:C5B7 CD A0 AD D1 call inputstr 20 D1:C5BB CD F0 07 02 call _NewLine 21 D1:C5BF - - - - cryptocmdXORfArg2: 22 D1:C5BF 21 BA EA D0 ld hl, FshCmdArg2 23 D1:C5C3 11 D1 EA D0 ld de, FshScratch 24 D1:C5C7 CD 63 AC D1 call strcpy 25 D1:C5CB 21 CD EA D0 ld hl, FshCmdArgFlags 26 D1:C5CF CB 66 - - bit 4, (hl) 27 D1:C5D1 28 10 - - jr z, cryptocmdXORfArg2Get 28 D1:C5D3 CB 6E - - bit 5, (hl) 29 D1:C5D5 28 24 - - jr z, cryptocmdXORfExe 30 D1:C5D7 21 E9 B3 D1 ld hl, ErrUsageo 31 D1:C5DB CD 54 B3 D1 call ErrSet 32 D1:C5DF CD 07 B3 D1 call ErrCatch 33 D1:C5E3 - - - - cryptocmdXORfArg2Get: 34 D1:C5E3 21 39 C6 D1 ld hl, cryptocmdXORfDMessage 35 D1:C5E7 CD 18 AB D1 call printprompt 36 D1:C5EB 21 D1 EA D0 ld hl, FshScratch 37 D1:C5EF 11 09 00 00 ld de, FshScratchSize - 1 / 2 38 D1:C5F3 CD C4 AE D1 call inputcharstr 39 D1:C5F7 CD F0 07 02 call _NewLine 40 D1:C5FB - - - - cryptocmdXORfExe: 41 D1:C5FB 21 D1 EA D0 ld hl, FshScratch 42 D1:C5FF 11 B1 EA D0 ld de, FshCmdArg1 43 D1:C603 CD DE B5 D1 call xorcrypt 44 D1:C607 21 43 C6 D1 ld hl, cryptocmdXORfDResult 45 D1:C60B CD C0 07 02 call _PutS 46 D1:C60F 21 D1 EA D0 ld hl, FshScratch 47 D1:C613 - - - - cryptocmdXORfPrint: 48 D1:C613 7E - - - ld a, (hl) 49 D1:C614 B7 - - - or a, a 50 D1:C615 28 14 - - jr z, cryptocmdXORfPrintEnd 51 D1:C617 E5 - - - push hl 52 D1:C618 CD B9 AB D1 call bytetohexstr 53 D1:C61C 7E - - - ld a, (hl) 54 D1:C61D CD B8 07 02 call _PutC 55 D1:C621 23 - - - inc hl 56 D1:C622 7E - - - ld a, (hl) 57 D1:C623 CD B8 07 02 call _PutC 58 D1:C627 E1 - - - pop hl 59 D1:C628 23 - - - inc hl 60 D1:C629 18 E8 - - jr cryptocmdXORfPrint 61 D1:C62B - - - - cryptocmdXORfPrintEnd: 62 D1:C62B CD F0 07 02 call _NewLine 63 D1:C62F C3 DB A8 D1 jp Fin 64 D1:C633 - - - - 65 D1:C633 4B 65 79 3D 20 00 - - cryptocmdXORfDKey: .db "Key= ", 0 66 D1:C639 4D 65 73 73 61 67 65 3D 20 00 - - cryptocmdXORfDMessage: .db "Message= ", 0 67 D1:C643 52 65 73 75 6C 74 3A 20 00 - - - cryptocmdXORfDResult: .db "Result: ", 0 Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/CryptoCommands.inc" 4 D1:C64C - - - - #include "includes/CryptoCommands/HELP.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/HELP.asm" 1 D1:C64C 48 45 4C 50 00 - - - cryptocmdHELP: .db "HELP", 0 2 D1:C651 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:C662 45 4E 43 52 59 50 54 20 48 45 4C 50 00 - - - cryptocmdHELPu: .db "ENCRYPT HELP", 0 4 D1:C66F - - - - cryptocmdHELPf: 5 D1:C66F 21 CD EA D0 ld hl, FshCmdArgFlags 6 D1:C673 CB 56 - - bit 2, (hl) 7 D1:C675 28 0C - - jr z, cryptocmdHELPfExe 8 D1:C677 21 E9 B3 D1 ld hl, ErrUsageo 9 D1:C67B CD 54 B3 D1 call ErrSet 10 D1:C67F CD 07 B3 D1 call ErrCatch 11 D1:C683 - - - - cryptocmdHELPfExe: 12 D1:C683 21 E1 C6 D1 ld hl, cryptocmdHELPfLine1 13 D1:C687 CD C0 07 02 call _PutS 14 D1:C68B CD F0 07 02 call _NewLine 15 D1:C68F - - - - 16 D1:C68F - - - - #macro cryptocmdHELPmRow1(cmdXs) 17 D1:C68F xor a 18 D1:C68F ld (curCol), a 19 D1:C68F ld hl, cmdXs 20 D1:C68F call _PutS 21 D1:C68F call _NewLine 22 D1:C68F #endmacro 23 D1:C68F - - - - #macro cryptocmdHELPmRowU(cmdXs, cmdXu) 24 D1:C68F xor a 25 D1:C68F ld (curCol), a 26 D1:C68F ld hl, cmdXs 27 D1:C68F call _PutS 28 D1:C68F ld a, ':' 29 D1:C68F call _PutC 30 D1:C68F ld a, ' ' 31 D1:C68F call _PutC 32 D1:C68F ld hl, cmdXu 33 D1:C68F call _PutS 34 D1:C68F call _NewLine 35 D1:C68F #endmacro 36 D1:C68F - - - - #macro cryptocmdHELPmRow2(cmdXs, cmdYs) 37 D1:C68F xor a 38 D1:C68F ld (curCol), a 39 D1:C68F ld hl, cmdXs 40 D1:C68F call _PutS 41 D1:C68F ld a, 9 42 D1:C68F ld (curcol), a 43 D1:C68F ld hl, cmdYs 44 D1:C68F call _PutS 45 D1:C68F call _NewLine 46 D1:C68F #endmacro 47 D1:C68F - - - - #macro cryptocmdHELPmRow3(cmdXs, cmdYs, cmdZs) 48 D1:C68F xor a 49 D1:C68F ld (curCol), a 50 D1:C68F ld hl, cmdXs 51 D1:C68F call _PutS 52 D1:C68F ld a, 9 53 D1:C68F ld (curcol), a 54 D1:C68F ld hl, cmdYs 55 D1:C68F call _PutS 56 D1:C68F ld a, 19 57 D1:C68F ld (curcol), a 58 D1:C68F ld hl, cmdZs 59 D1:C68F call _PutS 60 D1:C68F call _NewLine 61 D1:C68F #endmacro 62 D1:C68F - - - - 63 D1:C68F AF 32 96 05 D0 21 3F C4 D1 CD C0 07 02 3E 3A CD B8 07 02 3E 20 CD B8 07 02 21 7A C4 D1 CD C0 07 02 CD F0 07 02 - - - cryptocmdHELPmRowU(cryptocmdROT, cryptocmdROTu) Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/HELP.asm" 64 D1:C6B4 AF 32 96 05 D0 21 4D C5 D1 CD C0 07 02 3E 3A CD B8 07 02 3E 20 CD B8 07 02 21 73 C5 D1 CD C0 07 02 CD F0 07 02 - - - cryptocmdHELPmRowU(cryptocmdXOR, cryptocmdXORu) 65 D1:C6D9 - - - - 66 D1:C6D9 CD F0 07 02 call _NewLine 67 D1:C6DD C3 DB A8 D1 jp Fin 68 D1:C6E1 - - - - 69 D1:C6E1 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-shell/includes/CryptoCommands/CryptoCommands.inc" 5 D1:C6F4 - - - - 6 D1:C6F4 - - - - #include "includes/CryptoCommands/DECRYPT.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/DECRYPT.asm" 1 D1:C6F4 44 45 43 52 59 50 54 00 cryptocmdDECRYPT: .db "DECRYPT", 0 2 D1:C6FC 02 02 - - cryptocmdDECRYPTo: .dw $0202 3 D1:C6FE 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:C747 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:C76C - - - - cryptocmdDECRYPTf: 6 D1:C76C - - - - cryptocmdDECRYPTfArg0: 7 D1:C76C 21 CD EA D0 ld hl, FshCmdArgFlags 8 D1:C770 CB 46 - - bit 0, (hl) 9 D1:C772 28 10 - - jr z, cryptocmdDECRYPTfArg0Get 10 D1:C774 CB 4E - - bit 1, (hl) 11 D1:C776 28 24 - - jr z, cryptocmdDECRYPTfExe 12 D1:C778 21 E9 B3 D1 ld hl, ErrUsageo 13 D1:C77C CD 54 B3 D1 call ErrSet 14 D1:C780 CD 07 B3 D1 call ErrCatch 15 D1:C784 - - - - cryptocmdDECRYPTfArg0Get: 16 D1:C784 21 EC C7 D1 ld hl, cryptocmdDECRYPTfSCypher 17 D1:C788 CD 18 AB D1 call printprompt 18 D1:C78C 21 A8 EA D0 ld hl, FshCmdArg0 19 D1:C790 11 2C 00 00 ld de, FshCmdInptSize 20 D1:C794 CD A0 AD D1 call inputstr 21 D1:C798 CD F0 07 02 call _NewLine 22 D1:C79C - - - - cryptocmdDECRYPTfExe: 23 D1:C79C - - - - 24 D1:C79C - - - - #macro cryptocmdDECRYPTcmpjp(cmdX, cmdXf) 25 D1:C79C ld hl, FshCmdArg0 26 D1:C79C ld de, CmdX 27 D1:C79C call strcmp 28 D1:C79C jp z, cmdXf 29 D1:C79C #endmacro 30 D1:C79C - - - - 31 D1:C79C 21 A8 EA D0 11 F5 C7 D1 CD 50 AC D1 CA 45 C8 D1 cryptocmdDECRYPTcmpjp(cryptocmdunROT, cryptocmdunROTf) Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/DECRYPT.asm" 32 D1:C7AC 21 A8 EA D0 11 FC C8 D1 CD 50 AC D1 CA 34 C9 D1 cryptocmdDECRYPTcmpjp(cryptocmdunXOR, cryptocmdunXORf) 33 D1:C7BC 21 A8 EA D0 11 11 CA D1 CD 50 AC D1 CA 34 CA D1 cryptocmdDECRYPTcmpjp(cryptocmdunHELP, cryptocmdunHELPf) 34 D1:C7CC - - - - 35 D1:C7CC 21 A8 EA D0 ld hl, FshCmdArg0 36 D1:C7D0 11 9F EA D0 ld de, FshCmd 37 D1:C7D4 CD 63 AC D1 call strcpy 38 D1:C7D8 - - - - 39 D1:C7D8 21 63 B3 D1 ld hl, ErrCmdNotFoundo 40 D1:C7DC 11 CE EA D0 ld de, FshCmdErrCode 41 D1:C7E0 CD 41 AA D1 call bytecpy 42 D1:C7E4 CD 54 B3 D1 call ErrSet 43 D1:C7E8 C3 E3 A8 D1 jp Err 44 D1:C7EC - - - - 45 D1:C7EC 43 79 70 68 65 72 3D 20 00 - - - cryptocmdDECRYPTfSCypher: .db "Cypher= ", 0 Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/CryptoCommands.inc" 7 D1:C7F5 - - - - #include "includes/CryptoCommands/unROT.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/unROT.asm" 1 D1:C7F5 52 4F 54 00 cryptocmdunROT: .db "ROT", 0 2 D1:C7F9 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:C830 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:C845 - - - - cryptocmdunROTf: 5 D1:C845 - - - - cryptocmdunROTfArg1: 6 D1:C845 21 CD EA D0 ld hl, FshCmdArgFlags 7 D1:C849 CB 5E - - bit 3, (hl) 8 D1:C84B 20 32 - - jr nz, cryptocmdunROTfArg2 9 D1:C84D CB 56 - - bit 2, (hl) 10 D1:C84F 28 0C - - jr z, cryptocmdunROTfArg1Get 11 D1:C851 21 E9 B3 D1 ld hl, ErrUsageo 12 D1:C855 CD 54 B3 D1 call ErrSet 13 D1:C859 CD 07 B3 D1 call ErrCatch 14 D1:C85D - - - - cryptocmdunROTfArg1Get: 15 D1:C85D 21 DE C8 D1 ld hl, cryptocmdunROTfDShift 16 D1:C861 CD 18 AB D1 call printprompt 17 D1:C865 21 B1 EA D0 ld hl, FshCmdArg1 18 D1:C869 11 03 00 00 ld de, 3 19 D1:C86D CD D8 AF D1 call inputnumstr 20 D1:C871 CD DA AC D1 call strtow 21 D1:C875 11 B1 EA D0 ld de, FshCmdArg1 22 D1:C879 EB - - - ex de, hl 23 D1:C87A 73 - - - ld (hl), e 24 D1:C87B CD F0 07 02 call _NewLine 25 D1:C87F - - - - cryptocmdunROTfArg2: 26 D1:C87F 21 BA EA D0 ld hl, FshCmdArg2 27 D1:C883 11 D1 EA D0 ld de, FshScratch 28 D1:C887 CD 63 AC D1 call strcpy 29 D1:C88B 21 CD EA D0 ld hl, FshCmdArgFlags 30 D1:C88F CB 66 - - bit 4, (hl) 31 D1:C891 28 10 - - jr z, cryptocmdunROTfArg2Get 32 D1:C893 CB 6E - - bit 5, (hl) 33 D1:C895 28 24 - - jr z, cryptocmdunROTfExe 34 D1:C897 21 E9 B3 D1 ld hl, ErrUsageo 35 D1:C89B CD 54 B3 D1 call ErrSet 36 D1:C89F CD 07 B3 D1 call ErrCatch 37 D1:C8A3 - - - - cryptocmdunROTfArg2Get: 38 D1:C8A3 21 E6 C8 D1 ld hl, cryptocmdunROTfDMessage 39 D1:C8A7 CD 18 AB D1 call printprompt 40 D1:C8AB 21 D1 EA D0 ld hl, FshScratch 41 D1:C8AF 11 10 00 00 ld de, FshScratchSize - 4 42 D1:C8B3 CD C4 AE D1 call inputcharstr 43 D1:C8B7 CD F0 07 02 call _NewLine 44 D1:C8BB - - - - cryptocmdunROTfExe: 45 D1:C8BB 21 B1 EA D0 ld hl, FshCmdArg1 46 D1:C8BF 7E - - - ld a, (hl) 47 D1:C8C0 21 D1 EA D0 ld hl, FshScratch 48 D1:C8C4 CD 75 B5 D1 call rotletdecrypt 49 D1:C8C8 E5 - - - push hl 50 D1:C8C9 21 F3 C8 D1 ld hl, cryptocmdunROTfDResult 51 D1:C8CD CD C0 07 02 call _PutS 52 D1:C8D1 E1 - - - pop hl 53 D1:C8D2 CD C0 07 02 call _PutS 54 D1:C8D6 CD F0 07 02 call _NewLine 55 D1:C8DA C3 DB A8 D1 jp Fin 56 D1:C8DE - - - - 57 D1:C8DE 53 68 69 66 74 3D 20 00 cryptocmdunROTfDShift: .db "Shift= ", 0 58 D1:C8E6 43 79 70 68 65 72 54 65 78 74 3D 20 00 - - - cryptocmdunROTfDMessage: .db "CypherText= ", 0 59 D1:C8F3 52 65 73 75 6C 74 3A 20 00 - - - cryptocmdunROTfDResult: .db "Result: ", 0 Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/CryptoCommands.inc" 8 D1:C8FC - - - - #include "includes/CryptoCommands/unXOR.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/unXOR.asm" 1 D1:C8FC 58 4F 52 00 cryptocmdunXOR: .db "XOR", 0 2 D1:C900 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:C922 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:C934 - - - - cryptocmdunXORf: 5 D1:C934 - - - - cryptocmdunXORfArg1: 6 D1:C934 21 CD EA D0 ld hl, FshCmdArgFlags 7 D1:C938 CB 56 - - bit 2, (hl) 8 D1:C93A 28 10 - - jr z, cryptocmdunXORfArg1Get 9 D1:C93C CB 5E - - bit 3, (hl) 10 D1:C93E 28 24 - - jr z, cryptocmdunXORfArg2 11 D1:C940 21 E9 B3 D1 ld hl, ErrUsageo 12 D1:C944 CD 54 B3 D1 call ErrSet 13 D1:C948 CD 07 B3 D1 call ErrCatch 14 D1:C94C - - - - cryptocmdunXORfArg1Get: 15 D1:C94C 21 E1 C9 D1 ld hl, cryptocmdunXORfDKey 16 D1:C950 CD 18 AB D1 call printprompt 17 D1:C954 21 B1 EA D0 ld hl, FshCmdArg1 18 D1:C958 11 08 00 00 ld de, FshCmdCmdSize 19 D1:C95C CD A0 AD D1 call inputstr 20 D1:C960 CD F0 07 02 call _NewLine 21 D1:C964 - - - - cryptocmdunXORfArg2: 22 D1:C964 21 BA EA D0 ld hl, FshCmdArg2 23 D1:C968 11 D1 EA D0 ld de, FshScratch 24 D1:C96C CD 63 AC D1 call strcpy 25 D1:C970 21 CD EA D0 ld hl, FshCmdArgFlags 26 D1:C974 CB 66 - - bit 4, (hl) 27 D1:C976 20 45 - - jr nz, cryptocmdunXORfExe 28 D1:C978 - - - - cryptocmdunXORfArg2Get: 29 D1:C978 21 01 CA D1 ld hl, cryptocmdunXORfStringPBuffer 30 D1:C97C 06 0F - - ld b, $0F 31 D1:C97E 3E 00 - - ld a, $00 32 D1:C980 CD 62 AA D1 call memset 33 D1:C984 21 E7 C9 D1 ld hl, cryptocmdunXORfDMessage 34 D1:C988 CD 18 AB D1 call printprompt 35 D1:C98C 21 D1 EA D0 ld hl, FshScratch 36 D1:C990 11 10 00 00 ld de, FshScratchSize - 4 37 D1:C994 CD A0 AD D1 call inputstr 38 D1:C998 01 01 CA D1 ld bc, cryptocmdunXORfStringPBuffer 39 D1:C99C - - - - cryptocmdunXORfArg2GetLoop: 40 D1:C99C 7E - - - ld a, (hl) 41 D1:C99D B7 - - - or a, a 42 D1:C99E 28 19 - - jr z, cryptocmdunXORfArg2GetLoopEnd 43 D1:C9A0 32 FD C9 D1 ld (cryptocmdunXORfStringBuffer), a 44 D1:C9A4 23 - - - inc hl 45 D1:C9A5 7E - - - ld a, (hl) 46 D1:C9A6 32 FE C9 D1 ld (cryptocmdunXORfStringBuffer + 1), a 47 D1:C9AA E5 - - - push hl 48 D1:C9AB 21 FD C9 D1 ld hl, cryptocmdunXORfStringBuffer 49 D1:C9AF CD 13 AC D1 call hexToA 50 D1:C9B3 E1 - - - pop hl 51 D1:C9B4 02 - - - ld (bc), a 52 D1:C9B5 23 - - - inc hl 53 D1:C9B6 03 - - - inc bc 54 D1:C9B7 18 E3 - - jr cryptocmdunXORfArg2GetLoop 55 D1:C9B9 - - - - cryptocmdunXORfArg2GetLoopEnd: 56 D1:C9B9 CD F0 07 02 call _NewLine 57 D1:C9BD - - - - cryptocmdunXORfExe: 58 D1:C9BD 21 01 CA D1 ld hl, cryptocmdunXORfStringPBuffer 59 D1:C9C1 11 B1 EA D0 ld de, FshCmdArg1 60 D1:C9C5 CD DE B5 D1 call xorcrypt 61 D1:C9C9 21 F4 C9 D1 ld hl, cryptocmdunXORfDResult 62 D1:C9CD CD C0 07 02 call _PutS 63 D1:C9D1 21 01 CA D1 ld hl, cryptocmdunXORfStringPBuffer 64 D1:C9D5 CD C0 07 02 call _PutS 65 D1:C9D9 CD F0 07 02 call _NewLine 66 D1:C9DD C3 DB A8 D1 jp Fin 67 D1:C9E1 - - - - 68 D1:C9E1 4B 65 79 3D 20 00 - - cryptocmdunXORfDKey: .db "Key= ", 0 69 D1:C9E7 43 79 70 68 65 72 54 65 78 74 3D 20 00 - - - cryptocmdunXORfDMessage: .db "CypherText= ", 0 70 D1:C9F4 52 65 73 75 6C 74 3A 20 00 - - - cryptocmdunXORfDResult: .db "Result: ", 0 71 D1:C9FD 00 00 00 00 cryptocmdunXORfStringBuffer: .db $00, $00, $00, $00 72 D1:CA01 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-shell/includes/CryptoCommands/CryptoCommands.inc" 9 D1:CA11 - - - - #include "includes/CryptoCommands/unHELP.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/unHELP.asm" 1 D1:CA11 48 45 4C 50 00 - - - cryptocmdunHELP: .db "HELP", 0 2 D1:CA16 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:CA27 44 45 43 52 59 50 54 20 48 45 4C 50 00 - - - cryptocmdunHELPu: .db "DECRYPT HELP", 0 4 D1:CA34 - - - - cryptocmdunHELPf: 5 D1:CA34 21 CD EA D0 ld hl, FshCmdArgFlags 6 D1:CA38 CB 56 - - bit 2, (hl) 7 D1:CA3A 28 0C - - jr z, cryptocmdunHELPfExe 8 D1:CA3C 21 E9 B3 D1 ld hl, ErrUsageo 9 D1:CA40 CD 54 B3 D1 call ErrSet 10 D1:CA44 CD 07 B3 D1 call ErrCatch 11 D1:CA48 - - - - cryptocmdunHELPfExe: 12 D1:CA48 21 A6 CA D1 ld hl, cryptocmdunHELPfLine1 13 D1:CA4C CD C0 07 02 call _PutS 14 D1:CA50 CD F0 07 02 call _NewLine 15 D1:CA54 - - - - 16 D1:CA54 - - - - #macro cryptocmdunHELPmRow1(cmdXs) 17 D1:CA54 xor a 18 D1:CA54 ld (curCol), a 19 D1:CA54 ld hl, cmdXs 20 D1:CA54 call _PutS 21 D1:CA54 call _NewLine 22 D1:CA54 #endmacro 23 D1:CA54 - - - - #macro cryptocmdunHELPmRowU(cmdXs, cmdXu) 24 D1:CA54 xor a 25 D1:CA54 ld (curCol), a 26 D1:CA54 ld hl, cmdXs 27 D1:CA54 call _PutS 28 D1:CA54 ld a, ':' 29 D1:CA54 call _PutC 30 D1:CA54 ld a, ' ' 31 D1:CA54 call _PutC 32 D1:CA54 ld hl, cmdXu 33 D1:CA54 call _PutS 34 D1:CA54 call _NewLine 35 D1:CA54 #endmacro 36 D1:CA54 - - - - #macro cryptocmdunHELPmRow2(cmdXs, cmdYs) 37 D1:CA54 xor a 38 D1:CA54 ld (curCol), a 39 D1:CA54 ld hl, cmdXs 40 D1:CA54 call _PutS 41 D1:CA54 ld a, 9 42 D1:CA54 ld (curcol), a 43 D1:CA54 ld hl, cmdYs 44 D1:CA54 call _PutS 45 D1:CA54 call _NewLine 46 D1:CA54 #endmacro 47 D1:CA54 - - - - #macro cryptocmdunHELPmRow3(cmdXs, cmdYs, cmdZs) 48 D1:CA54 xor a 49 D1:CA54 ld (curCol), a 50 D1:CA54 ld hl, cmdXs 51 D1:CA54 call _PutS 52 D1:CA54 ld a, 9 53 D1:CA54 ld (curcol), a 54 D1:CA54 ld hl, cmdYs 55 D1:CA54 call _PutS 56 D1:CA54 ld a, 19 57 D1:CA54 ld (curcol), a 58 D1:CA54 ld hl, cmdZs 59 D1:CA54 call _PutS 60 D1:CA54 call _NewLine 61 D1:CA54 #endmacro 62 D1:CA54 - - - - 63 D1:CA54 AF 32 96 05 D0 21 F5 C7 D1 CD C0 07 02 3E 3A CD B8 07 02 3E 20 CD B8 07 02 21 30 C8 D1 CD C0 07 02 CD F0 07 02 - - - cryptocmdunHELPmRowU(cryptocmdunROT, cryptocmdunROTu) Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/unHELP.asm" 64 D1:CA79 AF 32 96 05 D0 21 FC C8 D1 CD C0 07 02 3E 3A CD B8 07 02 3E 20 CD B8 07 02 21 22 C9 D1 CD C0 07 02 CD F0 07 02 - - - cryptocmdunHELPmRowU(cryptocmdunXOR, cryptocmdunXORu) 65 D1:CA9E - - - - 66 D1:CA9E CD F0 07 02 call _NewLine 67 D1:CAA2 C3 DB A8 D1 jp Fin 68 D1:CAA6 - - - - 69 D1:CAA6 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-shell/includes/CryptoCommands/CryptoCommands.inc" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/CryptoCommand.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/Command.asm" Listing for file "FSHa.asm" 75 D1:CAB9 - - - - 76 D1:CAB9 45 4E 44 46 53 48 41 - .db "ENDFSHA" 77 D1:CAC0 - - - - 78 D1:CAC0 - - - - .end