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 F0 B2 D1 CALL fshvarreset 17 D1:A899 - - - - 18 D1:A899 - - - - ;call prgminstallload 19 D1:A899 - - - - 20 D1:A899 CD BB B4 D1 CALL drawstatusbar 21 D1:A89D - - - - 22 D1:A89D CD 96 B4 D1 CALL printmotd 23 D1:A8A1 - - - - 24 D1:A8A1 - - - - Input: 25 D1:A8A1 3E 00 - - LD A, $00 26 D1:A8A3 CD E1 B0 D1 CALL commandfill 27 D1:A8A7 - - - - 28 D1:A8A7 21 34 A9 D1 LD HL, PS1 29 D1:A8AB CD 1D AB D1 CALL printprompt 30 D1:A8AF - - - - 31 D1:A8AF 21 9F EA D0 LD HL, FshCmd 32 D1:A8B3 11 2C 00 00 LD DE, FshCmdInptSize 33 D1:A8B7 CD A5 AD D1 CALL inputstr 34 D1:A8BB - - - - 35 D1:A8BB 21 9F EA D0 LD HL, FshCmd 36 D1:A8BF CD FC B0 D1 CALL fshparsecommand 37 D1:A8C3 - - - - 38 D1:A8C3 CD F0 07 02 CALL _NewLine 39 D1:A8C7 - - - - 40 D1:A8C7 - - - - Decode: 41 D1:A8C7 21 9F EA D0 LD HL, FshCmd 42 D1:A8CB 11 CF EA D0 LD DE, FshCmdOP 43 D1:A8CF CD 74 B6 D1 CALL commanddecode 44 D1:A8D3 - - - - 45 D1:A8D3 - - - - Route: 46 D1:A8D3 21 CF EA D0 LD HL, FshCmdOP 47 D1:A8D7 C3 81 B6 D1 JP commandroute 48 D1:A8DB - - - - 49 D1:A8DB - - - - Fin: 50 D1:A8DB CD 2B B5 D1 CALL updatestatusbar 51 D1:A8DF C3 A1 A8 D1 JP Input 52 D1:A8E3 - - - - 53 D1:A8E3 - - - - Err: 54 D1:A8E3 C3 1B B3 D1 JP ErrRoute 55 D1:A8E7 - - - - 56 D1:A8E7 - - - - Cleanup: 57 D1:A8E7 FD CB 03 C6 SET graphdraw,(IY+graphflags) 58 D1:A8EB CD 08 08 02 CALL _ClrLCDFull 59 D1:A8EF CD 18 08 02 CALL _ClrTxtShdw 60 D1:A8F3 CD 28 08 02 CALL _homeup 61 D1:A8F7 CD 3C 1A 02 call _DrawStatusBar 62 D1:A8FB - - - - 63 D1:A8FB - - - - Exit: 64 D1:A8FB FD CB 00 AE RES donePrgm,(iy+doneFlags) 65 D1:A8FF C9 - - - RET 66 D1:A900 - - - - 67 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 53 48 41 00 - - - Fsh: .db "FSHA", 0 3 D1:A905 46 73 68 20 53 48 65 6C 6C 00 - - FshName: .db "Fsh SHell", 0 4 D1:A90F 42 79 20 70 69 78 69 79 73 00 - - FshBy: .db "By pixiys", 0 5 D1:A919 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 6 D1:A934 46 53 48 3E 20 00 - - PS1: .db "FSH> ", 0 7 D1:A93A 36 34 77 00 FshVVars: .db "64w", 0 8 D1:A93E 30 00 - - FshVMajor: .db "0", 0 9 D1:A940 31 00 - - FshVMinor: .db "1", 0 10 D1:A942 31 00 - - FshVPatch: .db "1", 0 11 D1:A944 36 30 30 00 FshVBuild: .db "600" ,0 12 D1:A948 2E 00 - - FshVSeparator: .db ".", 0 13 D1:A94A 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 14 D1:A960 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" 68 D1:A975 00 - - - FshFlags: .DB %00000000 69 D1:A976 - - - - ; 0: Debug Flag 70 D1:A976 - - - - ; 1: Error Flag 71 D1:A976 - - - - ; 2: Program Flag 72 D1:A976 - - - - 73 D1:A976 - - - - #include "includes/lib/lib.inc" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/lib.inc" 1 D1:A976 - - - - #include "includes/lib/std/std.inc" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/std.inc" 1 D1:A976 - - - - #include "includes/lib/std/Math.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/Math.asm" 1 D1:A976 - - - - ;;cpHLDE 2 D1:A976 - - - - ;;Compares HL to DE. 3 D1:A976 - - - - ;;Output: 4 D1:A976 - - - - ;; Same as z80 CP instruction. 5 D1:A976 - - - - cpHLDE: 6 D1:A976 B7 - - - or a 7 D1:A977 ED 52 - - sbc hl, de 8 D1:A979 19 - - - add hl,de 9 D1:A97A C9 - - - ret 10 D1:A97B - - - - 11 D1:A97B - - - - ;;cpHLBC 12 D1:A97B - - - - ;;Compares HL to BC. 13 D1:A97B - - - - ;;Output: 14 D1:A97B - - - - ;; Same as z80 CP instruction. 15 D1:A97B - - - - cpHLBC: 16 D1:A97B B7 - - - or a 17 D1:A97C ED 42 - - sbc hl, bc 18 D1:A97E 09 - - - add hl,bc 19 D1:A97F C9 - - - ret 20 D1:A980 - - - - 21 D1:A980 - - - - ;;cpBCDE 22 D1:A980 - - - - ;;Compares DE to BC. 23 D1:A980 - - - - ;;Output: 24 D1:A980 - - - - ;; Same as z80 CP instruction. 25 D1:A980 - - - - cpBCDE: 26 D1:A980 E5 - - - push hl 27 D1:A981 60 - - - ld h, b 28 D1:A982 69 - - - ld l, c 29 D1:A983 B7 - - - or a 30 D1:A984 ED 52 - - sbc hl, de 31 D1:A986 E1 - - - pop hl 32 D1:A987 C9 - - - ret 33 D1:A988 - - - - 34 D1:A988 - - - - ;;mulAbyB 35 D1:A988 - - - - ;;Multiplys AxB 36 D1:A988 - - - - ;;Inputs: 37 D1:A988 - - - - ;; A: Multiplier 38 D1:A988 - - - - ;; B: Multiplicand 39 D1:A988 - - - - ;;Outputs: 40 D1:A988 - - - - ;; A: Product of A and B. 41 D1:A988 - - - - mulAbyB: 42 D1:A988 C5 - - - push bc 43 D1:A989 4F - - - ld c, a 44 D1:A98A - - - - mulAbyBLoop: 45 D1:A98A 81 - - - add a, c 46 D1:A98B 10 FD - - djnz mulAbyBLoop 47 D1:A98D 91 - - - sub c 48 D1:A98E C1 - - - pop bc 49 D1:A98F C9 - - - ret 50 D1:A990 - - - - 51 D1:A990 - - - - ;;mulAbyHL 52 D1:A990 - - - - ;;Multiplys AxHL 53 D1:A990 - - - - ;;Inputs: 54 D1:A990 - - - - ;; A: Multiplier 55 D1:A990 - - - - ;; HL: Multiplicand 56 D1:A990 - - - - ;;Outputs: 57 D1:A990 - - - - ;; HL: Product of A and HL. 58 D1:A990 - - - - mulAbyHL: 59 D1:A990 C5 - - - push bc 60 D1:A991 D5 - - - push de 61 D1:A992 11 00 00 00 ld de, 0 62 D1:A996 EB - - - ex de, hl 63 D1:A997 FE 00 - - cp 0 64 D1:A999 28 04 - - jr z, mulAbyHLEnd 65 D1:A99B 47 - - - ld b, a 66 D1:A99C - - - - mulAbyHLLoop: 67 D1:A99C 19 - - - add hl, de 68 D1:A99D 10 FD - - djnz mulAbyHLLoop 69 D1:A99F - - - - mulAbyHLEnd: 70 D1:A99F D1 - - - pop de 71 D1:A9A0 C1 - - - pop bc 72 D1:A9A1 C9 - - - ret 73 D1:A9A2 - - - - 74 D1:A9A2 - - - - ;;modHL 75 D1:A9A2 - - - - ;;H % L => H 76 D1:A9A2 - - - - ;;Inputs: 77 D1:A9A2 - - - - ;; H: 78 D1:A9A2 - - - - ;; L: 79 D1:A9A2 - - - - modHL: 80 D1:A9A2 C5 - - - push bc 81 D1:A9A3 44 - - - ld b, h 82 D1:A9A4 3E 00 - - ld a, 0 83 D1:A9A6 - - - - modHLLoop: 84 D1:A9A6 3C - - - inc a 85 D1:A9A7 BD - - - cp a, l 86 D1:A9A8 20 02 - - jr nz, modHLLoopEnd 87 D1:A9AA 3E 00 - - ld a, 0 88 D1:A9AC - - - - modHLLoopEnd: 89 D1:A9AC 10 F8 - - djnz modHLLoop 90 D1:A9AE 67 - - - ld h, a 91 D1:A9AF C1 - - - pop bc 92 D1:A9B0 C9 - - - ret 93 D1:A9B1 - - - - 94 D1:A9B1 - - - - 95 D1:A9B1 - - - - 96 D1:A9B1 - - - - ;;mul32By8 97 D1:A9B1 - - - - ;;Performs an unsigned multiplication of DEHL and A. 98 D1:A9B1 - - - - ;;Outputs: 99 D1:A9B1 - - - - ;; DEHL: product of DEHL and A 100 D1:A9B1 - - - - mul32By8: 101 D1:A9B1 C5 DD E5 - push bc \ push ix 102 D1:A9B4 DD 2E 08 - ld ixl, 8 103 D1:A9B7 D5 - - - push de 104 D1:A9B8 E5 - - - push hl 105 D1:A9B9 21 00 00 00 ld hl, 0 106 D1:A9BD 54 - - - ld d, h 107 D1:A9BE 5D - - - ld e, l 108 D1:A9BF - - - - mul32by8loop: 109 D1:A9BF 29 - - - add hl, hl 110 D1:A9C0 CB 13 - - rl e 111 D1:A9C2 CB 12 - - rl d 112 D1:A9C4 17 - - - rla 113 D1:A9C5 30 0A - - jr nc, mul32by8noAdd 114 D1:A9C7 C1 - - - pop bc 115 D1:A9C8 09 - - - add hl, bc 116 D1:A9C9 E3 - - - ex (sp), hl 117 D1:A9CA E5 - - - push hl 118 D1:A9CB ED 5A - - adc hl, de 119 D1:A9CD D1 - - - pop de 120 D1:A9CE EB - - - ex de, hl 121 D1:A9CF E3 - - - ex (sp), hl 122 D1:A9D0 C5 - - - push bc 123 D1:A9D1 - - - - mul32by8noAdd: 124 D1:A9D1 DD 2D - - dec ixl 125 D1:A9D3 20 EA - - jr nz, mul32by8loop 126 D1:A9D5 C1 - - - pop bc 127 D1:A9D6 C1 - - - pop bc 128 D1:A9D7 DD E1 C1 - pop ix \ pop bc 129 D1:A9DA C9 - - - ret 130 D1:A9DB - - - - Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/std.inc" 2 D1:A9DB - - - - #include "includes/lib/std/Random.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/Random.asm" 1 D1:A9DB - - - - ;;randomint 2 D1:A9DB - - - - ;;Gets an 8-bit random number. 3 D1:A9DB - - - - ;;Inputs: 4 D1:A9DB - - - - ;; A: Seed 5 D1:A9DB - - - - ;;Outputs: 6 D1:A9DB - - - - ;; A: Random number (0-255) 7 D1:A9DB - - - - ;;Notes: 8 D1:A9DB - - - - ;; This is not cryptographically random. 9 D1:A9DB - - - - randomint: 10 D1:A9DB 32 2E AA D1 ld (randomintSeed), a 11 D1:A9DF E5 - - - push hl 12 D1:A9E0 D5 - - - push de 13 D1:A9E1 C5 - - - push bc 14 D1:A9E2 2A 2E AA D1 ld hl, (randomintSeed) 15 D1:A9E6 ED 5B 30 AA D1 - - - ld de, (randomintSeed+2) 16 D1:A9EB 44 - - - ld b, h 17 D1:A9EC 4D - - - ld c, l 18 D1:A9ED 29 CB 13 CB 12 - - - add hl, hl \ rl e \ rl d 19 D1:A9F2 29 CB 13 CB 12 - - - add hl, hl \ rl e \ rl d 20 D1:A9F7 2C - - - inc l 21 D1:A9F8 09 - - - add hl, bc 22 D1:A9F9 22 2E AA D1 ld (randomintSeed), hl 23 D1:A9FD 2A 30 AA D1 ld hl, (randomintSeed+2) 24 D1:AA01 ED 5A - - adc hl, de 25 D1:AA03 22 31 AA D1 ld (randomintSeed+3), hl 26 D1:AA07 EB - - - ex de, hl 27 D1:AA08 2A 2E AA D1 ld hl, (randomintSeed) 28 D1:AA0C ED 5B 32 AA D1 - - - ld de, (randomintSeed+4) 29 D1:AA11 01 5E F9 00 ld bc, 63838 30 D1:AA15 29 CB 11 CB 10 - - - add hl, hl \ rl c \ rl b 31 D1:AA1A ED 43 34 AA D1 - - - ld (randomintSeed+6), bc 32 D1:AA1F 9F - - - sbc a, a 33 D1:AA20 E6 F1 - - and %11110001 34 D1:AA22 AD - - - xor l 35 D1:AA23 6F - - - ld l, a 36 D1:AA24 22 35 AA D1 ld (randomintSeed+7), hl 37 D1:AA28 7A - - - ld a, d 38 D1:AA29 80 - - - add a, b 39 D1:AA2A C1 - - - pop bc 40 D1:AA2B D1 - - - pop de 41 D1:AA2C E1 - - - pop hl 42 D1:AA2D C9 - - - ret 43 D1:AA2E - - - - ;Actual random bytes 44 D1:AA2E 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:AA3E - - - - #include "includes/lib/std/Byte.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/Byte.asm" 1 D1:AA3E - - - - ;;bytecmp 2 D1:AA3E - - - - ;;Determines if two bytes are equal. 3 D1:AA3E - - - - ;;Inputs: 4 D1:AA3E - - - - ;; HL: Byte pointer 5 D1:AA3E - - - - ;; DE: Byte pointer 6 D1:AA3E - - - - ;;Outputs: 7 D1:AA3E - - - - ;; Z: Set if equal, reset if not equal 8 D1:AA3E - - - - bytecmp: 9 D1:AA3E E5 - - - push hl 10 D1:AA3F D5 - - - push de 11 D1:AA40 1A - - - ld a, (de) 12 D1:AA41 B7 - - - or a 13 D1:AA42 BE - - - cp (hl) 14 D1:AA43 D1 - - - pop de 15 D1:AA44 E1 - - - pop hl 16 D1:AA45 C9 - - - ret 17 D1:AA46 - - - - 18 D1:AA46 - - - - ;;bytecpy 19 D1:AA46 - - - - ;; Copies a byte. 20 D1:AA46 - - - - ;;Inputs: 21 D1:AA46 - - - - ;; HL: Byte pointer 22 D1:AA46 - - - - ;; DE: Destination 23 D1:AA46 - - - - bytecpy: 24 D1:AA46 D5 - - - push de 25 D1:AA47 E5 - - - push hl 26 D1:AA48 EB - - - ex de, hl 27 D1:AA49 1A - - - ld a, (de) 28 D1:AA4A 77 - - - ld (hl), a 29 D1:AA4B E1 - - - pop hl 30 D1:AA4C D1 - - - pop de 31 D1:AA4D C9 - - - ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/std.inc" 4 D1:AA4E - - - - #include "includes/lib/std/Word.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/Word.asm" 1 D1:AA4E - - - - ;;wordcpy [Words] 2 D1:AA4E - - - - ;;Copies a word. 3 D1:AA4E - - - - ;;Inputs: 4 D1:AA4E - - - - ;; HL: word pointer 5 D1:AA4E - - - - ;; DE: Destination 6 D1:AA4E - - - - wordcpy: 7 D1:AA4E D5 - - - push de 8 D1:AA4F E5 - - - push hl 9 D1:AA50 EB - - - ex de, hl 10 D1:AA51 1A - - - ld a, (de) 11 D1:AA52 77 - - - ld (hl), a 12 D1:AA53 13 - - - inc de 13 D1:AA54 23 - - - inc hl 14 D1:AA55 1A - - - ld a, (de) 15 D1:AA56 77 - - - ld (hl), a 16 D1:AA57 E1 - - - pop hl 17 D1:AA58 D1 - - - pop de 18 D1:AA59 C9 - - - ret 19 D1:AA5A - - - - 20 D1:AA5A - - - - ;;wordcmp 21 D1:AA5A - - - - ;;Compares 2 words 22 D1:AA5A - - - - ;;Inputs: 23 D1:AA5A - - - - ;; HL: word pointer 24 D1:AA5A - - - - ;; DE: word pointer 25 D1:AA5A - - - - wordcmp: 26 D1:AA5A E5 - - - push hl 27 D1:AA5B D5 - - - push de 28 D1:AA5C 1A - - - ld a, (de) 29 D1:AA5D BE - - - cp a, (hl) 30 D1:AA5E 20 04 - - jr nz, wordcmpEnd 31 D1:AA60 23 - - - inc hl 32 D1:AA61 13 - - - inc de 33 D1:AA62 1A - - - ld a, (de) 34 D1:AA63 BE - - - cp a, (hl) 35 D1:AA64 - - - - wordcmpEnd: 36 D1:AA64 D1 - - - pop de 37 D1:AA65 E1 - - - pop hl 38 D1:AA66 C9 - - - ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/std.inc" 5 D1:AA67 - - - - #include "includes/lib/std/Mem.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/Mem.asm" 1 D1:AA67 - - - - ;;memset 2 D1:AA67 - - - - ;;Fills B amount of bytes from hl with a 3 D1:AA67 - - - - ;;Inputs: 4 D1:AA67 - - - - ;; HL: start 5 D1:AA67 - - - - ;; B: how many bytes 6 D1:AA67 - - - - ;; A: Byte 7 D1:AA67 - - - - memset: 8 D1:AA67 E5 - - - push hl 9 D1:AA68 C5 - - - push bc 10 D1:AA69 - - - - memsetLoop: 11 D1:AA69 77 - - - ld (hl), a 12 D1:AA6A 23 - - - inc hl 13 D1:AA6B 10 FC - - djnz memsetLoop 14 D1:AA6D C1 - - - pop bc 15 D1:AA6E E1 - - - pop hl 16 D1:AA6F C9 - - - ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/std.inc" 6 D1:AA70 - - - - #include "includes/lib/std/Char.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/Char.asm" 1 D1:AA70 - - - - #include "includes/tables/CSC.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/tables/CSC.asm" 1 D1:AA70 - - - - charMapCSC: 2 D1:AA70 22 57 52 4D 48 FF FF - .DB "\"WRMH", $FF, $FF 3 D1:AA77 3F 5B 56 51 4C 47 FF FF .DB Lquestion, Ltheta, "VQLG", $FF, $FF 4 D1:AA7F 3A 5A 55 50 4B 46 43 FF .DB ":ZUPKFC", $FF 5 D1:AA87 20 59 54 4F 4A 45 42 FF .DB " YTOJEB", $FF 6 D1:AA8F FF 58 53 4E 49 44 41 - .DB $FF, "XSNIDA" 7 D1:AA96 - - - - 8 D1:AA96 - - - - numsymMapCSC 9 D1:AA96 2B 2D 2A 2F 5E FF FF - .DB "+-*/^", $FF, $FF 10 D1:AA9D 5F 33 36 39 29 C1 5D FF .DB "_369)", $C1, "]", $FF 11 D1:AAA5 2E 32 35 38 28 7B 7D 3B .DB ".258({};" 12 D1:AAAD 30 31 34 37 2C 20 3C 3E 7C FF - - .DB "0147, <>|", $FF 13 D1:AAB7 05 21 40 23 25 26 - - .DB $05, "!@#%&" 14 D1:AABD - - - - 15 D1:AABD - - - - numMapCSC 16 D1:AABD FF FF FF FF FF FF FF - .DB $FF, $FF, $FF, $FF, $FF, $FF, $FF 17 D1:AAC4 FF 33 36 39 FF FF FF FF .DB $FF, "369", $FF, $FF, $FF, $FF 18 D1:AACC FF 32 35 38 FF FF FF FF .DB $FF, "258", $FF, $FF, $FF, $FF 19 D1:AAD4 30 31 34 37 FF FF FF FF FF FF - - .DB "0147", $FF, $FF, $FF, $FF, $FF, $FF 20 D1:AADE 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:AAE4 - - - - ;;chartoascii 3 D1:AAE4 - - - - ;;Converts a char to "ascii" 4 D1:AAE4 - - - - ;;Inputs: 5 D1:AAE4 - - - - ;; A: char code (csc) 6 D1:AAE4 - - - - ;;Outputs: 7 D1:AAE4 - - - - ;; A: ascii char 8 D1:AAE4 - - - - chartoascii: 9 D1:AAE4 E5 - - - push hl 10 D1:AAE5 21 00 00 00 ld hl, 0 11 D1:AAE9 26 00 - - ld h, 0 12 D1:AAEB 6F - - - ld l, a 13 D1:AAEC 11 70 AA D1 ld de, charMapCSC 14 D1:AAF0 19 - - - add hl, de 15 D1:AAF1 7E - - - ld a, (hl) 16 D1:AAF2 E1 - - - pop hl 17 D1:AAF3 C9 - - - ret 18 D1:AAF4 - - - - 19 D1:AAF4 - - - - ;;Charnumtoascii 20 D1:AAF4 - - - - ;;Converts a char to "ascii" 21 D1:AAF4 - - - - ;;Inputs: 22 D1:AAF4 - - - - ;; A: char code (csc) 23 D1:AAF4 - - - - ;;Outputs: 24 D1:AAF4 - - - - ;; A: ascii char 25 D1:AAF4 - - - - charnumtoascii: 26 D1:AAF4 E5 - - - push hl 27 D1:AAF5 21 00 00 00 ld hl, 0 28 D1:AAF9 26 00 - - ld h, 0 29 D1:AAFB 6F - - - ld l, a 30 D1:AAFC 11 BD AA D1 ld de, numMapCSC 31 D1:AB00 19 - - - add hl, de 32 D1:AB01 7E - - - ld a, (hl) 33 D1:AB02 E1 - - - pop hl 34 D1:AB03 C9 - - - ret 35 D1:AB04 - - - - 36 D1:AB04 - - - - ;;charnumsymtoascii 37 D1:AB04 - - - - ;;Converts a char to "ascii" 38 D1:AB04 - - - - ;;Inputs: 39 D1:AB04 - - - - ;; A: char code (csc) 40 D1:AB04 - - - - ;;Outputs: 41 D1:AB04 - - - - ;; A: ascii char 42 D1:AB04 - - - - charnumsymtoascii: 43 D1:AB04 E5 - - - push hl 44 D1:AB05 21 00 00 00 ld hl, 0 45 D1:AB09 26 00 - - ld h, 0 46 D1:AB0B 6F - - - ld l, a 47 D1:AB0C 11 96 AA D1 ld de, numsymMapCSC 48 D1:AB10 19 - - - add hl, de 49 D1:AB11 7E - - - ld a, (hl) 50 D1:AB12 E1 - - - pop hl 51 D1:AB13 C9 - - - ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/std.inc" 7 D1:AB14 - - - - #include "includes/lib/std/Cursor.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/Cursor.asm" 1 D1:AB14 - - - - ;;cursorcharunderreset 2 D1:AB14 - - - - ;;Sets curUnder to 0 3 D1:AB14 - - - - cursorcurunderreset: 4 D1:AB14 E5 - - - push hl 5 D1:AB15 21 99 05 D0 ld hl, curUnder 6 D1:AB19 36 20 - - ld (hl), ' ' 7 D1:AB1B E1 - - - pop hl 8 D1:AB1C C9 - - - ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/std.inc" 8 D1:AB1D - - - - #include "includes/lib/std/Print.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/Print.asm" 1 D1:AB1D - - - - ;;printprompt 2 D1:AB1D - - - - ;;Sets curcol to 0 and prints prompt 3 D1:AB1D - - - - ;;Inputs: 4 D1:AB1D - - - - ;; HL: Prompt String Location 5 D1:AB1D - - - - printprompt: 6 D1:AB1D E5 - - - push hl 7 D1:AB1E AF - - - xor a 8 D1:AB1F 32 96 05 D0 ld (CurCol), a 9 D1:AB23 CD C0 07 02 call _PutS 10 D1:AB27 E1 - - - pop hl 11 D1:AB28 C9 - - - ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/std.inc" 9 D1:AB29 - - - - #include "includes/lib/std/Draw.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/Draw.asm" 1 D1:AB29 - - - - ;;drawpixel 2 D1:AB29 - - - - ;;Sets a pixel to specified color (565) 3 D1:AB29 - - - - ;;Inputs: 4 D1:AB29 - - - - ;; HL: color 5 D1:AB29 - - - - ;; DE: vRam location 6 D1:AB29 - - - - drawpixel: 7 D1:AB29 E5 - - - push hl 8 D1:AB2A D5 - - - push de 9 D1:AB2B EB - - - ex de, hl 10 D1:AB2C 73 - - - ld (hl), e 11 D1:AB2D 23 - - - inc hl 12 D1:AB2E 72 - - - ld (hl), d 13 D1:AB2F D1 - - - pop de 14 D1:AB30 E1 - - - pop hl 15 D1:AB31 C9 - - - ret 16 D1:AB32 - - - - 17 D1:AB32 - - - - ;;drawpixelxy 18 D1:AB32 - - - - ;;Sets a pixel to specified color 19 D1:AB32 - - - - ;;Inputs: 20 D1:AB32 - - - - ;; HL: color 21 D1:AB32 - - - - ;; DE: x 22 D1:AB32 - - - - ;; A: y 23 D1:AB32 - - - - drawpixelxy 24 D1:AB32 D5 - - - push de 25 D1:AB33 E5 - - - push hl 26 D1:AB34 EB - - - ex de, hl 27 D1:AB35 29 - - - add hl, hl 28 D1:AB36 E5 - - - push hl 29 D1:AB37 21 80 02 00 ld hl, 640 30 D1:AB3B CD 90 A9 D1 call mulAbyHL 31 D1:AB3F EB - - - ex de, hl 32 D1:AB40 E1 - - - pop hl 33 D1:AB41 19 - - - add hl, de 34 D1:AB42 11 00 00 D4 ld de, vRam 35 D1:AB46 19 - - - add hl, de 36 D1:AB47 EB - - - ex de, hl 37 D1:AB48 E1 - - - pop hl 38 D1:AB49 CD 29 AB D1 call drawpixel 39 D1:AB4D D1 - - - pop de 40 D1:AB4E C9 - - - ret 41 D1:AB4F - - - - 42 D1:AB4F - - - - ;;drawrow 43 D1:AB4F - - - - ;;Draws a row on lcd 44 D1:AB4F - - - - ;;Inputs: 45 D1:AB4F - - - - ;; A: y 46 D1:AB4F - - - - ;; HL: color 47 D1:AB4F - - - - drawrow: 48 D1:AB4F E5 - - - push hl 49 D1:AB50 C5 - - - push bc 50 D1:AB51 E5 - - - push hl 51 D1:AB52 21 E0 01 00 ld hl, lcdHeight * 2 52 D1:AB56 CD 90 A9 D1 call mulAbyHL 53 D1:AB5A 11 00 00 D4 ld de, vRam 54 D1:AB5E 19 - - - add hl, de 55 D1:AB5F EB - - - ex de, hl 56 D1:AB60 E1 - - - pop hl 57 D1:AB61 01 40 01 00 ld bc, lcdWidth 58 D1:AB65 - - - - drawrowLoop: 59 D1:AB65 CD 29 AB D1 call drawpixel 60 D1:AB69 13 - - - inc de 61 D1:AB6A 13 - - - inc de 62 D1:AB6B 0B - - - dec bc 63 D1:AB6C E5 - - - push hl 64 D1:AB6D 21 00 00 00 ld hl, 0 65 D1:AB71 CD 7B A9 D1 call cpHLBC 66 D1:AB75 E1 - - - pop hl 67 D1:AB76 20 ED - - jr nz, drawrowLoop 68 D1:AB78 C1 - - - pop bc 69 D1:AB79 E1 - - - pop hl 70 D1:AB7A C9 - - - ret 71 D1:AB7B - - - - 72 D1:AB7B - - - - ;;drawbar 73 D1:AB7B - - - - ;;Loops drawing row 74 D1:AB7B - - - - ;;Inputs: 75 D1:AB7B - - - - ;; A: y 76 D1:AB7B - - - - ;; [B]C: height 77 D1:AB7B - - - - ;; HL: color 78 D1:AB7B - - - - drawbar: 79 D1:AB7B C5 - - - push bc 80 D1:AB7C - - - - drawbarLoop: 81 D1:AB7C CD 4F AB D1 call drawrow 82 D1:AB80 0B - - - dec bc 83 D1:AB81 3C - - - inc a 84 D1:AB82 E5 - - - push hl 85 D1:AB83 21 00 00 00 ld hl, 0 86 D1:AB87 CD 7B A9 D1 call cpHLBC 87 D1:AB8B E1 - - - pop hl 88 D1:AB8C 20 EE - - jr nz, drawbarLoop 89 D1:AB8E C1 - - - pop bc 90 D1:AB8F C9 - - - ret 91 D1:AB90 - - - - 92 D1:AB90 - - - - ;;drawrectfilled 93 D1:AB90 - - - - ;;Draws a rectangle from coordinates (Slow) 94 D1:AB90 - - - - ;;Inputs: 95 D1:AB90 - - - - ;; DE: x 96 D1:AB90 - - - - ;; C: y 97 D1:AB90 - - - - ;; HL: width 98 D1:AB90 - - - - ;; A: height 99 D1:AB90 - - - - ;; IXH+IXL: color 100 D1:AB90 - - - - drawrectfilled: 101 D1:AB90 19 - - - add hl, de 102 D1:AB91 81 - - - add a, c 103 D1:AB92 47 - - - ld b, a 104 D1:AB93 - - - - drawrectfilledLoopY: 105 D1:AB93 D5 - - - push de 106 D1:AB94 - - - - drawrectfilledLoopX: 107 D1:AB94 E5 - - - push hl 108 D1:AB95 C5 - - - push bc 109 D1:AB96 EB - - - ex de, hl 110 D1:AB97 DD 54 - - ld d, ixh 111 D1:AB99 DD 5D - - ld e, ixl 112 D1:AB9B EB - - - ex de, hl 113 D1:AB9C 79 - - - ld a, c 114 D1:AB9D CD 32 AB D1 call drawpixelxy 115 D1:ABA1 C1 - - - pop bc 116 D1:ABA2 E1 - - - pop hl 117 D1:ABA3 13 - - - inc de 118 D1:ABA4 CD 76 A9 D1 call cpHLDE 119 D1:ABA8 20 EA - - jr nz, drawrectfilledLoopX 120 D1:ABAA D1 - - - pop de 121 D1:ABAB 0C - - - inc c 122 D1:ABAC 78 - - - ld a, b 123 D1:ABAD B9 - - - cp c 124 D1:ABAE 20 E3 - - jr nz, drawrectfilledLoopY 125 D1:ABB0 C9 - - - ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/std.inc" 10 D1:ABB1 - - - - #include "includes/lib/std/Array.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/Array.asm" 1 D1:ABB1 - - - - ;;array2d 2 D1:ABB1 - - - - ;;gets the address of 2d array 3 D1:ABB1 - - - - ;;Inputs: 4 D1:ABB1 - - - - ;; H: y 5 D1:ABB1 - - - - ;; L: x width 6 D1:ABB1 - - - - ;; B: x 7 D1:ABB1 - - - - ;; DE: Array start 8 D1:ABB1 - - - - ;;Outputs: 9 D1:ABB1 - - - - ;; DE: Array loc address 10 D1:ABB1 - - - - array2d: 11 D1:ABB1 E5 - - - push hl 12 D1:ABB2 ED 6C - - mlt hl 13 D1:ABB4 19 - - - add hl, de 14 D1:ABB5 11 00 00 00 ld de, 0 15 D1:ABB9 58 - - - ld e, b 16 D1:ABBA 19 - - - add hl, de 17 D1:ABBB EB - - - ex de, hl 18 D1:ABBC E1 - - - pop hl 19 D1:ABBD C9 - - - ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/std.inc" 11 D1:ABBE - - - - #include "includes/lib/std/Hex.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/Hex.asm" 1 D1:ABBE - - - - ;;bytetohexstr 2 D1:ABBE - - - - ;;converts byte to hex string 3 D1:ABBE - - - - ;;Inputs: 4 D1:ABBE - - - - ;; A: input byte 5 D1:ABBE - - - - ;;Outputs: 6 D1:ABBE - - - - ;; hl: output string location 7 D1:ABBE - - - - bytetohexstr: 8 D1:ABBE E5 - - - push hl 9 D1:ABBF C5 - - - push bc 10 D1:ABC0 01 00 00 00 ld bc, 0 11 D1:ABC4 4F - - - ld c, a 12 D1:ABC5 06 0F - - ld b, $0F 13 D1:ABC7 A0 - - - and a, b 14 D1:ABC8 47 - - - ld b, a 15 D1:ABC9 79 - - - ld a, c 16 D1:ABCA 48 - - - ld c, b 17 D1:ABCB 06 00 - - ld b, 0 18 D1:ABCD 21 07 AC D1 ld hl, hexLUT 19 D1:ABD1 09 - - - add hl, bc 20 D1:ABD2 46 - - - ld b, (hl) 21 D1:ABD3 21 04 AC D1 ld hl, bytetohexstrBuf + 1 22 D1:ABD7 70 - - - ld (hl), b 23 D1:ABD8 C1 - - - pop bc 24 D1:ABD9 C5 - - - push bc 25 D1:ABDA 01 00 00 00 ld bc, 0 26 D1:ABDE CB 3F - - srl a 27 D1:ABE0 CB 3F - - srl a 28 D1:ABE2 CB 3F - - srl a 29 D1:ABE4 CB 3F - - srl a 30 D1:ABE6 47 - - - ld b, a 31 D1:ABE7 79 - - - ld a, c 32 D1:ABE8 48 - - - ld c, b 33 D1:ABE9 06 00 - - ld b, 0 34 D1:ABEB 21 07 AC D1 ld hl, hexLUT 35 D1:ABEF 09 - - - add hl, bc 36 D1:ABF0 46 - - - ld b, (hl) 37 D1:ABF1 21 03 AC D1 ld hl, bytetohexstrBuf 38 D1:ABF5 70 - - - ld (hl), b 39 D1:ABF6 C1 - - - pop bc 40 D1:ABF7 21 05 AC D1 ld hl, bytetohexstrBuf + 2 41 D1:ABFB 36 00 - - ld (hl), $00 42 D1:ABFD E1 - - - pop hl 43 D1:ABFE 21 03 AC D1 ld hl, bytetohexstrBuf 44 D1:AC02 C9 - - - ret 45 D1:AC03 - - - - 46 D1:AC03 00 00 00 00 bytetohexstrBuf: .db $00, $00, $00, $00 47 D1:AC07 - - - - 48 D1:AC07 - - - - #include "includes/tables/hexLUT.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/tables/hexLUT.asm" 1 D1:AC07 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:AC18 - - - - 50 D1:AC18 - - - - ;;hexToA 51 D1:AC18 - - - - ;;Converts a hexadecimal string to a number. 52 D1:AC18 - - - - ;;Inputs: 53 D1:AC18 - - - - ;; HL: String pointer 54 D1:AC18 - - - - ;;Outputs: 55 D1:AC18 - - - - ;; A: Value 56 D1:AC18 - - - - hexToA: 57 D1:AC18 C5 - - - push bc 58 D1:AC19 E5 - - - push hl 59 D1:AC1A 06 00 - - ld b, 0 60 D1:AC1C 7E - - - _: ld a, (hl) 61 D1:AC1D B7 - - - or a 62 D1:AC1E 28 11 - - jr z, hexToA_ret 63 D1:AC20 CB 10 CB 10 CB 10 CB 10 rl b \ rl b \ rl b \ rl b 64 D1:AC28 CD 35 AC D1 call hexToA_doConvert 65 D1:AC2C B0 - - - or b 66 D1:AC2D 47 - - - ld b, a 67 D1:AC2E 23 - - - inc hl 68 D1:AC2F 18 EB - - jr -_ 69 D1:AC31 - - - - hexToA_ret: 70 D1:AC31 78 - - - ld a, b 71 D1:AC32 E1 - - - pop hl 72 D1:AC33 C1 - - - pop bc 73 D1:AC34 C9 - - - ret 74 D1:AC35 - - - - 75 D1:AC35 - - - - hexToA_doConvert: 76 D1:AC35 FE 61 - - cp 'a' ; Convert to lowercase 77 D1:AC37 38 02 - - jr c, _ 78 D1:AC39 D6 20 - - sub 'a' - 'A' 79 D1:AC3B FE 41 - - _: cp 'A' ; Close gap between numbers and letter 80 D1:AC3D 38 02 - - jr c, _ 81 D1:AC3F D6 07 - - sub 'A'-('9'+1) 82 D1:AC41 D6 30 - - _: sub '0' ; To number 83 D1:AC43 C9 - - - ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/std.inc" 12 D1:AC44 - - - - 13 D1:AC44 - - - - #include "includes/lib/std/String.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/String.asm" 1 D1:AC44 - - - - ;;strlen 2 D1:AC44 - - - - ;;Determines the length of a zero delimited string. 3 D1:AC44 - - - - ;;Inputs: 4 D1:AC44 - - - - ;; HL: String pointer 5 D1:AC44 - - - - ;;Outputs: 6 D1:AC44 - - - - ;; BC: String length 7 D1:AC44 - - - - strlen: 8 D1:AC44 F5 - - - push af 9 D1:AC45 E5 - - - push hl 10 D1:AC46 AF - - - xor a 11 D1:AC47 47 - - - ld b, a 12 D1:AC48 4F - - - ld c, a 13 D1:AC49 ED B1 - - cpir 14 D1:AC4B - - - - ; bc = -bc 15 D1:AC4B AF 91 4F 9F 90 47 - - xor a \ sub c \ ld c, a \ sbc a, a \ sub b \ ld b, a 16 D1:AC51 0B - - - dec bc 17 D1:AC52 E1 - - - pop hl 18 D1:AC53 F1 - - - pop af 19 D1:AC54 C9 - - - ret 20 D1:AC55 - - - - 21 D1:AC55 - - - - ;;strcmp 22 D1:AC55 - - - - ;;Determines if two strings are equal, and checks alphabetical sort order. 23 D1:AC55 - - - - ;;Inputs: 24 D1:AC55 - - - - ;; HL: String pointer 25 D1:AC55 - - - - ;; DE: String pointer 26 D1:AC55 - - - - ;;Outputs: 27 D1:AC55 - - - - ;; Z: Set if equal, reset if not equal 28 D1:AC55 - - - - ;; C: Set if string HL is alphabetically earlier than string DE 29 D1:AC55 - - - - strcmp: 30 D1:AC55 E5 - - - push hl 31 D1:AC56 D5 - - - push de 32 D1:AC57 - - - - strcmpLoop: 33 D1:AC57 1A - - - ld a, (de) 34 D1:AC58 B7 - - - or a 35 D1:AC59 28 07 - - jr z, strCmpEnd 36 D1:AC5B BE - - - cp (hl) 37 D1:AC5C 20 06 - - jr nz, strcmpExit 38 D1:AC5E 23 - - - inc hl 39 D1:AC5F 13 - - - inc de 40 D1:AC60 18 F5 - - jr strcmpLoop 41 D1:AC62 - - - - strcmpEnd: 42 D1:AC62 7E - - - ld a, (hl) 43 D1:AC63 B7 - - - or a 44 D1:AC64 - - - - strcmpExit: 45 D1:AC64 3F - - - ccf 46 D1:AC65 D1 - - - pop de 47 D1:AC66 E1 - - - pop hl 48 D1:AC67 C9 - - - ret 49 D1:AC68 - - - - 50 D1:AC68 - - - - ;;strcpy 51 D1:AC68 - - - - ;;Copies a string. 52 D1:AC68 - - - - ;;Inputs: 53 D1:AC68 - - - - ;; HL: String pointer 54 D1:AC68 - - - - ;; DE: Destination 55 D1:AC68 - - - - ;;Notes: 56 D1:AC68 - - - - ;; This will trample into undefined territory if you try to copy a string into some 57 D1:AC68 - - - - ;;allocated memory it won't fit in. 58 D1:AC68 - - - - strcpy: 59 D1:AC68 D5 - - - push de 60 D1:AC69 E5 - - - push hl 61 D1:AC6A EB - - - ex de, hl 62 D1:AC6B 1A - - - _: ld a, (de) 63 D1:AC6C 77 - - - ld (hl), a 64 D1:AC6D B7 - - - or a 65 D1:AC6E 28 04 - - jr z, _ 66 D1:AC70 23 13 - - inc hl \ inc de 67 D1:AC72 18 F7 - - jr -_ 68 D1:AC74 E1 - - - _: pop hl 69 D1:AC75 D1 - - - pop de 70 D1:AC76 C9 - - - ret 71 D1:AC77 - - - - 72 D1:AC77 - - - - ;;strchr 73 D1:AC77 - - - - ;;Returns a pointer on the first occurence of a character in a string. 74 D1:AC77 - - - - ;;Inputs: 75 D1:AC77 - - - - ;; HL: Haystack 76 D1:AC77 - - - - ;; B: Needle 77 D1:AC77 - - - - ;;Outputs: 78 D1:AC77 - - - - ;; HL: Pointer to first occurence of character 79 D1:AC77 - - - - ;; Z: Set if character found 80 D1:AC77 - - - - ;; A: Destroyed 81 D1:AC77 - - - - strchr: 82 D1:AC77 - - - - strchrLoop: 83 D1:AC77 7E - - - ld a, (hl) 84 D1:AC78 B7 - - - or a 85 D1:AC79 28 05 - - jr z, strchrNoCharFound 86 D1:AC7B B8 - - - cp b 87 D1:AC7C C8 - - - ret z 88 D1:AC7D 23 - - - inc hl 89 D1:AC7E 18 F7 - - jr strchrLoop 90 D1:AC80 - - - - strchrNoCharFound: 91 D1:AC80 3C - - - inc a 92 D1:AC81 C9 - - - ret 93 D1:AC82 - - - - 94 D1:AC82 - - - - ;;strtob 95 D1:AC82 - - - - ;;Converts a string to a byte 96 D1:AC82 - - - - ;;Inputs: 97 D1:AC82 - - - - ;; HL: string pointer 98 D1:AC82 - - - - ;;Outputs: 99 D1:AC82 - - - - ;; A: byte 100 D1:AC82 - - - - strtob: 101 D1:AC82 C5 - - - push bc 102 D1:AC83 D5 - - - push de 103 D1:AC84 0E 00 - - ld c, 0 104 D1:AC86 - - - - strtobNumFind: 105 D1:AC86 7E - - - ld a, (hl) 106 D1:AC87 FE 00 - - cp $00 107 D1:AC89 CA DB AC D1 jp z, strtobEXIT 108 D1:AC8D 0E 00 - - ld c, 0 109 D1:AC8F D6 31 - - sub '1' 110 D1:AC91 FE 3A - - cp '9' + 1 111 D1:AC93 38 03 - - jr c, strtobNumWhile 112 D1:AC95 23 - - - inc hl 113 D1:AC96 18 EE - - jr strtobNumFind 114 D1:AC98 - - - - strtobNumWhile: 115 D1:AC98 E5 - - - push hl 116 D1:AC99 - - - - strtobNumWhileLoop: 117 D1:AC99 79 - - - ld a, c 118 D1:AC9A FE 03 - - cp 3 119 D1:AC9C D2 AD AC D1 jp nc, strtobConvert 120 D1:ACA0 7E - - - ld a, (hl) 121 D1:ACA1 D6 2F - - sub '0' - 1 122 D1:ACA3 38 08 - - jr c, strtobConvert 123 D1:ACA5 FE 3A - - cp '9' + 1 124 D1:ACA7 30 04 - - jr nc, strtobConvert 125 D1:ACA9 23 - - - inc hl 126 D1:ACAA 0C - - - inc c 127 D1:ACAB 18 EC - - jr strtobNumWhileLoop 128 D1:ACAD - - - - strtobConvert: 129 D1:ACAD 2B - - - dec hl 130 D1:ACAE 7E - - - ld a, (hl) 131 D1:ACAF D6 30 - - sub '0' 132 D1:ACB1 4F - - - ld c, a 133 D1:ACB2 2B - - - dec hl 134 D1:ACB3 D1 - - - pop de 135 D1:ACB4 CD 76 A9 D1 call cpHLDE 136 D1:ACB8 DA DB AC D1 jp c, strtobExit 137 D1:ACBC 7E - - - ld a, (hl) 138 D1:ACBD D6 30 - - sub '0' 139 D1:ACBF 06 0A - - ld b, 10 140 D1:ACC1 CD 88 A9 D1 call mulAbyB 141 D1:ACC5 81 - - - add a, c 142 D1:ACC6 4F - - - ld c, a 143 D1:ACC7 2B - - - dec hl 144 D1:ACC8 CD 76 A9 D1 call cpHLDE 145 D1:ACCC DA DB AC D1 jp c, strtobExit 146 D1:ACD0 7E - - - ld a, (hl) 147 D1:ACD1 D6 30 - - sub '0' 148 D1:ACD3 06 64 - - ld b, 100 149 D1:ACD5 CD 88 A9 D1 call mulAbyB 150 D1:ACD9 81 - - - add a, c 151 D1:ACDA 4F - - - ld c, a 152 D1:ACDB - - - - strtobExit: 153 D1:ACDB 79 - - - ld a, c 154 D1:ACDC D1 - - - pop de 155 D1:ACDD C1 - - - pop bc 156 D1:ACDE C9 - - - ret 157 D1:ACDF - - - - 158 D1:ACDF - - - - ;;strtow 159 D1:ACDF - - - - ;;Converts a string to a byte 160 D1:ACDF - - - - ;;Inputs: 161 D1:ACDF - - - - ;; HL: string pointer 162 D1:ACDF - - - - ;;Outputs: 163 D1:ACDF - - - - ;; HL: byte 164 D1:ACDF - - - - strtow: 165 D1:ACDF C5 - - - push bc 166 D1:ACE0 D5 - - - push de 167 D1:ACE1 01 00 00 00 ld bc, 0 168 D1:ACE5 - - - - strtowNumFind: 169 D1:ACE5 7E - - - ld a, (hl) 170 D1:ACE6 FE 00 - - cp $00 171 D1:ACE8 CA 7E AD D1 jp z, strtowEXIT 172 D1:ACEC 0E 00 - - ld c, 0 173 D1:ACEE D6 31 - - sub '1' 174 D1:ACF0 FE 3A - - cp '9' + 1 175 D1:ACF2 38 03 - - jr c, strtowNumWhile 176 D1:ACF4 23 - - - inc hl 177 D1:ACF5 18 EE - - jr strtowNumFind 178 D1:ACF7 - - - - strtowNumWhile: 179 D1:ACF7 E5 - - - push hl 180 D1:ACF8 - - - - strtowNumWhileLoop: 181 D1:ACF8 79 - - - ld a, c 182 D1:ACF9 FE 05 - - cp 5 183 D1:ACFB D2 0C AD D1 jp nc, strtowConvert 184 D1:ACFF 7E - - - ld a, (hl) 185 D1:AD00 D6 2F - - sub '0' - 1 186 D1:AD02 38 08 - - jr c, strtowConvert 187 D1:AD04 FE 3A - - cp '9' + 1 188 D1:AD06 30 04 - - jr nc, strtowConvert 189 D1:AD08 23 - - - inc hl 190 D1:AD09 0C - - - inc c 191 D1:AD0A 18 EC - - jr strtowNumWhileLoop 192 D1:AD0C - - - - strtowConvert: 193 D1:AD0C 01 00 00 00 ld bc, 0 194 D1:AD10 2B - - - dec hl 195 D1:AD11 7E - - - ld a, (hl) 196 D1:AD12 D6 30 - - sub '0' 197 D1:AD14 01 00 00 00 ld bc, 0 198 D1:AD18 4F - - - ld c, a 199 D1:AD19 2B - - - dec hl 200 D1:AD1A - - - - 201 D1:AD1A D1 - - - pop de 202 D1:AD1B CD 76 A9 D1 call cpHLDE 203 D1:AD1F DA 7E AD D1 jp c, strtowExit 204 D1:AD23 7E - - - ld a, (hl) 205 D1:AD24 D6 30 - - sub '0' 206 D1:AD26 E5 - - - push hl 207 D1:AD27 21 0A 00 00 ld hl, 10 208 D1:AD2B CD 90 A9 D1 call mulAbyHL 209 D1:AD2F 09 - - - add hl, bc 210 D1:AD30 44 - - - ld b, h 211 D1:AD31 4D - - - ld c, l 212 D1:AD32 E1 - - - pop hl 213 D1:AD33 2B - - - dec hl 214 D1:AD34 - - - - 215 D1:AD34 CD 76 A9 D1 call cpHLDE 216 D1:AD38 DA 7E AD D1 jp c, strtowExit 217 D1:AD3C 7E - - - ld a, (hl) 218 D1:AD3D D6 30 - - sub '0' 219 D1:AD3F E5 - - - push hl 220 D1:AD40 21 64 00 00 ld hl, 100 221 D1:AD44 CD 90 A9 D1 call mulAbyHL 222 D1:AD48 09 - - - add hl, bc 223 D1:AD49 44 - - - ld b, h 224 D1:AD4A 4D - - - ld c, l 225 D1:AD4B E1 - - - pop hl 226 D1:AD4C 2B - - - dec hl 227 D1:AD4D - - - - 228 D1:AD4D CD 76 A9 D1 call cpHLDE 229 D1:AD51 DA 7E AD D1 jp c, strtowExit 230 D1:AD55 7E - - - ld a, (hl) 231 D1:AD56 D6 30 - - sub '0' 232 D1:AD58 E5 - - - push hl 233 D1:AD59 21 E8 03 00 ld hl, 1000 234 D1:AD5D CD 90 A9 D1 call mulAbyHL 235 D1:AD61 09 - - - add hl, bc 236 D1:AD62 44 - - - ld b, h 237 D1:AD63 4D - - - ld c, l 238 D1:AD64 E1 - - - pop hl 239 D1:AD65 2B - - - dec hl 240 D1:AD66 - - - - 241 D1:AD66 CD 76 A9 D1 call cpHLDE 242 D1:AD6A DA 7E AD D1 jp c, strtowExit 243 D1:AD6E 7E - - - ld a, (hl) 244 D1:AD6F D6 30 - - sub '0' 245 D1:AD71 E5 - - - push hl 246 D1:AD72 21 10 27 00 ld hl, 10000 247 D1:AD76 CD 90 A9 D1 call mulAbyHL 248 D1:AD7A 09 - - - add hl, bc 249 D1:AD7B 44 - - - ld b, h 250 D1:AD7C 4D - - - ld c, l 251 D1:AD7D E1 - - - pop hl 252 D1:AD7E - - - - 253 D1:AD7E - - - - strtowExit: 254 D1:AD7E 21 00 00 00 ld hl, 0 255 D1:AD82 60 - - - ld h, b 256 D1:AD83 69 - - - ld l, c 257 D1:AD84 D1 - - - pop de 258 D1:AD85 C1 - - - pop bc 259 D1:AD86 C9 - - - ret 260 D1:AD87 - - - - 261 D1:AD87 - - - - ;;strxor 262 D1:AD87 - - - - ;;xor 2 strings together 263 D1:AD87 - - - - ;;Inputs: 264 D1:AD87 - - - - ;; HL: string 1 265 D1:AD87 - - - - ;; DE: string 2 266 D1:AD87 - - - - ;;Outputs: 267 D1:AD87 - - - - ;; HL: Xor String Pointer 268 D1:AD87 - - - - strxor: 269 D1:AD87 E5 - - - push hl 270 D1:AD88 D5 - - - push de 271 D1:AD89 EB - - - ex de, hl 272 D1:AD8A - - - - strxorLoop: 273 D1:AD8A 1A - - - ld a, (de) 274 D1:AD8B B7 - - - or a, a 275 D1:AD8C 28 0A - - jr z, strxorEnd 276 D1:AD8E AE - - - xor (hl) 277 D1:AD8F B7 - - - or a, a 278 D1:AD90 20 01 - - jr nz, strxorLoopLD 279 D1:AD92 7E - - - ld a, (hl) 280 D1:AD93 - - - - strxorLoopLD: 281 D1:AD93 12 - - - ld (de), a 282 D1:AD94 13 - - - inc de 283 D1:AD95 23 - - - inc hl 284 D1:AD96 18 F2 - - jr strxorLoop 285 D1:AD98 - - - - strxorEnd: 286 D1:AD98 D1 - - - pop de 287 D1:AD99 E1 - - - pop hl 288 D1:AD9A C9 - - - ret 289 D1:AD9B - - - - 290 D1:AD9B - - - - 291 D1:AD9B - - - - ;;toLower [Strings] 292 D1:AD9B - - - - ;;Converts every alpha character of a string to lowercase. 293 D1:AD9B - - - - ;;Inputs: 294 D1:AD9B - - - - ;; HL: Pointer to string 295 D1:AD9B - - - - ;;Notes: 296 D1:AD9B - - - - ;; This modifies the string in-place. 297 D1:AD9B - - - - ;toLower: 298 D1:AD9B - - - - ; push af \ push hl 299 D1:AD9B - - - - ; ld a, (hl) 300 D1:AD9B - - - - ; or a 301 D1:AD9B - - - - ; jr z, toLowerExit 302 D1:AD9B - - - - ; call isAlphaNum 303 D1:AD9B - - - - ; jr nc, toLowerNotUpperAlpha 304 D1:AD9B - - - - ; cp 'a' 305 D1:AD9B - - - - ; jr nc, toLowerNotUpperAlpha 306 D1:AD9B - - - - ; add a, 'a' - 'A' 307 D1:AD9B - - - - ; ld (hl), a 308 D1:AD9B - - - - ;toLowerNotUpperAlpha: 309 D1:AD9B - - - - ; inc hl 310 D1:AD9B - - - - ; jr toLower + 2 311 D1:AD9B - - - - ;toLowerExit: 312 D1:AD9B - - - - ; pop hl \ pop af 313 D1:AD9B - - - - ; ret 314 D1:AD9B - - - - 315 D1:AD9B - - - - ;;toUpper [Strings] 316 D1:AD9B - - - - ;;Converts every alpha character of a string to uppercase. 317 D1:AD9B - - - - ;;Inputs: 318 D1:AD9B - - - - ;; HL: Pointer to string 319 D1:AD9B - - - - ;;Notes: 320 D1:AD9B - - - - ;; This modifies the string in-place. 321 D1:AD9B - - - - ;toUpper: 322 D1:AD9B - - - - ; push af \ push hl 323 D1:AD9B - - - - ; ld a, (hl) 324 D1:AD9B - - - - ; or a 325 D1:AD9B - - - - ; jr z, toUpperExit 326 D1:AD9B - - - - ; call isAlphaNum 327 D1:AD9B - - - - ; jr nc, toUpperNotLowerAlpha 328 D1:AD9B - - - - ; cp 'a' 329 D1:AD9B - - - - ; jr c, toUpperNotLowerAlpha 330 D1:AD9B - - - - ; sub 'a' - 'A' 331 D1:AD9B - - - - ; ld (hl), a 332 D1:AD9B - - - - ;toUpperNotLowerAlpha: 333 D1:AD9B - - - - ; inc hl 334 D1:AD9B - - - - ; jr toUpper + 2 335 D1:AD9B - - - - ;toUpperExit: 336 D1:AD9B - - - - ; pop hl \ pop af 337 D1:AD9B - - - - ; ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/std.inc" 14 D1:AD9B - - - - 15 D1:AD9B - - - - #include "includes/lib/std/Input.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/std/Input.asm" 1 D1:AD9B - - - - ;;inputgetkey 2 D1:AD9B - - - - ;;Gets keycode 3 D1:AD9B - - - - ;;Outputs: 4 D1:AD9B - - - - ;; A: keycode 5 D1:AD9B - - - - ;;Destroys: 6 D1:AD9B - - - - ;; DE 7 D1:AD9B - - - - inputgetkey: 8 D1:AD9B EB - - - ex de, hl 9 D1:AD9C CD 4C 01 02 call _GetCSC 10 D1:ADA0 EB - - - ex de, hl 11 D1:ADA1 B7 - - - or a 12 D1:ADA2 28 F7 - - jr z, inputgetkey 13 D1:ADA4 C9 - - - ret 14 D1:ADA5 - - - - 15 D1:ADA5 - - - - ;;inputstr 16 D1:ADA5 - - - - ;;Inputs string of length [Buffer Size] and puts it in (Destination) 17 D1:ADA5 - - - - ;;Inputs: 18 D1:ADA5 - - - - ;; HL: Destination 19 D1:ADA5 - - - - ;; D[E]: Buffer Size 20 D1:ADA5 - - - - ;;Ouptuts: 21 D1:ADA5 - - - - ;; (HL): String 22 D1:ADA5 - - - - inputstr: 23 D1:ADA5 D5 - - - push de 24 D1:ADA6 E5 - - - push hl 25 D1:ADA7 ED 53 C5 AE D1 - - - ld (inputstrSizeBuf), de 26 D1:ADAC E5 - - - push hl 27 D1:ADAD D5 - - - push de 28 D1:ADAE 21 96 05 D0 ld hl, CurCol 29 D1:ADB2 11 C7 AE D1 ld de, inputstrCurColBuf 30 D1:ADB6 CD 46 AA D1 call bytecpy 31 D1:ADBA 21 95 05 D0 ld hl, CurRow 32 D1:ADBE 11 C8 AE D1 ld de, inputstrCurRowBuf 33 D1:ADC2 CD 46 AA D1 call bytecpy 34 D1:ADC6 D1 - - - pop de 35 D1:ADC7 E1 - - - pop hl 36 D1:ADC8 - - - - 37 D1:ADC8 FD CB 12 9E res Shift2nd, (IY + ShiftFlags) 38 D1:ADCC CD B0 08 02 call _CursorOn 39 D1:ADD0 - - - - 40 D1:ADD0 AF - - - xor a 41 D1:ADD1 47 - - - ld b, a 42 D1:ADD2 - - - - inputstrKeyInput: 43 D1:ADD2 CD 14 AB D1 call cursorcurunderreset 44 D1:ADD6 CD 9B AD D1 call inputgetkey 45 D1:ADDA - - - - 46 D1:ADDA FE 36 - - cp sk2nd 47 D1:ADDC CA 33 AE D1 jp z, inputstrKey2nd 48 D1:ADE0 FE 38 - - cp skDel 49 D1:ADE2 CA 41 AE D1 jp z, inputstrKeyDel 50 D1:ADE6 FE 0F - - cp skClear 51 D1:ADE8 CA 61 AE D1 jp z, inputstrKeyClear 52 D1:ADEC FE 09 - - cp skEnter 53 D1:ADEE CA B1 AE D1 jp z, inputstrKeyEnter 54 D1:ADF2 - - - - 55 D1:ADF2 4F - - - ld c, a 56 D1:ADF3 78 - - - ld a, b 57 D1:ADF4 D5 - - - push de 58 D1:ADF5 ED 5B C5 AE D1 - - - ld de, (inputstrSizeBuf) 59 D1:ADFA BB - - - cp e 60 D1:ADFB D1 - - - pop de 61 D1:ADFC 28 D4 - - jr z, inputstrKeyInput 62 D1:ADFE 79 - - - ld a, c 63 D1:ADFF - - - - 64 D1:ADFF D6 0A - - sub skAdd 65 D1:AE01 38 CF - - jr c, inputstrKeyInput 66 D1:AE03 FE 26 - - cp skMath - skAdd + 1 67 D1:AE05 30 CB - - jr nc, inputstrKeyInput 68 D1:AE07 - - - - 69 D1:AE07 FD CB 12 5E bit Shift2nd, (IY + ShiftFlags) ; TIOS BASED 70 D1:AE0B CC E4 AA D1 call z, chartoascii 71 D1:AE0F C4 04 AB D1 call nz, charnumsymtoascii 72 D1:AE13 - - - - 73 D1:AE13 FE FF - - cp $FF 74 D1:AE15 28 BB - - jr z, inputstrKeyInput 75 D1:AE17 - - - - 76 D1:AE17 FD CB 05 96 res textScrolled, (iy+textFlags) 77 D1:AE1B - - - - 78 D1:AE1B CD B8 07 02 call _PutC 79 D1:AE1F - - - - 80 D1:AE1F 77 - - - ld (hl), a 81 D1:AE20 23 - - - inc hl 82 D1:AE21 04 - - - inc b 83 D1:AE22 - - - - 84 D1:AE22 FD CB 05 56 bit textScrolled, (iy+textFlags) 85 D1:AE26 28 AA - - jr z, inputstrKeyInput 86 D1:AE28 E5 - - - push hl 87 D1:AE29 21 C8 AE D1 ld hl, inputstrCurRowBuf 88 D1:AE2D 7E - - - ld a, (hl) 89 D1:AE2E 3D - - - dec a 90 D1:AE2F 77 - - - ld (hl), a 91 D1:AE30 E1 - - - pop hl 92 D1:AE31 18 9F - - jr inputstrKeyInput 93 D1:AE33 - - - - inputstrKey2nd: 94 D1:AE33 E5 - - - push hl 95 D1:AE34 21 92 00 D0 ld hl, Flags + ShiftFlags 96 D1:AE38 7E - - - ld a, (hl) 97 D1:AE39 EE 08 - - xor 1 << Shift2nd ; Toggle state of Shift2nd flag 98 D1:AE3B 77 - - - ld (hl), a 99 D1:AE3C E1 - - - pop hl 100 D1:AE3D C3 D2 AD D1 jp inputstrKeyInput 101 D1:AE41 - - - - inputstrKeyDel: 102 D1:AE41 78 - - - ld a, b 103 D1:AE42 FE 00 - - cp 0 104 D1:AE44 CA D2 AD D1 jp z, inputstrKeyInput 105 D1:AE48 - - - - 106 D1:AE48 3E 20 - - ld a, ' ' 107 D1:AE4A CD B4 07 02 call _PutMap 108 D1:AE4E - - - - 109 D1:AE4E E5 - - - push hl 110 D1:AE4F 21 96 05 D0 ld hl, CurCol 111 D1:AE53 35 - - - dec (hl) 112 D1:AE54 E1 - - - pop hl 113 D1:AE55 - - - - 114 D1:AE55 3E 20 - - ld a, ' ' 115 D1:AE57 CD B4 07 02 call _PutMap 116 D1:AE5B - - - - 117 D1:AE5B 2B - - - dec hl 118 D1:AE5C 05 - - - dec b 119 D1:AE5D C3 D2 AD D1 jp inputstrKeyInput 120 D1:AE61 - - - - 121 D1:AE61 - - - - inputstrKeyClear: 122 D1:AE61 78 - - - ld a, b 123 D1:AE62 FE 00 - - cp 0 124 D1:AE64 CA D2 AD D1 jp z, inputstrKeyInput 125 D1:AE68 - - - - 126 D1:AE68 E5 - - - push hl 127 D1:AE69 D5 - - - push de 128 D1:AE6A 21 C7 AE D1 ld hl, inputstrCurColBuf 129 D1:AE6E 11 96 05 D0 ld de, CurCol 130 D1:AE72 CD 46 AA D1 call bytecpy 131 D1:AE76 21 C8 AE D1 ld hl, inputstrCurRowBuf 132 D1:AE7A 11 95 05 D0 ld de, CurRow 133 D1:AE7E CD 46 AA D1 call bytecpy 134 D1:AE82 D1 - - - pop de 135 D1:AE83 E1 - - - pop hl 136 D1:AE84 - - - - 137 D1:AE84 3E 20 - - ld a, ' ' 138 D1:AE86 04 - - - inc b 139 D1:AE87 - - - - inputstrKeyClearLoop: 140 D1:AE87 CD B8 07 02 call _PutC 141 D1:AE8B 10 FA - - djnz inputstrKeyClearLoop 142 D1:AE8D 06 00 - - ld b, 0 143 D1:AE8F - - - - 144 D1:AE8F D5 - - - push de 145 D1:AE90 E5 - - - push hl 146 D1:AE91 21 C7 AE D1 ld hl, inputstrCurColBuf 147 D1:AE95 11 96 05 D0 ld de, CurCol 148 D1:AE99 CD 46 AA D1 call bytecpy 149 D1:AE9D 21 C8 AE D1 ld hl, inputstrCurRowBuf 150 D1:AEA1 11 95 05 D0 ld de, CurRow 151 D1:AEA5 CD 46 AA D1 call bytecpy 152 D1:AEA9 E1 - - - pop hl 153 D1:AEAA D1 - - - pop de 154 D1:AEAB E1 - - - pop hl 155 D1:AEAC E5 - - - push hl 156 D1:AEAD C3 D2 AD D1 jp inputstrKeyInput 157 D1:AEB1 - - - - 158 D1:AEB1 - - - - inputstrKeyEnter: 159 D1:AEB1 36 00 - - ld (hl), 0 160 D1:AEB3 CD A8 08 02 call _CursorOff 161 D1:AEB7 3E 20 - - ld a, ' ' 162 D1:AEB9 CD B4 07 02 call _PutMap 163 D1:AEBD E1 - - - pop hl 164 D1:AEBE D1 - - - pop de 165 D1:AEBF FD CB 12 9E res Shift2nd, (IY + ShiftFlags) 166 D1:AEC3 C9 - - - ret 167 D1:AEC4 - - - - 168 D1:AEC4 00 - - - inputstrFlags: .db %00000000 169 D1:AEC5 - - - - ; 0: num Flag 170 D1:AEC5 00 00 - - inputstrSizeBuf: .dw $0000 171 D1:AEC7 00 - - - inputstrCurColBuf: .db $00 172 D1:AEC8 00 - - - inputstrCurRowBuf: .db $00 173 D1:AEC9 - - - - 174 D1:AEC9 - - - - ;;inputcharstr 175 D1:AEC9 - - - - ;;Inputs string of (only letters) of length [Buffer Size] and puts it in (Destination) 176 D1:AEC9 - - - - ;;Inputs: 177 D1:AEC9 - - - - ;; HL: Destination 178 D1:AEC9 - - - - ;; D[E]: Buffer Size 179 D1:AEC9 - - - - ;;Ouptuts: 180 D1:AEC9 - - - - ;; (HL): String 181 D1:AEC9 - - - - inputcharstr: 182 D1:AEC9 D5 - - - push de 183 D1:AECA E5 - - - push hl 184 D1:AECB ED 53 D9 AF D1 - - - ld (inputcharstrSizeBuf), de 185 D1:AED0 E5 - - - push hl 186 D1:AED1 D5 - - - push de 187 D1:AED2 21 96 05 D0 ld hl, CurCol 188 D1:AED6 11 DB AF D1 ld de, inputcharstrCurColBuf 189 D1:AEDA CD 46 AA D1 call bytecpy 190 D1:AEDE 21 95 05 D0 ld hl, CurRow 191 D1:AEE2 11 DC AF D1 ld de, inputcharstrCurRowBuf 192 D1:AEE6 CD 46 AA D1 call bytecpy 193 D1:AEEA D1 - - - pop de 194 D1:AEEB E1 - - - pop hl 195 D1:AEEC - - - - 196 D1:AEEC CD B0 08 02 call _CursorOn 197 D1:AEF0 - - - - 198 D1:AEF0 AF - - - xor a 199 D1:AEF1 47 - - - ld b, a 200 D1:AEF2 - - - - inputcharstrKeyInput: 201 D1:AEF2 CD 14 AB D1 call cursorcurunderreset 202 D1:AEF6 CD 9B AD D1 call inputgetkey 203 D1:AEFA - - - - 204 D1:AEFA FE 38 - - cp skDel 205 D1:AEFC CA 45 AF D1 jp z, inputcharstrKeyDel 206 D1:AF00 FE 0F - - cp skClear 207 D1:AF02 CA 65 AF D1 jp z, inputcharstrKeyClear 208 D1:AF06 FE 09 - - cp skEnter 209 D1:AF08 CA CA AF D1 jp z, inputcharstrKeyEnter 210 D1:AF0C - - - - 211 D1:AF0C 4F - - - ld c, a 212 D1:AF0D 78 - - - ld a, b 213 D1:AF0E D5 - - - push de 214 D1:AF0F ED 5B D9 AF D1 - - - ld de, (inputcharstrSizeBuf) 215 D1:AF14 BB - - - cp e 216 D1:AF15 D1 - - - pop de 217 D1:AF16 28 DA - - jr z, inputcharstrKeyInput 218 D1:AF18 79 - - - ld a, c 219 D1:AF19 - - - - 220 D1:AF19 D6 0A - - sub skAdd 221 D1:AF1B 38 D5 - - jr c, inputcharstrKeyInput 222 D1:AF1D FE 26 - - cp skMath - skAdd + 1 223 D1:AF1F 30 D1 - - jr nc, inputcharstrKeyInput 224 D1:AF21 - - - - 225 D1:AF21 CD E4 AA D1 call chartoascii 226 D1:AF25 - - - - 227 D1:AF25 FE FF - - cp $FF 228 D1:AF27 28 C9 - - jr z, inputcharstrKeyInput 229 D1:AF29 - - - - 230 D1:AF29 FD CB 05 96 res textScrolled, (iy+textFlags) 231 D1:AF2D - - - - 232 D1:AF2D CD B8 07 02 call _PutC 233 D1:AF31 - - - - 234 D1:AF31 77 - - - ld (hl), a 235 D1:AF32 23 - - - inc hl 236 D1:AF33 04 - - - inc b 237 D1:AF34 - - - - 238 D1:AF34 FD CB 05 56 bit textScrolled, (iy+textFlags) 239 D1:AF38 28 B8 - - jr z, inputcharstrKeyInput 240 D1:AF3A E5 - - - push hl 241 D1:AF3B 21 DC AF D1 ld hl, inputcharstrCurRowBuf 242 D1:AF3F 7E - - - ld a, (hl) 243 D1:AF40 3D - - - dec a 244 D1:AF41 77 - - - ld (hl), a 245 D1:AF42 E1 - - - pop hl 246 D1:AF43 18 AD - - jr inputcharstrKeyInput 247 D1:AF45 - - - - inputcharstrKeyDel: 248 D1:AF45 78 - - - ld a, b 249 D1:AF46 FE 00 - - cp 0 250 D1:AF48 CA F2 AE D1 jp z, inputcharstrKeyInput 251 D1:AF4C - - - - 252 D1:AF4C 3E 20 - - ld a, ' ' 253 D1:AF4E CD B4 07 02 call _PutMap 254 D1:AF52 - - - - 255 D1:AF52 E5 - - - push hl 256 D1:AF53 21 96 05 D0 ld hl, CurCol 257 D1:AF57 35 - - - dec (hl) 258 D1:AF58 E1 - - - pop hl 259 D1:AF59 - - - - 260 D1:AF59 3E 20 - - ld a, ' ' 261 D1:AF5B CD B4 07 02 call _PutMap 262 D1:AF5F - - - - 263 D1:AF5F 2B - - - dec hl 264 D1:AF60 05 - - - dec b 265 D1:AF61 C3 F2 AE D1 jp inputcharstrKeyInput 266 D1:AF65 - - - - 267 D1:AF65 - - - - inputcharstrKeyClear: 268 D1:AF65 78 - - - ld a, b 269 D1:AF66 FE 00 - - cp 0 270 D1:AF68 CA F2 AE D1 jp z, inputcharstrKeyInput 271 D1:AF6C - - - - 272 D1:AF6C E5 - - - push hl 273 D1:AF6D 21 95 05 D0 ld hl, CurRow 274 D1:AF71 4E - - - ld c, (hl) 275 D1:AF72 E1 - - - pop hl 276 D1:AF73 - - - - 277 D1:AF73 E5 - - - push hl 278 D1:AF74 D5 - - - push de 279 D1:AF75 21 DB AF D1 ld hl, inputcharstrCurColBuf 280 D1:AF79 11 96 05 D0 ld de, CurCol 281 D1:AF7D CD 46 AA D1 call bytecpy 282 D1:AF81 21 DC AF D1 ld hl, inputcharstrCurRowBuf 283 D1:AF85 11 95 05 D0 ld de, CurRow 284 D1:AF89 CD 46 AA D1 call bytecpy 285 D1:AF8D D1 - - - pop de 286 D1:AF8E E1 - - - pop hl 287 D1:AF8F - - - - 288 D1:AF8F 3E 20 - - ld a, ' ' 289 D1:AF91 04 - - - inc b 290 D1:AF92 - - - - inputcharstrKeyClearLoop: 291 D1:AF92 CD B8 07 02 call _PutC 292 D1:AF96 10 FA - - djnz inputcharstrKeyClearLoop 293 D1:AF98 - - - - 294 D1:AF98 E5 - - - push hl 295 D1:AF99 D5 - - - push de 296 D1:AF9A 21 DB AF D1 ld hl, inputcharstrCurColBuf 297 D1:AF9E 11 96 05 D0 ld de, CurCol 298 D1:AFA2 CD 46 AA D1 call bytecpy 299 D1:AFA6 D1 - - - pop de 300 D1:AFA7 E1 - - - pop hl 301 D1:AFA8 - - - - 302 D1:AFA8 D5 - - - push de 303 D1:AFA9 E5 - - - push hl 304 D1:AFAA 21 DB AF D1 ld hl, inputcharstrCurColBuf 305 D1:AFAE 11 96 05 D0 ld de, CurCol 306 D1:AFB2 CD 46 AA D1 call bytecpy 307 D1:AFB6 21 DC AF D1 ld hl, inputcharstrCurRowBuf 308 D1:AFBA 11 95 05 D0 ld de, CurRow 309 D1:AFBE CD 46 AA D1 call bytecpy 310 D1:AFC2 E1 - - - pop hl 311 D1:AFC3 D1 - - - pop de 312 D1:AFC4 E1 - - - pop hl 313 D1:AFC5 E5 - - - push hl 314 D1:AFC6 C3 F2 AE D1 jp inputcharstrKeyInput 315 D1:AFCA - - - - 316 D1:AFCA - - - - inputcharstrKeyEnter: 317 D1:AFCA 36 00 - - ld (hl), 0 318 D1:AFCC CD A8 08 02 call _CursorOff 319 D1:AFD0 3E 20 - - ld a, ' ' 320 D1:AFD2 CD B4 07 02 call _PutMap 321 D1:AFD6 E1 - - - pop hl 322 D1:AFD7 D1 - - - pop de 323 D1:AFD8 C9 - - - ret 324 D1:AFD9 - - - - 325 D1:AFD9 00 00 - - inputcharstrSizeBuf: .dw $0000 326 D1:AFDB 00 - - - inputcharstrCurColBuf: .db $00 327 D1:AFDC 00 - - - inputcharstrCurRowBuf: .db $00 328 D1:AFDD - - - - 329 D1:AFDD - - - - ;;inputnumstr 330 D1:AFDD - - - - ;;Inputs string of (only numbers) of length [Buffer Size] and puts it in (Destination) 331 D1:AFDD - - - - ;;Inputs: 332 D1:AFDD - - - - ;; HL: Destination 333 D1:AFDD - - - - ;; D[E]: Buffer Size 334 D1:AFDD - - - - ;;Ouptuts: 335 D1:AFDD - - - - ;; (HL): String 336 D1:AFDD - - - - inputnumstr: 337 D1:AFDD D5 - - - push de 338 D1:AFDE E5 - - - push hl 339 D1:AFDF ED 53 DD B0 D1 - - - ld (inputnumstrSizeBuf), de 340 D1:AFE4 E5 - - - push hl 341 D1:AFE5 D5 - - - push de 342 D1:AFE6 21 96 05 D0 ld hl, CurCol 343 D1:AFEA 11 DF B0 D1 ld de, inputnumstrCurColBuf 344 D1:AFEE CD 46 AA D1 call bytecpy 345 D1:AFF2 21 95 05 D0 ld hl, CurRow 346 D1:AFF6 11 E0 B0 D1 ld de, inputnumstrCurRowBuf 347 D1:AFFA CD 46 AA D1 call bytecpy 348 D1:AFFE D1 - - - pop de 349 D1:AFFF E1 - - - pop hl 350 D1:B000 - - - - 351 D1:B000 CD B0 08 02 call _CursorOn 352 D1:B004 - - - - 353 D1:B004 AF - - - xor a 354 D1:B005 47 - - - ld b, a 355 D1:B006 - - - - 356 D1:B006 - - - - inputnumstrKeyInput: 357 D1:B006 CD 14 AB D1 call cursorcurunderreset 358 D1:B00A CD 9B AD D1 call inputgetkey 359 D1:B00E - - - - 360 D1:B00E FE 38 - - cp skDel 361 D1:B010 CA 59 B0 D1 jp z, inputnumstrKeyDel 362 D1:B014 FE 0F - - cp skClear 363 D1:B016 CA 79 B0 D1 jp z, inputnumstrKeyClear 364 D1:B01A FE 09 - - cp skEnter 365 D1:B01C CA CE B0 D1 jp z, inputnumstrKeyEnter 366 D1:B020 - - - - 367 D1:B020 4F - - - ld c, a 368 D1:B021 78 - - - ld a, b 369 D1:B022 D5 - - - push de 370 D1:B023 ED 5B DD B0 D1 - - - ld de, (inputnumstrSizeBuf) 371 D1:B028 BB - - - cp e 372 D1:B029 D1 - - - pop de 373 D1:B02A 28 DA - - jr z, inputnumstrKeyInput 374 D1:B02C 79 - - - ld a, c 375 D1:B02D - - - - 376 D1:B02D D6 0A - - sub skAdd 377 D1:B02F 38 D5 - - jr c, inputnumstrKeyInput 378 D1:B031 FE 26 - - cp skMath - skAdd + 1 379 D1:B033 30 D1 - - jr nc, inputnumstrKeyInput 380 D1:B035 - - - - 381 D1:B035 CD F4 AA D1 call charnumtoascii 382 D1:B039 FE FF - - cp $FF 383 D1:B03B 28 C9 - - jr z, inputnumstrKeyInput 384 D1:B03D - - - - 385 D1:B03D FD CB 05 96 res textScrolled, (iy+textFlags) 386 D1:B041 - - - - 387 D1:B041 CD B8 07 02 call _PutC 388 D1:B045 - - - - 389 D1:B045 77 - - - ld (hl), a 390 D1:B046 23 - - - inc hl 391 D1:B047 04 - - - inc b 392 D1:B048 - - - - 393 D1:B048 FD CB 05 56 bit textScrolled, (iy+textFlags) 394 D1:B04C 28 B8 - - jr z, inputnumstrKeyInput 395 D1:B04E E5 - - - push hl 396 D1:B04F 21 E0 B0 D1 ld hl, inputnumstrCurRowBuf 397 D1:B053 7E - - - ld a, (hl) 398 D1:B054 3D - - - dec a 399 D1:B055 77 - - - ld (hl), a 400 D1:B056 E1 - - - pop hl 401 D1:B057 18 AD - - jr inputnumstrKeyInput 402 D1:B059 - - - - inputnumstrkeydel: 403 D1:B059 78 - - - ld a, b 404 D1:B05A FE 00 - - cp 0 405 D1:B05C CA 06 B0 D1 jp z, inputnumstrKeyInput 406 D1:B060 - - - - 407 D1:B060 3E 20 - - ld a, ' ' 408 D1:B062 CD B4 07 02 call _PutMap 409 D1:B066 - - - - 410 D1:B066 E5 - - - push hl 411 D1:B067 21 96 05 D0 ld hl, CurCol 412 D1:B06B 35 - - - dec (hl) 413 D1:B06C E1 - - - pop hl 414 D1:B06D - - - - 415 D1:B06D 3E 20 - - ld a, ' ' 416 D1:B06F CD B4 07 02 call _PutMap 417 D1:B073 - - - - 418 D1:B073 2B - - - dec hl 419 D1:B074 05 - - - dec b 420 D1:B075 C3 06 B0 D1 jp inputnumstrKeyInput 421 D1:B079 - - - - 422 D1:B079 - - - - inputnumstrKeyClear: 423 D1:B079 78 - - - ld a, b 424 D1:B07A FE 00 - - cp 0 425 D1:B07C CA 06 B0 D1 jp z, inputnumstrKeyInput 426 D1:B080 - - - - 427 D1:B080 E5 - - - push hl 428 D1:B081 21 95 05 D0 ld hl, CurRow 429 D1:B085 4E - - - ld c, (hl) 430 D1:B086 E1 - - - pop hl 431 D1:B087 - - - - 432 D1:B087 E5 - - - push hl 433 D1:B088 D5 - - - push de 434 D1:B089 21 DF B0 D1 ld hl, inputnumstrCurColBuf 435 D1:B08D 11 96 05 D0 ld de, CurCol 436 D1:B091 CD 46 AA D1 call bytecpy 437 D1:B095 21 E0 B0 D1 ld hl, inputnumstrCurRowBuf 438 D1:B099 11 95 05 D0 ld de, CurRow 439 D1:B09D CD 46 AA D1 call bytecpy 440 D1:B0A1 D1 - - - pop de 441 D1:B0A2 E1 - - - pop hl 442 D1:B0A3 - - - - 443 D1:B0A3 3E 20 - - ld a, ' ' 444 D1:B0A5 04 - - - inc b 445 D1:B0A6 - - - - inputnumstrKeyClearLoop: 446 D1:B0A6 CD B8 07 02 call _PutC 447 D1:B0AA 10 FA - - djnz inputnumstrKeyClearLoop 448 D1:B0AC - - - - 449 D1:B0AC D5 - - - push de 450 D1:B0AD E5 - - - push hl 451 D1:B0AE 21 DF B0 D1 ld hl, inputnumstrCurColBuf 452 D1:B0B2 11 96 05 D0 ld de, CurCol 453 D1:B0B6 CD 46 AA D1 call bytecpy 454 D1:B0BA 21 E0 B0 D1 ld hl, inputnumstrCurRowBuf 455 D1:B0BE 11 95 05 D0 ld de, CurRow 456 D1:B0C2 CD 46 AA D1 call bytecpy 457 D1:B0C6 E1 - - - pop hl 458 D1:B0C7 D1 - - - pop de 459 D1:B0C8 E1 - - - pop hl 460 D1:B0C9 E5 - - - push hl 461 D1:B0CA C3 06 B0 D1 jp inputnumstrKeyInput 462 D1:B0CE - - - - 463 D1:B0CE - - - - inputnumstrKeyEnter: 464 D1:B0CE 36 00 - - ld (hl), 0 465 D1:B0D0 CD A8 08 02 call _CursorOff 466 D1:B0D4 3E 20 - - ld a, ' ' 467 D1:B0D6 CD B4 07 02 call _PutMap 468 D1:B0DA E1 - - - pop hl 469 D1:B0DB D1 - - - pop de 470 D1:B0DC C9 - - - ret 471 D1:B0DD - - - - 472 D1:B0DD 00 00 - - inputnumstrSizeBuf: .dw $0000 473 D1:B0DF 00 - - - inputnumstrCurColBuf: .db $00 474 D1:B0E0 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:B0E1 - - - - #include "includes/lib/fsh/fsh.inc" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/fsh/fsh.inc" 1 D1:B0E1 - - - - #include "includes/lib/fsh/Command.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/fsh/Command.asm" 1 D1:B0E1 - - - - ;;commandfill 2 D1:B0E1 - - - - ;;Fills command mem with byte a 3 D1:B0E1 - - - - ;;Inputs: 4 D1:B0E1 - - - - ;; A: byte 5 D1:B0E1 - - - - commandfill: 6 D1:B0E1 E5 - - - push hl 7 D1:B0E2 C5 - - - push bc 8 D1:B0E3 D5 - - - push de 9 D1:B0E4 06 00 - - ld b, 0 10 D1:B0E6 11 00 00 00 ld de, 0 11 D1:B0EA 4F - - - ld c, a 12 D1:B0EB 21 9F EA D0 ld hl, FshCmd 13 D1:B0EF - - - - commandfillLoop: 14 D1:B0EF 71 - - - ld (hl), c 15 D1:B0F0 23 - - - inc hl 16 D1:B0F1 04 - - - inc b 17 D1:B0F2 13 - - - inc de 18 D1:B0F3 78 - - - ld a, b 19 D1:B0F4 FE 40 - - cp FshCmdSize 20 D1:B0F6 38 F7 - - jr c, commandfillLoop 21 D1:B0F8 D1 - - - pop de 22 D1:B0F9 C1 - - - pop bc 23 D1:B0FA E1 - - - pop hl 24 D1:B0FB C9 - - - ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/fsh/fsh.inc" 2 D1:B0FC - - - - #include "includes/lib/fsh/Parse.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/fsh/Parse.asm" 1 D1:B0FC - - - - ;;fshparsecommand 2 D1:B0FC - - - - ;;Inputs: 3 D1:B0FC - - - - ;; HL: FshCmd 4 D1:B0FC - - - - ;;b = buf row 5 D1:B0FC - - - - ;;c = char in row 6 D1:B0FC - - - - ;de = scratch 7 D1:B0FC - - - - fshparsecommand: 8 D1:B0FC E5 - - - push hl 9 D1:B0FD C5 - - - push bc 10 D1:B0FE D5 - - - push de 11 D1:B0FF E5 - - - push hl 12 D1:B100 E5 - - - push hl 13 D1:B101 21 13 B2 D1 ld hl, fshparsecommandCmd 14 D1:B105 06 2D - - ld b, 45 15 D1:B107 3E 00 - - ld a, $00 16 D1:B109 CD 67 AA D1 call memset 17 D1:B10D E1 - - - pop hl 18 D1:B10E - - - - 19 D1:B10E 01 00 00 00 ld bc, 0 20 D1:B112 11 00 00 00 ld de, 0 21 D1:B116 - - - - fshparsecommandLoop: 22 D1:B116 7E - - - ld a, (hl) 23 D1:B117 - - - - fshparsecommandCheckSpace: 24 D1:B117 FE 20 - - cp ' ' ;end of word 25 D1:B119 20 0C - - jr nz, fshparsecommandCheckEnd 26 D1:B11B 3E 00 - - ld a, $00 27 D1:B11D CD 46 B2 D1 call fshparsecommandCopyChar 28 D1:B121 0E 00 - - ld c, 0 29 D1:B123 04 - - - inc b 30 D1:B124 23 - - - inc hl 31 D1:B125 18 EF - - jr fshparsecommandLoop 32 D1:B127 - - - - 33 D1:B127 - - - - fshparsecommandCheckEnd: 34 D1:B127 FE 00 - - cp $00 ;end of string 35 D1:B129 28 13 - - jr z, fshparsecommandCheckArgStatus 36 D1:B12B - - - - 37 D1:B12B - - - - fshparsecommandLoopEnd: 38 D1:B12B CD 46 B2 D1 call fshparsecommandCopyChar 39 D1:B12F 23 - - - inc hl 40 D1:B130 0C - - - inc c 41 D1:B131 - - - - 42 D1:B131 79 - - - ld a, c 43 D1:B132 FE 08 - - cp FshCmdCmdSize 44 D1:B134 20 E0 - - jr nz, fshparsecommandLoop 45 D1:B136 - - - - ;inc hl 46 D1:B136 0E 00 - - ld c, 0 47 D1:B138 04 - - - inc b 48 D1:B139 78 - - - ld a, b 49 D1:B13A FE 05 - - cp 5 50 D1:B13C 20 D8 - - jr nz, fshparsecommandLoop 51 D1:B13E - - - - ; ld bc, 0 52 D1:B13E - - - - 53 D1:B13E - - - - fshparsecommandCheckArgStatus: 54 D1:B13E AF - - - xor a 55 D1:B13F 21 CD EA D0 ld hl, FshCmdArgFlags 56 D1:B143 77 - - - ld (hl), a 57 D1:B144 - - - - fshparsecommandCheckArg0: 58 D1:B144 21 1C B2 D1 ld hl, fshparsecommandArg0 59 D1:B148 7E - - - ld a, (hl) 60 D1:B149 FE 00 - - cp $00 61 D1:B14B 28 27 - - jr z, fshparsecommandCheckArg1 62 D1:B14D 21 CD EA D0 ld hl, FshCmdArgFlags 63 D1:B151 CB C6 - - set 0, (hl) 64 D1:B153 7E - - - ld a, (hl) 65 D1:B154 21 1C B2 D1 ld hl, fshparsecommandArg0 66 D1:B158 7E - - - ld a, (hl) 67 D1:B159 D6 30 - - sub '0' 68 D1:B15B FE 0A - - cp '9' - '0' + 1 69 D1:B15D 30 15 - - jr nc, fshparsecommandCheckArg1 70 D1:B15F CD DF AC D1 call strtow 71 D1:B163 11 1C B2 D1 ld de, fshparsecommandArg0 72 D1:B167 EB - - - ex de, hl 73 D1:B168 73 - - - ld (hl), e 74 D1:B169 23 - - - inc hl 75 D1:B16A 72 - - - ld (hl), d 76 D1:B16B 34 - - - inc (hl) 77 D1:B16C 36 00 - - ld (hl), $00 78 D1:B16E 21 CD EA D0 ld hl, FshCmdArgFlags 79 D1:B172 CB CE - - set 1, (hl) 80 D1:B174 - - - - fshparsecommandCheckArg1: 81 D1:B174 21 25 B2 D1 ld hl, fshparsecommandArg1 82 D1:B178 7E - - - ld a, (hl) 83 D1:B179 FE 00 - - cp $00 84 D1:B17B 28 26 - - jr z, fshparsecommandCheckArg2 85 D1:B17D 21 CD EA D0 ld hl, FshCmdArgFlags 86 D1:B181 CB D6 - - set 2, (hl) 87 D1:B183 21 25 B2 D1 ld hl, fshparsecommandArg1 88 D1:B187 7E - - - ld a, (hl) 89 D1:B188 D6 30 - - sub '0' 90 D1:B18A FE 0A - - cp '9' - '0' + 1 91 D1:B18C 30 15 - - jr nc, fshparsecommandCheckArg2 92 D1:B18E CD DF AC D1 call strtow 93 D1:B192 11 25 B2 D1 ld de, fshparsecommandArg1 94 D1:B196 EB - - - ex de, hl 95 D1:B197 73 - - - ld (hl), e 96 D1:B198 23 - - - inc hl 97 D1:B199 72 - - - ld (hl), d 98 D1:B19A 23 - - - inc hl 99 D1:B19B 36 00 - - ld (hl), $00 100 D1:B19D 21 CD EA D0 ld hl, FshCmdArgFlags 101 D1:B1A1 CB DE - - set 3, (hl) 102 D1:B1A3 - - - - fshparsecommandCheckArg2: 103 D1:B1A3 21 2E B2 D1 ld hl, fshparsecommandArg2 104 D1:B1A7 7E - - - ld a, (hl) 105 D1:B1A8 FE 00 - - cp $00 106 D1:B1AA 28 26 - - jr z, fshparsecommandCheckArg3 107 D1:B1AC 21 CD EA D0 ld hl, FshCmdArgFlags 108 D1:B1B0 CB E6 - - set 4, (hl) 109 D1:B1B2 21 2E B2 D1 ld hl, fshparsecommandArg2 110 D1:B1B6 7E - - - ld a, (hl) 111 D1:B1B7 D6 30 - - sub '0' 112 D1:B1B9 FE 0A - - cp '9' - '0' + 1 113 D1:B1BB 30 15 - - jr nc, fshparsecommandCheckArg3 114 D1:B1BD CD DF AC D1 call strtow 115 D1:B1C1 11 2E B2 D1 ld de, fshparsecommandArg2 116 D1:B1C5 EB - - - ex de, hl 117 D1:B1C6 73 - - - ld (hl), e 118 D1:B1C7 23 - - - inc hl 119 D1:B1C8 72 - - - ld (hl), d 120 D1:B1C9 23 - - - inc hl 121 D1:B1CA 36 00 - - ld (hl), $00 122 D1:B1CC 21 CD EA D0 ld hl, FshCmdArgFlags 123 D1:B1D0 CB EE - - set 5, (hl) 124 D1:B1D2 - - - - fshparsecommandCheckArg3: 125 D1:B1D2 21 37 B2 D1 ld hl, fshparsecommandArg3 126 D1:B1D6 7E - - - ld a, (hl) 127 D1:B1D7 FE 00 - - cp $00 128 D1:B1D9 28 26 - - jr z, fshparsecommandCopyBack 129 D1:B1DB 21 CD EA D0 ld hl, FshCmdArgFlags 130 D1:B1DF CB F6 - - set 6, (hl) 131 D1:B1E1 21 37 B2 D1 ld hl, fshparsecommandArg3 132 D1:B1E5 7E - - - ld a, (hl) 133 D1:B1E6 D6 30 - - sub '0' 134 D1:B1E8 FE 0A - - cp '9' - '0' + 1 135 D1:B1EA 30 15 - - jr nc, fshparsecommandCopyBack 136 D1:B1EC CD DF AC D1 call strtow 137 D1:B1F0 11 37 B2 D1 ld de, fshparsecommandArg3 138 D1:B1F4 EB - - - ex de, hl 139 D1:B1F5 73 - - - ld (hl), e 140 D1:B1F6 23 - - - inc hl 141 D1:B1F7 72 - - - ld (hl), d 142 D1:B1F8 23 - - - inc hl 143 D1:B1F9 36 00 - - ld (hl), $00 144 D1:B1FB 21 CD EA D0 ld hl, FshCmdArgFlags 145 D1:B1FF CB FE - - set 7, (hl) 146 D1:B201 - - - - fshparsecommandCopyBack: 147 D1:B201 E1 - - - pop hl 148 D1:B202 C5 - - - push bc 149 D1:B203 EB - - - ex de, hl 150 D1:B204 21 13 B2 D1 ld hl, fshparsecommandCmd 151 D1:B208 01 2D 00 00 ld bc, 45 152 D1:B20C ED B0 - - ldir 153 D1:B20E C1 - - - pop bc 154 D1:B20F - - - - 155 D1:B20F D1 - - - pop de 156 D1:B210 C1 - - - pop bc 157 D1:B211 E1 - - - pop hl 158 D1:B212 C9 - - - ret 159 D1:B213 - - - - 160 D1:B213 00 00 00 00 00 00 00 00 00 - - - fshparsecommandCmd: .db $00, $00, $00, $00, $00, $00, $00, $00, $00 161 D1:B21C 00 00 00 00 00 00 00 00 00 - - - fshparsecommandArg0: .db $00, $00, $00, $00, $00, $00, $00, $00, $00 162 D1:B225 00 00 00 00 00 00 00 00 00 - - - fshparsecommandArg1: .db $00, $00, $00, $00, $00, $00, $00, $00, $00 163 D1:B22E 00 00 00 00 00 00 00 00 00 - - - fshparsecommandArg2: .db $00, $00, $00, $00, $00, $00, $00, $00, $00 164 D1:B237 00 00 00 00 00 00 00 00 00 - - - fshparsecommandArg3: .db $00, $00, $00, $00, $00, $00, $00, $00, $00 165 D1:B240 00 00 00 00 00 00 - - fshparsecommandOverB: .db $00, $00, $00, $00, $00, $00 166 D1:B246 - - - - 167 D1:B246 - - - - fshparsecommandCopyChar: 168 D1:B246 - - - - ;Copy 169 D1:B246 E5 - - - push hl 170 D1:B247 C5 - - - push bc 171 D1:B248 21 00 00 00 ld hl, 0 172 D1:B24C 60 - - - ld h, b 173 D1:B24D 2E 09 - - ld l, 9 174 D1:B24F 41 - - - ld b, c 175 D1:B250 11 13 B2 D1 ld de, fshparsecommandCmd 176 D1:B254 CD B1 AB D1 call array2d 177 D1:B258 C1 - - - pop bc 178 D1:B259 E1 - - - pop hl 179 D1:B25A - - - - ;push hl 180 D1:B25A - - - - ; ld hl, fshparsecommandCmd+45+1 181 D1:B25A - - - - ; call cpHLDE 182 D1:B25A - - - - ;pop hl 183 D1:B25A - - - - ;pop de 184 D1:B25A - - - - ;ret c 185 D1:B25A - - - - ;push de 186 D1:B25A 12 - - - ld (de), a ;ld buffer 187 D1:B25B C9 - - - ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/fsh/fsh.inc" 3 D1:B25C - - - - #include "includes/lib/fsh/FshVar.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/fsh/FshVar.asm" 1 D1:B25C - - - - ;;fshvarset 2 D1:B25C - - - - ;;Sets a Word in FshVars. 3 D1:B25C - - - - ;;Inputs: 4 D1:B25C - - - - ;; HL: 16b 5 D1:B25C - - - - ;; DE: Destination Word Relitive to FshVars 6 D1:B25C - - - - fshvarset: 7 D1:B25C C5 - - - push bc 8 D1:B25D 01 3F 00 00 ld bc, FshVarsSize / 2 - 1 9 D1:B261 CD 80 A9 D1 call cpBCDE 10 D1:B265 C1 - - - pop bc 11 D1:B266 38 11 - - jr c, fshvarsetOOBException 12 D1:B268 C5 - - - push bc 13 D1:B269 D5 - - - push de 14 D1:B26A E5 - - - push hl 15 D1:B26B 01 1F EA D0 ld bc, FshVars 16 D1:B26F EB - - - ex de, hl 17 D1:B270 29 - - - add hl, hl 18 D1:B271 09 - - - add hl, bc 19 D1:B272 73 - - - ld (hl), e 20 D1:B273 23 - - - inc hl 21 D1:B274 72 - - - ld (hl), d 22 D1:B275 E1 - - - pop hl 23 D1:B276 D1 - - - pop de 24 D1:B277 C1 - - - pop bc 25 D1:B278 C9 - - - ret 26 D1:B279 - - - - fshvarsetOOBException: 27 D1:B279 E5 - - - push hl 28 D1:B27A 21 9E B3 D1 ld hl, ErrOutOfBoundso 29 D1:B27E CD 59 B3 D1 call ErrSet 30 D1:B282 E1 - - - pop hl 31 D1:B283 C9 - - - ret 32 D1:B284 - - - - 33 D1:B284 - - - - ;;fshvarget 34 D1:B284 - - - - ;;Gets a Word in FshVars. 35 D1:B284 - - - - ;;Inputs: 36 D1:B284 - - - - ;; DE: Destination Word Relitive to FshVars 37 D1:B284 - - - - ;;Outputs: 38 D1:B284 - - - - ;; HL: Word in (DE) 39 D1:B284 - - - - fshvarget: 40 D1:B284 C5 - - - push bc 41 D1:B285 01 3F 00 00 ld bc, FshVarsSize / 2 - 1 42 D1:B289 CD 80 A9 D1 call cpBCDE 43 D1:B28D C1 - - - pop bc 44 D1:B28E 38 14 - - jr c, fshvargetOOBException 45 D1:B290 C5 - - - push bc 46 D1:B291 D5 - - - push de 47 D1:B292 21 00 00 00 ld hl, 0 48 D1:B296 01 1F EA D0 ld bc, FshVars 49 D1:B29A EB - - - ex de, hl 50 D1:B29B 29 - - - add hl, hl 51 D1:B29C 09 - - - add hl, bc 52 D1:B29D 5E - - - ld e, (hl) 53 D1:B29E 23 - - - inc hl 54 D1:B29F 56 - - - ld d, (hl) 55 D1:B2A0 EB - - - ex de, hl 56 D1:B2A1 D1 - - - pop de 57 D1:B2A2 C1 - - - pop bc 58 D1:B2A3 C9 - - - ret 59 D1:B2A4 - - - - fshvargetOOBException: 60 D1:B2A4 E5 - - - push hl 61 D1:B2A5 21 9E B3 D1 ld hl, ErrOutOfBoundso 62 D1:B2A9 CD 59 B3 D1 call ErrSet 63 D1:B2AD E1 - - - pop hl 64 D1:B2AE C9 - - - ret 65 D1:B2AF - - - - ;;fshvarcpy 66 D1:B2AF - - - - ;;Copies a word. 67 D1:B2AF - - - - ;;Inputs: 68 D1:B2AF - - - - ;; HL: Byte pointer 69 D1:B2AF - - - - ;; DE: Destination 70 D1:B2AF - - - - fshvarcpy: 71 D1:B2AF C5 - - - push bc 72 D1:B2B0 01 3F 00 00 ld bc, FshVarsSize / 2 - 1 73 D1:B2B4 CD 80 A9 D1 call cpBCDE 74 D1:B2B8 C1 - - - pop bc 75 D1:B2B9 38 2A - - jr c, fshvarcpyOOBException 76 D1:B2BB C5 - - - push bc 77 D1:B2BC 01 40 00 00 ld bc, FshVarsSize / 2 78 D1:B2C0 CD 7B A9 D1 call cpHLBC 79 D1:B2C4 C1 - - - pop bc 80 D1:B2C5 30 1E - - jr nc, fshvarcpyOOBException 81 D1:B2C7 D5 - - - push de 82 D1:B2C8 E5 - - - push hl 83 D1:B2C9 01 40 00 00 ld bc, FshVarsSize / 2 84 D1:B2CD CD 80 A9 D1 call cpBCDE 85 D1:B2D1 38 12 - - jr c, fshvarcpyOOBException 86 D1:B2D3 01 1F EA D0 ld bc, FshVars 87 D1:B2D7 29 - - - add hl, hl 88 D1:B2D8 09 - - - add hl, bc 89 D1:B2D9 EB - - - ex de, hl 90 D1:B2DA 29 - - - add hl, hl 91 D1:B2DB 09 - - - add hl, bc 92 D1:B2DC 1A - - - ld a, (de) 93 D1:B2DD 77 - - - ld (hl), a 94 D1:B2DE 13 - - - inc de 95 D1:B2DF 23 - - - inc hl 96 D1:B2E0 1A - - - ld a, (de) 97 D1:B2E1 77 - - - ld (hl), a 98 D1:B2E2 E1 - - - pop hl 99 D1:B2E3 D1 - - - pop de 100 D1:B2E4 C9 - - - ret 101 D1:B2E5 - - - - 102 D1:B2E5 - - - - fshvarcpyOOBException: 103 D1:B2E5 E5 - - - push hl 104 D1:B2E6 21 9E B3 D1 ld hl, ErrOutOfBoundso 105 D1:B2EA CD 59 B3 D1 call ErrSet 106 D1:B2EE E1 - - - pop hl 107 D1:B2EF C9 - - - ret 108 D1:B2F0 - - - - 109 D1:B2F0 - - - - ;;fshvarreset 110 D1:B2F0 - - - - ;;Fills fshvars with $00 111 D1:B2F0 - - - - fshvarreset: 112 D1:B2F0 E5 - - - push hl 113 D1:B2F1 C5 - - - push bc 114 D1:B2F2 D5 - - - push de 115 D1:B2F3 06 00 - - ld b, 0 116 D1:B2F5 11 00 00 00 ld de, 0 117 D1:B2F9 21 00 00 00 ld hl, 0 118 D1:B2FD - - - - fshvarfillLoop: 119 D1:B2FD CD 5C B2 D1 call fshvarset 120 D1:B301 04 - - - inc b 121 D1:B302 13 - - - inc de 122 D1:B303 78 - - - ld a, b 123 D1:B304 FE 40 - - cp FshVarsSize / 2 124 D1:B306 38 F5 - - jr c, fshvarfillLoop 125 D1:B308 D1 - - - pop de 126 D1:B309 C1 - - - pop bc 127 D1:B30A E1 - - - pop hl 128 D1:B30B C9 - - - ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/fsh/fsh.inc" 4 D1:B30C - - - - #include "includes/lib/fsh/Err.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/fsh/Err.asm" 1 D1:B30C - - - - ;;ErrCatch 2 D1:B30C - - - - ;;Checks err bit and jp to err route 3 D1:B30C - - - - ErrCatch: 4 D1:B30C C1 - - - pop bc 5 D1:B30D E5 - - - push hl 6 D1:B30E 21 75 A9 D1 ld hl, FshFlags 7 D1:B312 CB 4E - - bit 1, (hl) 8 D1:B314 E1 - - - pop hl 9 D1:B315 C2 1B B3 D1 jp nz, ErrRoute 10 D1:B319 C5 - - - push bc 11 D1:B31A C9 - - - ret 12 D1:B31B - - - - 13 D1:B31B - - - - ;;ErrRoute 14 D1:B31B - - - - ;;Routes err codes. 15 D1:B31B - - - - ErrRoute: 16 D1:B31B - - - - 17 D1:B31B 21 75 A9 D1 ld hl, FshFlags 18 D1:B31F CB 8E - - res 1, (hl) 19 D1:B321 - - - - 20 D1:B321 21 CE EA D0 ld hl, FshCmdErrCode 21 D1:B325 - - - - 22 D1:B325 11 68 B3 D1 ld de, ErrCmdNotFoundo 23 D1:B329 CD 3E AA D1 call bytecmp 24 D1:B32D CA 69 B3 D1 jp z, ErrCmdNotFoundf 25 D1:B331 - - - - 26 D1:B331 11 9E B3 D1 ld de, ErrOutOfBoundso 27 D1:B335 CD 3E AA D1 call bytecmp 28 D1:B339 CA 9F B3 D1 jp z, ErrOutOfBoundsf 29 D1:B33D - - - - 30 D1:B33D 11 C4 B3 D1 ld de, ErrArgso 31 D1:B341 CD 3E AA D1 call bytecmp 32 D1:B345 CA C5 B3 D1 jp z, ErrArgsf 33 D1:B349 - - - - 34 D1:B349 11 EE B3 D1 ld de, ErrUsageo 35 D1:B34D CD 3E AA D1 call bytecmp 36 D1:B351 CA EF B3 D1 jp z, ErrUsagef 37 D1:B355 - - - - 38 D1:B355 C3 1A B4 D1 jp ErrDefault 39 D1:B359 - - - - 40 D1:B359 - - - - 41 D1:B359 - - - - ;;ErrSet 42 D1:B359 - - - - ;;Sets all things relating to Err codes 43 D1:B359 - - - - ;;Inputs: 44 D1:B359 - - - - ;; HL: Err_____o 45 D1:B359 - - - - ErrSet: 46 D1:B359 E5 - - - push hl 47 D1:B35A 7E - - - ld a, (hl) 48 D1:B35B 21 CE EA D0 ld hl, FshCmdErrCode 49 D1:B35F 77 - - - ld (hl), a 50 D1:B360 21 75 A9 D1 ld hl, FshFlags 51 D1:B364 CB CE - - set 1, (hl) 52 D1:B366 E1 - - - pop hl 53 D1:B367 C9 - - - ret 54 D1:B368 - - - - 55 D1:B368 - - - - ;;ERR FUNCS------------------- 56 D1:B368 - - - - 57 D1:B368 01 - - - ErrCmdNotFoundo: .db $01 58 D1:B369 - - - - ErrCmdNotFoundf: 59 D1:B369 21 9F EA D0 ld hl, FshCmd 60 D1:B36D 7E - - - ld a, (hl) 61 D1:B36E FE 00 - - cp $00 62 D1:B370 CA DB A8 D1 jp z, Fin 63 D1:B374 21 8C B3 D1 ld hl, ErrCmdNotFoundt 64 D1:B378 CD C0 07 02 call _PutS 65 D1:B37C 21 9F EA D0 ld hl, FshCmd 66 D1:B380 CD C0 07 02 call _PutS 67 D1:B384 CD F0 07 02 call _NewLine 68 D1:B388 C3 DB A8 D1 jp Fin 69 D1:B38C 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:B39E - - - - 71 D1:B39E 02 - - - ErrOutOfBoundso: .db $02 72 D1:B39F - - - - ErrOutOfBoundsf: 73 D1:B39F 21 AF B3 D1 ld hl, ErrOutOfBoundst 74 D1:B3A3 CD C0 07 02 call _PutS 75 D1:B3A7 CD F0 07 02 call _NewLine 76 D1:B3AB C3 DB A8 D1 jp Fin 77 D1:B3AF 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:B3C4 - - - - 79 D1:B3C4 03 - - - ErrArgso: .db $03 80 D1:B3C5 - - - - ErrArgsf: 81 D1:B3C5 21 D5 B3 D1 ld hl, ErrArgst 82 D1:B3C9 CD C0 07 02 call _PutS 83 D1:B3CD CD F0 07 02 call _NewLine 84 D1:B3D1 C3 DB A8 D1 jp Fin 85 D1:B3D5 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:B3EE - - - - 87 D1:B3EE 04 - - - ErrUsageo: .db $04 88 D1:B3EF - - - - ErrUsagef: 89 D1:B3EF 21 0B B4 D1 ld hl, ErrUsaget 90 D1:B3F3 CD C0 07 02 call _PutS 91 D1:B3F7 21 9F EA D0 ld hl, FshCmd 92 D1:B3FB CD 5E B6 D1 call manrouteu 93 D1:B3FF CD C0 07 02 call _PutS 94 D1:B403 CD F0 07 02 call _NewLine 95 D1:B407 C3 DB A8 D1 jp Fin 96 D1:B40B 65 72 72 6F 72 3A 20 55 73 61 67 65 3A 20 00 - ErrUsaget: .db "error: Usage: ", 0 97 D1:B41A - - - - 98 D1:B41A - - - - ErrDefault: 99 D1:B41A 21 26 B4 D1 ld hl, ErrDefaultt 100 D1:B41E CD C0 07 02 call _PutS 101 D1:B422 C3 FB A8 D1 jp Exit 102 D1:B426 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:B43B - - - - #include "includes/lib/fsh/Print.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/fsh/Print.asm" 1 D1:B43B - - - - ;;printfshnamelong 2 D1:B43B - - - - ;;prints Name + Varsv + Version to screen 3 D1:B43B - - - - printfshnamelong: 4 D1:B43B E5 - - - push hl 5 D1:B43C 21 05 A9 D1 ld hl, FshName 6 D1:B440 CD C0 07 02 call _PutS 7 D1:B444 3E 20 - - ld a, ' ' 8 D1:B446 CD B8 07 02 call _PutC 9 D1:B44A 21 3A A9 D1 ld hl, FshVVars 10 D1:B44E CD C0 07 02 call _PutS 11 D1:B452 3E 20 - - ld a, ' ' 12 D1:B454 CD B8 07 02 call _PutC 13 D1:B458 3E 76 - - ld a, 'v' 14 D1:B45A CD B8 07 02 call _PutC 15 D1:B45E 21 3E A9 D1 ld hl, FshVMajor 16 D1:B462 CD C0 07 02 call _PutS 17 D1:B466 21 48 A9 D1 ld hl, FshVSeparator 18 D1:B46A CD C0 07 02 call _PutS 19 D1:B46E 21 40 A9 D1 ld hl, FshVMinor 20 D1:B472 CD C0 07 02 call _PutS 21 D1:B476 21 48 A9 D1 ld hl, FshVSeparator 22 D1:B47A CD C0 07 02 call _PutS 23 D1:B47E 21 42 A9 D1 ld hl, FshVPatch 24 D1:B482 CD C0 07 02 call _PutS 25 D1:B486 3E 20 - - ld a, ' ' 26 D1:B488 CD B8 07 02 call _PutC 27 D1:B48C 21 44 A9 D1 ld hl, FshVBuild 28 D1:B490 CD C0 07 02 call _PutS 29 D1:B494 E1 - - - pop hl 30 D1:B495 C9 - - - ret 31 D1:B496 - - - - 32 D1:B496 - - - - ;;printmotd 33 D1:B496 - - - - ;;prints the motd to screen 34 D1:B496 - - - - printmotd: 35 D1:B496 CD 3B B4 D1 call printfshnamelong 36 D1:B49A CD F0 07 02 call _NewLine 37 D1:B49E CD F0 07 02 call _NewLine 38 D1:B4A2 21 4A A9 D1 ld hl, FshMotd2nd 39 D1:B4A6 CD C0 07 02 call _PutS 40 D1:B4AA CD F0 07 02 call _NewLine 41 D1:B4AE 21 60 A9 D1 ld hl, FshMotdHelp 42 D1:B4B2 CD C0 07 02 call _PutS 43 D1:B4B6 CD F0 07 02 call _NewLine 44 D1:B4BA C9 - - - ret Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/fsh/fsh.inc" 6 D1:B4BB - - - - #include "includes/lib/fsh/Draw.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/fsh/Draw.asm" 1 D1:B4BB - - - - ;;drawstatusbar 2 D1:B4BB - - - - ;;draws the FSH status bar 3 D1:B4BB - - - - drawstatusbar: 4 D1:B4BB - - - - ;rgbto565(84, 84, 84) 5 D1:B4BB 21 AA 52 00 ld hl, $52AA 6 D1:B4BF 3E 00 - - ld a, 0 7 D1:B4C1 01 1E 00 00 ld bc, 30 8 D1:B4C5 CD 7B AB D1 call drawbar 9 D1:B4C9 - - - - ;rgbto565(0, 159, 209) 10 D1:B4C9 21 FA 04 00 ld hl, $04FA 11 D1:B4CD - - - - ;ld hl, %1111100000000000 12 D1:B4CD EB DD 6B DD 62 EB 21 02 00 00 11 00 00 00 01 00 00 00 0E 00 3E 1E CD 90 AB D1 - - drawrectfilledM(0, 0, 2, 30) Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/fsh/Draw.asm" 13 D1:B4E7 CD 26 B5 D1 call drawbatteryind 14 D1:B4EB - - - - ;draw name 15 D1:B4EB FD CB 32 D6 set fracDrawLFont, (iy + fontFlags) 16 D1:B4EF 3E 06 - - ld a, 6 17 D1:B4F1 32 D5 08 D0 ld (penRow), a 18 D1:B4F5 21 07 00 00 ld hl, 7 19 D1:B4F9 22 D2 08 D0 ld (penCol), hl 20 D1:B4FD 21 AA 52 00 ld hl, $52AA 21 D1:B501 22 AA 26 D0 ld (drawBGcolor), hl 22 D1:B505 21 FF FF 00 ld hl, $ffff 23 D1:B509 22 AC 26 D0 ld (drawFGcolor), hl 24 D1:B50D 21 05 A9 D1 ld hl, FshName 25 D1:B511 CD 34 08 02 call _VPutS 26 D1:B515 21 FF FF 00 ld hl, $ffff 27 D1:B519 22 AA 26 D0 ld (drawBGcolor), hl 28 D1:B51D 21 00 00 00 ld hl, $0000 29 D1:B521 22 AC 26 D0 ld (drawFGcolor), hl 30 D1:B525 C9 - - - ret 31 D1:B526 - - - - 32 D1:B526 - - - - drawbatteryind: 33 D1:B526 CD 50 1A 02 call _DrawBatteryIndicator 34 D1:B52A C9 - - - ret 35 D1:B52B - - - - 36 D1:B52B - - - - 37 D1:B52B - - - - updatestatusbar: 38 D1:B52B CD 26 B5 D1 call drawbatteryind 39 D1:B52F 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:B530 - - - - #include "includes/lib/prgm/prgm.inc" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/prgm/prgm.inc" 1 D1:B530 - - - - #include "includes/lib/prgm/Prgm.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/prgm/Prgm.asm" 1 D1:B530 - - - - #define prgmmovsize prgmmov_end - prgmmov_end 2 D1:B530 - - - - 3 D1:B530 - - - - prgmbasic: 4 D1:B530 - - - - 5 D1:B530 - - - - prgmasm: 6 D1:B530 CD 18 08 02 call _ClrTxtShdw 7 D1:B534 CD 28 08 02 call _HomeUp 8 D1:B538 CD 44 08 02 call _RunIndicOn 9 D1:B53C CD 44 11 02 call _APDSetup 10 D1:B540 CD 38 11 02 call _EnableAPD 11 D1:B544 C3 D5 EE D0 jp prgmloader 12 D1:B548 - - - - 13 D1:B548 - - - - prgminstallload: 14 D1:B548 21 57 B5 D1 ld hl, prgmmov_start 15 D1:B54C 11 D5 EE D0 ld de, SafeSScreen 16 D1:B550 01 00 00 00 ld bc, prgmmovsize 17 D1:B554 ED B0 - - ldir 18 D1:B556 C9 - - - ret 19 D1:B557 - - - - 20 D1:B557 - - - - prgmmov_start: 21 D1:B557 - - - - 22 D1:B557 - - - - .org SafeSScreen 23 D0:EED5 - - - - 24 D0:EED5 - - - - prgmmov: 25 D0:EED5 - - - - 26 D0:EED5 - - - - prgmloader: 27 D0:EED5 CD 60 EF D0 call prgm_del_usermem; now we deleted ourselves. cool. 28 D0:EED9 - - - - 29 D0:EED9 CD 74 03 00 call _boot_ClearVRAM 30 D0:EEDD - - - - ;ld a,$2D 31 D0:EEDD - - - - ;ld (mpLcdCtrl),a ; Set LCD to 16bpp 32 D0:EEDD CD 3C 1A 02 call _DrawStatusBar 33 D0:EEE1 - - - - ;ld hl,(prgmNamePtr) 34 D0:EEE1 - - - - ;call NamePtrToOP1 35 D0:EEE1 - - - - ;bit isBasic,(iy+pgrmStatus) 36 D0:EEE1 - - - - ;jp nz,RunBasicProgram 37 D0:EEE1 CD 1C EF D0 call prgm_to_usermem; the program is now stored at userMem -- Now we need to check and see what kind of file it is - C or assembly 38 D0:EEE5 E5 - - - push hl 39 D0:EEE6 21 08 EF D0 ld hl, prgmunloader 40 D0:EEEA CD 98 07 02 call _PushErrorHandler 41 D0:EEEE 11 08 EF D0 ld de, prgmunloader 42 D0:EEF2 D5 - - - push de 43 D0:EEF3 C3 81 A8 D1 jp UserMem ; simply call userMem to execute the program 44 D0:EEF7 - - - - 45 D0:EEF7 - - - - RunBasicProgram: 46 D0:EEF7 CD 44 08 02 call _RunIndicOn 47 D0:EEFB CD 74 EF D0 call DeleteTempProgramGetName 48 D0:EEFF - - - - ;ld hl,(actualSizePrgm) 49 D0:EEFF - - - - ;push hl 50 D0:EEFF - - - - ;call _CreateProg ; create a temp program so we can execute 51 D0:EEFF - - - - ;inc de 52 D0:EEFF - - - - ;inc de 53 D0:EEFF - - - - ;pop bc 54 D0:EEFF - - - - ;call _ChkBCIs0 55 D0:EEFF - - - - ;jr z,InROM ; there's nothing to copy 56 D0:EEFF - - - - ;ld hl,(prgmDataPtr) 57 D0:EEFF - - - - ;ldi 58 D0:EEFF - - - - ;jp po,InROM 59 D0:EEFF - - - - ;ldir 60 D0:EEFF CD C8 02 02 InROM: call _OP4ToOP1 61 D0:EF03 - - - - GoodInRAM: 62 D0:EF03 - - - - ;ld de,apperr1 63 D0:EF03 - - - - ;ld hl,StopError 64 D0:EF03 - - - - ;ld bc,StopErrorEnd-StopError 65 D0:EF03 - - - - ;ldir 66 D0:EF03 - - - - ;set graphdraw,(iy+graphFlags) 67 D0:EF03 - - - - ;ld hl,ErrCatchBASIC 68 D0:EF03 - - - - ;call _PushErrorHandler 69 D0:EF03 - - - - ;set progExecuting,(iy+newdispf) 70 D0:EF03 - - - - ;set allowProgTokens,(iy+newDispF) 71 D0:EF03 - - - - ;set cmdExec,(iy+cmdFlags);settheseflagsto execute BASIC prgm 72 D0:EF03 - - - - ;res onInterrupt,(iy+onflags) 73 D0:EF03 - - - - ;ld hl,ReturnHereBASIC 74 D0:EF03 - - - - ;push hl 75 D0:EF03 - - - - ;sub a,a 76 D0:EF03 - - - - ;ld (kbdGetKy),a 77 D0:EF03 FB - - - ei 78 D0:EF04 C3 00 0F 02 jp _ParseInp ; run program 79 D0:EF08 - - - - 80 D0:EF08 - - - - prgmunloader: 81 D0:EF08 21 92 EF D0 ld hl, prgmFsh 82 D0:EF0C CD 20 03 02 call _Mov9ToOP1 83 D0:EF10 CD 1C EF D0 call prgm_to_usermem 84 D0:EF14 CD 48 08 02 call _RunIndicOff 85 D0:EF18 C3 DB A8 D1 jp Fin 86 D0:EF1C - - - - 87 D0:EF1C - - - - prgm_to_usermem: 88 D0:EF1C 3E 09 - - ld a, 09h ; 'add hl,bc' 89 D0:EF1E 32 5C EF D0 ld (offset_SMC),a 90 D0:EF22 CD 0C 05 02 call _ChkFindSym 91 D0:EF26 CD 98 1F 02 call _ChkInRam 92 D0:EF2A EB - - - ex de,hl 93 D0:EF2B 28 0D - - jr z,AlreadyInRAM 94 D0:EF2D AF - - - xor a,a 95 D0:EF2E 32 5C EF D0 ld (offset_SMC),a 96 D0:EF32 11 09 00 00 ld de,9 97 D0:EF36 19 - - - add hl,de 98 D0:EF37 5E - - - ld e,(hl) 99 D0:EF38 19 - - - add hl,de 100 D0:EF39 23 - - - inc hl 101 D0:EF3A - - - - AlreadyInRAM: ; HL->totalPrgmSize bytes 102 D0:EF3A CD 9C 1D 02 call _LoadDEInd_s 103 D0:EF3E 23 - - - inc hl 104 D0:EF3F 23 - - - inc hl ; bypass bytes $EF,$7B (texttok,tasm84cecmp) 105 D0:EF40 E5 - - - push hl 106 D0:EF41 D5 - - - push de 107 D0:EF42 EB - - - ex de,hl 108 D0:EF43 CD 2C 07 02 call _ErrNotEnoughMem; check and see if we have enough memory left for this operation 109 D0:EF47 E1 - - - pop hl 110 D0:EF48 22 8C 11 D0 ld (asm_prgm_size),hl; store the totalPrgmSize of the program to asm_prgm_size for later use 111 D0:EF4C 11 81 A8 D1 ld de,userMem 112 D0:EF50 D5 - - - push de 113 D0:EF51 CD 14 05 02 call _InsertMem ; insert memory into the userspace 114 D0:EF55 D1 - - - pop de 115 D0:EF56 E1 - - - pop hl ; HL->start of program 116 D0:EF57 ED 4B 8C 11 D0 - - - ld bc,(asm_prgm_size) ; load totalPrgmSize of current program 117 D0:EF5C - - - - offset_SMC: 118 D0:EF5C 09 - - - add hl,bc ; if in ram, do this; otherwise, smc it so it doesn't execute 119 D0:EF5D ED B0 - - ldir ; copy the program to userMem 120 D0:EF5F C9 - - - ret ; return 121 D0:EF60 - - - - 122 D0:EF60 - - - - prgm_del_usermem: 123 D0:EF60 ED 5B 8C 11 D0 - - - ld de,(asm_prgm_size) ; load total program totalPrgmSize 124 D0:EF65 B7 - - - or a,a 125 D0:EF66 ED 62 - - sbc hl,hl 126 D0:EF68 22 8C 11 D0 ld (asm_prgm_size),hl ; delete whatever current program was there 127 D0:EF6C 21 81 A8 D1 ld hl,userMem 128 D0:EF70 C3 90 05 02 jp _DelMem ; HL->place to delete, DE=amount to delete 129 D0:EF74 - - - - 130 D0:EF74 - - - - DeleteTempProgramGetName: 131 D0:EF74 21 8C EF D0 ld hl,tmpPrgmName 132 D0:EF78 CD 20 03 02 call _Mov9ToOP1 133 D0:EF7C CD 28 06 02 call _PushOP1 134 D0:EF80 CD 0C 05 02 call _ChkFindSym 135 D0:EF84 D4 34 14 02 call nc,_DelVarArc ; delete the temp prgm if it exists 136 D0:EF88 C3 C4 05 02 jp _PopOP1 137 D0:EF8C - - - - 138 D0:EF8C 16 5A 54 47 50 00 - - tmpPrgmName: .db tempProgObj,"ZTGP",0 139 D0:EF92 - - - - 140 D0:EF92 05 46 53 48 41 00 - - prgmFsh: .db ProgObj, "FSHA", 0 141 D0:EF98 - - - - 142 D0:EF98 - - - - prgmmov_end: 143 D0:EF98 - - - - 144 D0:EF98 - - - - .org prgmmov_start 145 D1:B557 - - - - 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:B557 - - - - #include "includes/lib/crypto/crypto.inc" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/crypto/crypto.inc" 1 D1:B557 - - - - #include "includes/lib/crypto/Rot.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/crypto/Rot.asm" 1 D1:B557 - - - - ;;rotletencrypt 2 D1:B557 - - - - ;;Encrypts a string in rot-n (uses $41 to $5B) 3 D1:B557 - - - - ;;Inputs: 4 D1:B557 - - - - ;; HL: string pointer 5 D1:B557 - - - - ;; A: rot-n 6 D1:B557 - - - - ;;Notes: 7 D1:B557 - - - - ;; Changes string in place. 8 D1:B557 - - - - rotletencrypt: 9 D1:B557 E5 - - - push hl 10 D1:B558 C5 - - - push bc 11 D1:B559 - - - - rotletencryptMod: 12 D1:B559 E5 - - - push hl 13 D1:B55A 67 - - - ld h, a 14 D1:B55B 2E 19 - - ld l, 'Z' + 1 - 'A' - 1 15 D1:B55D CD A2 A9 D1 call modHL 16 D1:B561 44 - - - ld b, h 17 D1:B562 E1 - - - pop hl 18 D1:B563 - - - - rotletencryptLoop: 19 D1:B563 7E - - - ld a, (hl) 20 D1:B564 FE 00 - - cp a, $00 21 D1:B566 28 0F - - jr z, rotletencryptEnd 22 D1:B568 FE 20 - - cp a, ' ' 23 D1:B56A 28 07 - - jr z, rotletencryptLD 24 D1:B56C 80 - - - add a, b 25 D1:B56D FE 5C - - cp a, 'Z' + 2 26 D1:B56F 38 02 - - jr c , rotletencryptLD 27 D1:B571 D6 1B - - sub a, 'Z' + 2 - 'A' 28 D1:B573 - - - - rotletencryptLD: 29 D1:B573 77 - - - ld (hl), a 30 D1:B574 23 - - - inc hl 31 D1:B575 18 EC - - jr rotletencryptLoop 32 D1:B577 - - - - rotletencryptEnd: 33 D1:B577 36 00 - - ld (hl), $00 34 D1:B579 C1 - - - pop bc 35 D1:B57A E1 - - - pop hl 36 D1:B57B C9 - - - ret 37 D1:B57C - - - - 38 D1:B57C - - - - ;;rotletdecrypt 39 D1:B57C - - - - ;;Decrypts a string in rot-n (uses $41 to $5B) 40 D1:B57C - - - - ;;Inputs: 41 D1:B57C - - - - ;; HL: string pointer 42 D1:B57C - - - - ;; A: rot-n 43 D1:B57C - - - - ;;Notes: 44 D1:B57C - - - - ;; Changes string in place. 45 D1:B57C - - - - rotletdecrypt: 46 D1:B57C E5 - - - push hl 47 D1:B57D C5 - - - push bc 48 D1:B57E - - - - rotletdecryptMod: 49 D1:B57E E5 - - - push hl 50 D1:B57F 67 - - - ld h, a 51 D1:B580 2E 19 - - ld l, 'Z' + 1 - 'A' - 1 52 D1:B582 CD A2 A9 D1 call modHL 53 D1:B586 44 - - - ld b, h 54 D1:B587 E1 - - - pop hl 55 D1:B588 - - - - rotletdecryptLoop: 56 D1:B588 7E - - - ld a, (hl) 57 D1:B589 FE 00 - - cp a, $00 58 D1:B58B 28 0F - - jr z, rotletdecryptEnd 59 D1:B58D FE 20 - - cp a, ' ' 60 D1:B58F 28 07 - - jr z, rotletdecryptLD 61 D1:B591 90 - - - sub a, b 62 D1:B592 FE 41 - - cp a, 'A' 63 D1:B594 30 02 - - jr nc , rotletdecryptLD 64 D1:B596 C6 1B - - add a, 'Z' + 2 - 'A' 65 D1:B598 - - - - rotletdecryptLD: 66 D1:B598 77 - - - ld (hl), a 67 D1:B599 23 - - - inc hl 68 D1:B59A 18 EC - - jr rotletdecryptLoop 69 D1:B59C - - - - rotletdecryptEnd: 70 D1:B59C 36 00 - - ld (hl), $00 71 D1:B59E C1 - - - pop bc 72 D1:B59F E1 - - - pop hl 73 D1:B5A0 C9 - - - ret 74 D1:B5A1 - - - - 75 D1:B5A1 - - - - ;;rotasciiencrypt 76 D1:B5A1 - - - - ;;Encrypts a string in rot-x (uses $00 to $EF) 77 D1:B5A1 - - - - ;;Inputs: 78 D1:B5A1 - - - - ;; HL: string pointer 79 D1:B5A1 - - - - ;; A: x 80 D1:B5A1 - - - - ;;Notes: 81 D1:B5A1 - - - - ;; Changes string in place. 82 D1:B5A1 - - - - rotasciiencrypt: 83 D1:B5A1 E5 - - - push hl 84 D1:B5A2 C5 - - - push bc 85 D1:B5A3 0E 00 - - ld c, 0 86 D1:B5A5 4F - - - ld c, a 87 D1:B5A6 - - - - rotasciiencryptLoop: 88 D1:B5A6 7E - - - ld a, (hl) 89 D1:B5A7 FE 00 - - cp 0 90 D1:B5A9 28 13 - - jr z, rotasciiencryptEnd 91 D1:B5AB 81 - - - add a, c 92 D1:B5AC FE 00 - - cp 0 93 D1:B5AE 20 01 - - jr nz, rotasciiencryptLd 94 D1:B5B0 3C - - - inc a 95 D1:B5B1 - - - - rotasciiencryptLd: 96 D1:B5B1 77 - - - ld (hl), a 97 D1:B5B2 23 - - - inc hl 98 D1:B5B3 FE EF - - cp a, $EF 99 D1:B5B5 38 EF - - jr c, rotasciiencryptLoop 100 D1:B5B7 2B - - - dec hl 101 D1:B5B8 D6 0F - - sub a, $0F 102 D1:B5BA 77 - - - ld (hl), a 103 D1:B5BB 23 - - - inc hl 104 D1:B5BC 18 E8 - - jr rotasciiencryptLoop 105 D1:B5BE - - - - rotasciiencryptEnd: 106 D1:B5BE 36 00 - - ld (hl), $00 107 D1:B5C0 C1 - - - pop bc 108 D1:B5C1 E1 - - - pop hl 109 D1:B5C2 C9 - - - ret 110 D1:B5C3 - - - - 111 D1:B5C3 - - - - ;;rotasciidecrypt 112 D1:B5C3 - - - - ;;Encrypts a string in rot-x (uses $00 to $EF) 113 D1:B5C3 - - - - ;;Inputs: 114 D1:B5C3 - - - - ;; HL: string pointer 115 D1:B5C3 - - - - ;; A: x 116 D1:B5C3 - - - - ;;Notes: 117 D1:B5C3 - - - - ;; Changes string in place. 118 D1:B5C3 - - - - rotasciidecrypt: 119 D1:B5C3 E5 - - - push hl 120 D1:B5C4 C5 - - - push bc 121 D1:B5C5 0E 00 - - ld c, 0 122 D1:B5C7 4F - - - ld c, a 123 D1:B5C8 - - - - rotasciidecryptLoop: 124 D1:B5C8 7E - - - ld a, (hl) 125 D1:B5C9 FE 00 - - cp 0 126 D1:B5CB 28 13 - - jr z, rotasciidecryptEnd 127 D1:B5CD 91 - - - sub a, c 128 D1:B5CE FE 00 - - cp 0 129 D1:B5D0 20 01 - - jr nz, rotasciidecryptLd 130 D1:B5D2 3D - - - dec a 131 D1:B5D3 - - - - rotasciidecryptLd: 132 D1:B5D3 77 - - - ld (hl), a 133 D1:B5D4 23 - - - inc hl 134 D1:B5D5 FE EF - - cp a, $EF 135 D1:B5D7 38 EF - - jr c, rotasciidecryptLoop 136 D1:B5D9 2B - - - dec hl 137 D1:B5DA C6 0F - - add a, $0F 138 D1:B5DC 77 - - - ld (hl), a 139 D1:B5DD 23 - - - inc hl 140 D1:B5DE 18 E8 - - jr rotasciidecryptLoop 141 D1:B5E0 - - - - rotasciidecryptEnd: 142 D1:B5E0 36 00 - - ld (hl), $00 143 D1:B5E2 C1 - - - pop bc 144 D1:B5E3 E1 - - - pop hl 145 D1:B5E4 C9 - - - ret 146 D1:B5E5 - - - - Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/crypto/crypto.inc" 2 D1:B5E5 - - - - #include "includes/lib/crypto/Xor.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/lib/crypto/Xor.asm" 1 D1:B5E5 - - - - ;;xorcrypt 2 D1:B5E5 - - - - ;;crypts a string using xor 3 D1:B5E5 - - - - ;;Inputs: 4 D1:B5E5 - - - - ;; HL: string pointer 5 D1:B5E5 - - - - ;; DE: seed pointer (shorter) 6 D1:B5E5 - - - - ;;Notes: 7 D1:B5E5 - - - - ;; Changes string in place. 8 D1:B5E5 - - - - xorcrypt: 9 D1:B5E5 E5 - - - push hl 10 D1:B5E6 D5 - - - push de 11 D1:B5E7 C5 - - - push bc 12 D1:B5E8 CD 44 AC D1 call strlen 13 D1:B5EC D5 - - - push de 14 D1:B5ED E5 - - - push hl 15 D1:B5EE 21 00 00 00 ld hl, 0 16 D1:B5F2 60 - - - ld h, b 17 D1:B5F3 69 - - - ld l, c 18 D1:B5F4 EB - - - ex de, hl 19 D1:B5F5 CD 44 AC D1 call strlen 20 D1:B5F9 EB - - - ex de, hl 21 D1:B5FA 7D - - - ld a, l ;C = len(seed) l=len(string) 22 D1:B5FB 91 - - - sub a,c 23 D1:B5FC D2 06 B6 D1 jp nc, xorcryptNSmaller 24 D1:B600 0E 01 - - ld c, $01 25 D1:B602 3E 00 - - ld a, 0 26 D1:B604 2E 00 - - ld l, 0 27 D1:B606 - - - - xorcryptNSmaller: 28 D1:B606 0D - - - dec c 29 D1:B607 D2 0D B6 D1 jp nc, xorcryptNSmaller2 30 D1:B60B 0E 00 - - ld c, 0 31 D1:B60D - - - - xorcryptNSmaller2: 32 D1:B60D 41 - - - ld b, c 33 D1:B60E 4D - - - ld c, l ;b=len(seed) c=len(string) 34 D1:B60F E1 - - - pop hl 35 D1:B610 B7 - - - or a, a 36 D1:B611 D1 - - - pop de 37 D1:B612 28 2C - - jr z, xorcryptEnd 38 D1:B614 D5 - - - push de 39 D1:B615 EB - - - ex de, hl; hl=seed 40 D1:B616 E1 - - - pop hl 41 D1:B617 C5 - - - push bc 42 D1:B618 D5 - - - push de 43 D1:B619 11 00 00 00 ld de, 0 44 D1:B61D 58 - - - ld e, b 45 D1:B61E 01 00 00 00 ld bc, 0 46 D1:B622 4B - - - ld c, e 47 D1:B623 09 - - - add hl, bc 48 D1:B624 D1 - - - pop de 49 D1:B625 C1 - - - pop bc 50 D1:B626 23 - - - inc hl 51 D1:B627 36 80 - - ld (hl), %10000000 52 D1:B629 C5 - - - push bc 53 D1:B62A 05 - - - dec b 54 D1:B62B 3E FF - - ld a, $FF 55 D1:B62D B8 - - - cp a, b 56 D1:B62E 28 0B - - jr z, xorcryptPadLoopEnd 57 D1:B630 3E 00 - - ld a, $00 58 D1:B632 B8 - - - cp a, b 59 D1:B633 20 01 - - jr nz, xorcryptPadLoop 60 D1:B635 04 - - - inc b 61 D1:B636 - - - - xorcryptPadLoop: 62 D1:B636 23 - - - inc hl 63 D1:B637 36 65 - - ld (hl), 'e' 64 D1:B639 10 FB - - djnz xorcryptPadLoop 65 D1:B63B - - - - xorcryptPadLoopEnd: 66 D1:B63B C1 - - - pop bc 67 D1:B63C 70 - - - ld (hl), b 68 D1:B63D 23 - - - inc hl 69 D1:B63E 36 00 - - ld (hl), $00 70 D1:B640 - - - - xorcryptEnd: 71 D1:B640 C1 - - - pop bc 72 D1:B641 D1 - - - pop de 73 D1:B642 E1 - - - pop hl 74 D1:B643 - - - - ;push hl 75 D1:B643 - - - - ;xorcryptRandLoop: 76 D1:B643 - - - - ;ld a, (hl) 77 D1:B643 - - - - ;or a, a 78 D1:B643 - - - - ;jr z, xorcryptRandLoopEnd 79 D1:B643 - - - - ;call randomint 80 D1:B643 - - - - ;or a, a 81 D1:B643 - - - - ;jr nz, xorcryptRandLoopLD 82 D1:B643 - - - - ;ld a, '/' 83 D1:B643 - - - - ;xorcryptRandLoopLD: 84 D1:B643 - - - - ;ld (hl), a 85 D1:B643 - - - - ;inc hl 86 D1:B643 - - - - ;jr xorcryptRandLoop 87 D1:B643 - - - - ;xorcryptRandLoopEnd: 88 D1:B643 - - - - ;pop hl 89 D1:B643 CD 87 AD D1 call strxor 90 D1:B647 C9 - - - ret 91 D1:B648 - - - - 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" 74 D1:B648 - - - - 75 D1:B648 - - - - #include "includes/man-db.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/man-db.asm" 1 D1:B648 - - - - ;;TODO: move module specific macros to diffrent file 2 D1:B648 - - - - ;;manroute 3 D1:B648 - - - - ;;routes command string to discription 4 D1:B648 - - - - ;;Inputs: 5 D1:B648 - - - - ;; HL: Command String 6 D1:B648 - - - - ;;Outputs: 7 D1:B648 - - - - ;; HL: Command Discription String 8 D1:B648 - - - - manroute: 9 D1:B648 D5 - - - push de 10 D1:B649 - - - - #macro routestrjp(cmdXs, cmdXm) 11 D1:B649 ld de, cmdXs 12 D1:B649 call strcmp 13 D1:B649 ld de, cmdXm 14 D1:B649 jp z, manrouteReturn 15 D1:B649 #endmacro 16 D1:B649 - - - - 17 D1:B649 - - - - #macro subroutestrjp(cmdXs, cmdYs, cmdYm) 18 D1:B649 push hl 19 D1:B649 ld de, cmdXs 20 D1:B649 call strcmp 21 D1:B649 ld hl, 0 22 D1:B649 jr nz, +_ 23 D1:B649 ld hl, FshCmdArg1 24 D1:B649 _: 25 D1:B649 ld de, cmdYs 26 D1:B649 call strcmp 27 D1:B649 pop hl 28 D1:B649 ld de, cmdYm 29 D1:B649 jp z, manrouteReturn 30 D1:B649 #endmacro 31 D1:B649 - - - - 32 D1:B649 CD 05 B8 D1 call fshcmdmanroute 33 D1:B64D CD 57 C1 D1 call cryptocmdmanroute 34 D1:B651 - - - - ;Extention Point 35 D1:B651 - - - - 36 D1:B651 21 CE EA D0 ld hl, FshCmdErrCode 37 D1:B655 36 01 - - ld (hl), $01 38 D1:B657 11 00 00 00 ld de, $00 39 D1:B65B - - - - manrouteReturn: 40 D1:B65B EB - - - ex de, hl 41 D1:B65C D1 - - - pop de 42 D1:B65D C9 - - - ret 43 D1:B65E - - - - 44 D1:B65E - - - - ;;manrouteu 45 D1:B65E - - - - ;;routes command string to usage 46 D1:B65E - - - - ;;Inputs: 47 D1:B65E - - - - ;; HL: Command String 48 D1:B65E - - - - ;;Outputs: 49 D1:B65E - - - - ;; HL: Command Usage String 50 D1:B65E - - - - manrouteu: 51 D1:B65E D5 - - - push de 52 D1:B65F - - - - #macro routeustrjp(cmdXs, cmdXu) 53 D1:B65F ld de, cmdXs 54 D1:B65F call strcmp 55 D1:B65F ld de, cmdXu 56 D1:B65F jp z, manrouteuReturn 57 D1:B65F #endmacro 58 D1:B65F - - - - 59 D1:B65F - - - - #macro subrouteustrjp(cmdXs, cmdYs, cmdYu) 60 D1:B65F push hl 61 D1:B65F ld de, cmdXs 62 D1:B65F call strcmp 63 D1:B65F ld hl, 0 64 D1:B65F jr nz, +_ 65 D1:B65F ld hl, FshCmdArg1 66 D1:B65F _: 67 D1:B65F ld de, cmdYs 68 D1:B65F call strcmp 69 D1:B65F pop hl 70 D1:B65F ld de, cmdYu 71 D1:B65F jp z, manrouteuReturn 72 D1:B65F #endmacro 73 D1:B65F - - - - 74 D1:B65F CD B8 B8 D1 call fshcmdmanrouteu 75 D1:B663 CD 52 C2 D1 call cryptocmdmanrouteu 76 D1:B667 - - - - ;Extention Point 77 D1:B667 - - - - 78 D1:B667 21 CE EA D0 ld hl, FshCmdErrCode 79 D1:B66B 36 01 - - ld (hl), $01 80 D1:B66D 11 00 00 00 ld de, $00 81 D1:B671 - - - - manrouteuReturn: 82 D1:B671 EB - - - ex de, hl 83 D1:B672 D1 - - - pop de 84 D1:B673 C9 - - - ret Listing for file "FSHa.asm" 76 D1:B674 - - - - #include "includes/Command.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/Command.asm" 1 D1:B674 - - - - ;;Commanddecode 2 D1:B674 - - - - ;;Decodes all commands. 3 D1:B674 - - - - ;;Inputs: 4 D1:B674 - - - - ;; HL: Cmd String mem loc 5 D1:B674 - - - - ;; DE: Op code mem loc 6 D1:B674 - - - - ;;Output: 7 D1:B674 - - - - ;; Sets (DE) with command op code 8 D1:B674 - - - - commanddecode: 9 D1:B674 - - - - #macro decodecmdopt(cmdXs, cmdXo) 10 D1:B674 push hl 11 D1:B674 push de 12 D1:B674 ld de, cmdXs 13 D1:B674 call strcmp 14 D1:B674 ld hl, cmdXo 15 D1:B674 pop de 16 D1:B674 call z, wordcpy 17 D1:B674 pop hl 18 D1:B674 #endmacro 19 D1:B674 - - - - 20 D1:B674 CD A1 B6 D1 call fshcmddecode 21 D1:B678 CD 13 C1 D1 call cryptocmddecode 22 D1:B67C CD C8 CA D1 call prgmcmddecode 23 D1:B680 - - - - ;Extention Point 24 D1:B680 - - - - 25 D1:B680 C9 - - - ret 26 D1:B681 - - - - 27 D1:B681 - - - - ;;commandroute 28 D1:B681 - - - - ;;Routes all commamds. 29 D1:B681 - - - - ;;Inputs: 30 D1:B681 - - - - ;; HL: Op code mem loc 31 D1:B681 - - - - commandroute: 32 D1:B681 - - - - #macro routeoptjp(cmdXo, cmdXf) 33 D1:B681 ld de, cmdXo 34 D1:B681 call wordcmp 35 D1:B681 jp z, cmdXf 36 D1:B681 #endmacro 37 D1:B681 - - - - 38 D1:B681 CD 7E B7 D1 call fshcmdroute 39 D1:B685 CD 3C C1 D1 call cryptocmdroute 40 D1:B689 CD C9 CA D1 call prgmcmdroute 41 D1:B68D - - - - ;Extention Point 42 D1:B68D - - - - 43 D1:B68D 21 68 B3 D1 ld hl, ErrCmdNotFoundo 44 D1:B691 11 CE EA D0 ld de, FshCmdErrCode 45 D1:B695 CD 46 AA D1 call bytecpy 46 D1:B699 CD 59 B3 D1 call ErrSet 47 D1:B69D C3 E3 A8 D1 jp Err 48 D1:B6A1 - - - - 49 D1:B6A1 - - - - #include "includes/FshCommands/FshCommand.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/FshCommand.asm" 1 D1:B6A1 - - - - fshcmddecode: 2 D1:B6A1 E5 D5 11 6B B9 D1 CD 55 AC D1 21 70 B9 D1 D1 CC 4E AA D1 E1 decodecmdopt(fshcmdEXIT, fshcmdEXITo) Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/FshCommand.asm" 3 D1:B6B5 E5 D5 11 85 B9 D1 CD 55 AC D1 21 89 B9 D1 D1 CC 4E AA D1 E1 decodecmdopt(fshcmdSET, fshcmdSETo) 4 D1:B6C9 E5 D5 11 7D BA D1 CD 55 AC D1 21 82 BA D1 D1 CC 4E AA D1 E1 decodecmdopt(fshcmdCOPY, fshcmdCOPYo) 5 D1:B6DD E5 D5 11 8C BB D1 CD 55 AC D1 21 91 BB D1 D1 CC 4E AA D1 E1 decodecmdopt(fshcmdMOVE, fshcmdMOVEo) 6 D1:B6F1 E5 D5 11 A3 BC D1 CD 55 AC D1 21 A7 BC D1 D1 CC 4E AA D1 E1 decodecmdopt(fshcmdCLS, fshcmdCLSo) 7 D1:B705 E5 D5 11 D0 BC D1 CD 55 AC D1 21 D4 BC D1 D1 CC 4E AA D1 E1 decodecmdopt(fshcmdVAR, fshcmdVARo) 8 D1:B719 E5 D5 11 73 BD D1 CD 55 AC D1 21 78 BD D1 D1 CC 4E AA D1 E1 decodecmdopt(fshcmdVARS, fshcmdVARSo) 9 D1:B72D E5 D5 11 E4 BD D1 CD 55 AC D1 21 EA BD D1 D1 CC 4E AA D1 E1 decodecmdopt(fshcmdSLEEP, fshcmdSLEEPo) 10 D1:B741 E5 D5 11 33 BE D1 CD 55 AC D1 21 38 BE D1 D1 CC 4E AA D1 E1 decodecmdopt(fshcmdINFO, fshcmdINFOo) 11 D1:B755 E5 D5 11 D6 BE D1 CD 55 AC D1 21 DB BE D1 D1 CC 4E AA D1 E1 decodecmdopt(fshcmdHELP, fshcmdHELPo) 12 D1:B769 E5 D5 11 2A C0 D1 CD 55 AC D1 21 2E C0 D1 D1 CC 4E AA D1 E1 decodecmdopt(fshcmdMAN, fshcmdMANo) 13 D1:B77D C9 - - - ret 14 D1:B77E - - - - 15 D1:B77E - - - - fshcmdroute: 16 D1:B77E C1 - - - pop bc ;pop the ret loc from stack into bc 17 D1:B77F 11 70 B9 D1 CD 5A AA D1 CA 81 B9 D1 routeoptjp(fshcmdEXITo, fshcmdEXITf) 18 D1:B78B 11 89 B9 D1 CD 5A AA D1 CA C8 B9 D1 routeoptjp(fshcmdSETo, fshcmdSETf) 19 D1:B797 11 82 BA D1 CD 5A AA D1 CA DE BA D1 routeoptjp(fshcmdCOPYo, fshcmdCOPYf) 20 D1:B7A3 11 91 BB D1 CD 5A AA D1 CA EC BB D1 routeoptjp(fshcmdMOVEo, fshcmdMOVEf) 21 D1:B7AF 11 A7 BC D1 CD 5A AA D1 CA BF BC D1 routeoptjp(fshcmdCLSo, fshcmdCLSf) 22 D1:B7BB 11 D4 BC D1 CD 5A AA D1 CA 0C BD D1 routeoptjp(fshcmdVARo, fshcmdVARf) 23 D1:B7C7 11 78 BD D1 CD 5A AA D1 CA 95 BD D1 routeoptjp(fshcmdVARSo, fshcmdVARSf) 24 D1:B7D3 11 EA BD D1 CD 5A AA D1 CA 1C BE D1 routeoptjp(fshcmdSLEEPo, fshcmdSLEEPf) 25 D1:B7DF 11 38 BE D1 CD 5A AA D1 CA 65 BE D1 routeoptjp(fshcmdINFOo, fshcmdINFOf) 26 D1:B7EB 11 DB BE D1 CD 5A AA D1 CA F8 BE D1 routeoptjp(fshcmdHELPo, fshcmdHELPf) 27 D1:B7F7 11 2E C0 D1 CD 5A AA D1 CA 5C C0 D1 routeoptjp(fshcmdMANo, fshcmdMANf) 28 D1:B803 C5 - - - push bc ;put ret location back on stack 29 D1:B804 C9 - - - ret 30 D1:B805 - - - - 31 D1:B805 - - - - fshcmdmanroute: 32 D1:B805 C1 - - - pop bc 33 D1:B806 11 6B B9 D1 CD 55 AC D1 11 72 B9 D1 CA 5B B6 D1 routestrjp(fshcmdEXIT, fshCmdEXITm) 34 D1:B816 11 85 B9 D1 CD 55 AC D1 11 8B B9 D1 CA 5B B6 D1 routestrjp(fshcmdSET, fshCmdSETm) 35 D1:B826 11 7D BA D1 CD 55 AC D1 11 84 BA D1 CA 5B B6 D1 routestrjp(fshcmdCOPY, fshCmdCOPYm) 36 D1:B836 11 8C BB D1 CD 55 AC D1 11 93 BB D1 CA 5B B6 D1 routestrjp(fshcmdMOVE, fshCmdMOVEm) 37 D1:B846 11 A3 BC D1 CD 55 AC D1 11 A9 BC D1 CA 5B B6 D1 routestrjp(fshcmdCLS, fshCmdCLSm) 38 D1:B856 11 D0 BC D1 CD 55 AC D1 11 D6 BC D1 CA 5B B6 D1 routestrjp(fshcmdVAR, fshCmdVARm) 39 D1:B866 11 73 BD D1 CD 55 AC D1 11 7A BD D1 CA 5B B6 D1 routestrjp(fshcmdVARS, fshCmdVARSm) 40 D1:B876 11 E4 BD D1 CD 55 AC D1 11 EC BD D1 CA 5B B6 D1 routestrjp(fshcmdSLEEP, fshCmdSLEEPm) 41 D1:B886 11 33 BE D1 CD 55 AC D1 11 3A BE D1 CA 5B B6 D1 routestrjp(fshcmdINFO, fshCmdINFOm) 42 D1:B896 11 D6 BE D1 CD 55 AC D1 11 DD BE D1 CA 5B B6 D1 routestrjp(fshcmdHELP, fshCmdHELPm) 43 D1:B8A6 11 2A C0 D1 CD 55 AC D1 11 30 C0 D1 CA 5B B6 D1 routestrjp(fshcmdMAN, fshCmdMANm) 44 D1:B8B6 C5 - - - push bc 45 D1:B8B7 C9 - - - ret 46 D1:B8B8 - - - - 47 D1:B8B8 - - - - fshcmdmanrouteu: 48 D1:B8B8 C1 - - - pop bc 49 D1:B8B9 11 6B B9 D1 CD 55 AC D1 11 7C B9 D1 CA 71 B6 D1 routeustrjp(fshcmdEXIT, fshCmdEXITu) 50 D1:B8C9 11 85 B9 D1 CD 55 AC D1 11 A6 B9 D1 CA 71 B6 D1 routeustrjp(fshcmdSET, fshCmdSETu) 51 D1:B8D9 11 7D BA D1 CD 55 AC D1 11 B2 BA D1 CA 71 B6 D1 routeustrjp(fshcmdCOPY, fshCmdCOPYu) 52 D1:B8E9 11 8C BB D1 CD 55 AC D1 11 C0 BB D1 CA 71 B6 D1 routeustrjp(fshcmdMOVE, fshCmdMOVEu) 53 D1:B8F9 11 A3 BC D1 CD 55 AC D1 11 BB BC D1 CA 71 B6 D1 routeustrjp(fshcmdCLS, fshCmdCLSu) 54 D1:B909 11 D0 BC D1 CD 55 AC D1 11 F7 BC D1 CA 71 B6 D1 routeustrjp(fshcmdVAR, fshCmdVARu) 55 D1:B919 11 73 BD D1 CD 55 AC D1 11 90 BD D1 CA 71 B6 D1 routeustrjp(fshcmdVARS, fshCmdVARSu) 56 D1:B929 11 E4 BD D1 CD 55 AC D1 11 16 BE D1 CA 71 B6 D1 routeustrjp(fshcmdSLEEP, fshCmdSLEEPu) 57 D1:B939 11 33 BE D1 CD 55 AC D1 11 60 BE D1 CA 71 B6 D1 routeustrjp(fshcmdINFO, fshCmdINFOu) 58 D1:B949 11 D6 BE D1 CD 55 AC D1 11 F3 BE D1 CA 71 B6 D1 routeustrjp(fshcmdHELP, fshCmdHELPu) 59 D1:B959 11 2A C0 D1 CD 55 AC D1 11 4E C0 D1 CA 71 B6 D1 routeustrjp(fshcmdMAN, fshCmdMANu) 60 D1:B969 C5 - - - push bc 61 D1:B96A C9 - - - ret 62 D1:B96B - - - - 63 D1:B96B - - - - #include "includes/FshCommands/FshCommands.inc" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/FshCommands.inc" 1 D1:B96B - - - - #include "includes/FshCommands/EXIT.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/EXIT.asm" 1 D1:B96B 45 58 49 54 00 - - - fshcmdEXIT: .db "EXIT", 0 2 D1:B970 FF 00 - - fshcmdEXITo: .dw $00FF 3 D1:B972 45 78 69 74 73 20 46 73 68 00 - - fshcmdEXITm: .db "Exits Fsh", 0 4 D1:B97C 45 58 49 54 00 - - - fshcmdEXITu: .db "EXIT", 0 5 D1:B981 C3 E7 A8 D1 fshcmdEXITf: JP Cleanup Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/FshCommands.inc" 2 D1:B985 - - - - #include "includes/FshCommands/SET.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/SET.asm" 1 D1:B985 53 45 54 00 fshcmdSET: .db "SET", 0 2 D1:B989 01 00 - - fshcmdSETo: .dw $0001 3 D1:B98B 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:B9A6 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:B9C8 - - - - fshcmdSETf: 6 D1:B9C8 - - - - fshcmdSETfArg0: 7 D1:B9C8 21 CD EA D0 ld hl, FshCmdArgFlags 8 D1:B9CC CB 4E - - bit 1, (hl) 9 D1:B9CE 20 34 - - jr nz, fshcmdSETfArg1 10 D1:B9D0 CB 46 - - bit 0, (hl) 11 D1:B9D2 28 0C - - jr z, fshcmdSETfArg0Get 12 D1:B9D4 21 EE B3 D1 ld hl, ErrUsageo 13 D1:B9D8 CD 59 B3 D1 call ErrSet 14 D1:B9DC CD 0C B3 D1 call ErrCatch 15 D1:B9E0 - - - - fshcmdSETfArg0Get: 16 D1:B9E0 21 67 BA D1 ld hl, fshcmdSETfDIndex 17 D1:B9E4 CD 1D AB D1 call printprompt 18 D1:B9E8 21 61 BA D1 ld hl, fshcmdSETfInputBuffer 19 D1:B9EC 11 03 00 00 ld de, 3 20 D1:B9F0 CD DD AF D1 call inputnumstr 21 D1:B9F4 CD DF AC D1 call strtow 22 D1:B9F8 11 A8 EA D0 ld de, FshCmdArg0 23 D1:B9FC EB - - - ex de, hl 24 D1:B9FD 73 - - - ld (hl), e 25 D1:B9FE 23 - - - inc hl 26 D1:B9FF 72 - - - ld (hl), d 27 D1:BA00 CD F0 07 02 call _NewLine 28 D1:BA04 - - - - fshcmdSETfArg1: 29 D1:BA04 21 CD EA D0 ld hl, FshCmdArgFlags 30 D1:BA08 CB 5E - - bit 3, (hl) 31 D1:BA0A 20 34 - - jr nz, fshcmdSETfExe 32 D1:BA0C CB 56 - - bit 2, (hl) 33 D1:BA0E 28 0C - - jr z, fshcmdSETfArg1Get 34 D1:BA10 21 EE B3 D1 ld hl, ErrUsageo 35 D1:BA14 CD 59 B3 D1 call ErrSet 36 D1:BA18 CD 0C B3 D1 call ErrCatch 37 D1:BA1C - - - - fshcmdSETfArg1Get: 38 D1:BA1C 21 75 BA D1 ld hl, fshcmdSETfDValue 39 D1:BA20 CD 1D AB D1 call printprompt 40 D1:BA24 21 61 BA D1 ld hl, fshcmdSETfInputBuffer 41 D1:BA28 11 05 00 00 ld de, 5 42 D1:BA2C CD DD AF D1 call inputnumstr 43 D1:BA30 CD DF AC D1 call strtow 44 D1:BA34 EB - - - ex de, hl 45 D1:BA35 21 B1 EA D0 ld hl, FshCmdArg1 46 D1:BA39 73 - - - ld (hl), e 47 D1:BA3A 23 - - - inc hl 48 D1:BA3B 72 - - - ld (hl), d 49 D1:BA3C CD F0 07 02 call _NewLine 50 D1:BA40 - - - - fshcmdSETfExe: 51 D1:BA40 21 A8 EA D0 ld hl, FshCmdArg0 52 D1:BA44 11 00 00 00 ld de, 0 53 D1:BA48 5E - - - ld e, (hl) 54 D1:BA49 23 - - - inc hl 55 D1:BA4A 56 - - - ld d, (hl) 56 D1:BA4B D5 - - - push de 57 D1:BA4C 21 B1 EA D0 ld hl, FshCmdArg1 58 D1:BA50 5E - - - ld e, (hl) 59 D1:BA51 23 - - - inc hl 60 D1:BA52 56 - - - ld d, (hl) 61 D1:BA53 EB - - - ex de, hl 62 D1:BA54 D1 - - - pop de 63 D1:BA55 CD 5C B2 D1 call fshvarset 64 D1:BA59 CD 0C B3 D1 call ErrCatch 65 D1:BA5D C3 DB A8 D1 jp Fin 66 D1:BA61 - - - - 67 D1:BA61 00 00 00 00 00 00 - - fshcmdSETfInputBuffer: .db $00, $00, $00, $00, $00, $00 68 D1:BA67 44 65 73 74 69 6E 61 74 69 6F 6E 3D 20 00 - - fshcmdSETfDIndex: .db "Destination= ", 0 69 D1:BA75 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:BA7D - - - - #include "includes/FshCommands/COPY.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/COPY.asm" 1 D1:BA7D 43 4F 50 59 00 - - - fshcmdCOPY: .db "COPY", 0 2 D1:BA82 02 00 - - fshcmdCOPYo: .dw $0002 3 D1:BA84 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:BAB2 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:BADE - - - - fshcmdCOPYf: 6 D1:BADE - - - - fshcmdCOPYfArg0: 7 D1:BADE 21 CD EA D0 ld hl, FshCmdArgFlags 8 D1:BAE2 CB 4E - - bit 1, (hl) 9 D1:BAE4 20 31 - - jr nz, fshcmdCOPYfArg1 10 D1:BAE6 CB 46 - - bit 0, (hl) 11 D1:BAE8 28 0C - - jr z, fshcmdCOPYfArg0Get 12 D1:BAEA 21 EE B3 D1 ld hl, ErrUsageo 13 D1:BAEE CD 59 B3 D1 call ErrSet 14 D1:BAF2 CD 0C B3 D1 call ErrCatch 15 D1:BAF6 - - - - fshcmdCOPYfArg0Get: 16 D1:BAF6 21 75 BB D1 ld hl, fshcmdCOPYfDSource 17 D1:BAFA CD 1D AB D1 call printprompt 18 D1:BAFE 21 71 BB D1 ld hl, fshcmdCOPYfInputBuffer 19 D1:BB02 11 03 00 00 ld de, 3 20 D1:BB06 CD DD AF D1 call inputnumstr 21 D1:BB0A CD 82 AC D1 call strtob 22 D1:BB0E 21 A8 EA D0 ld hl, FshCmdArg0 23 D1:BB12 77 - - - ld (hl), a 24 D1:BB13 CD F0 07 02 call _NewLine 25 D1:BB17 - - - - fshcmdCOPYfArg1: 26 D1:BB17 21 CD EA D0 ld hl, FshCmdArgFlags 27 D1:BB1B CB 5E - - bit 3, (hl) 28 D1:BB1D 20 31 - - jr nz, fshcmdCOPYfExe 29 D1:BB1F CB 56 - - bit 2, (hl) 30 D1:BB21 28 0C - - jr z, fshcmdCOPYfArg1Get 31 D1:BB23 21 EE B3 D1 ld hl, ErrUsageo 32 D1:BB27 CD 59 B3 D1 call ErrSet 33 D1:BB2B CD 0C B3 D1 call ErrCatch 34 D1:BB2F - - - - fshcmdCOPYfArg1Get: 35 D1:BB2F 21 75 BB D1 ld hl, fshcmdCOPYfDSource 36 D1:BB33 CD 1D AB D1 call printprompt 37 D1:BB37 21 71 BB D1 ld hl, fshcmdCOPYfInputBuffer 38 D1:BB3B 11 03 00 00 ld de, 3 39 D1:BB3F CD DD AF D1 call inputnumstr 40 D1:BB43 CD 82 AC D1 call strtob 41 D1:BB47 21 B1 EA D0 ld hl, FshCmdArg1 42 D1:BB4B 77 - - - ld (hl), a 43 D1:BB4C CD F0 07 02 call _NewLine 44 D1:BB50 - - - - fshcmdCOPYfExe: 45 D1:BB50 21 A8 EA D0 ld hl, FshCmdArg0 46 D1:BB54 11 00 00 00 ld de, 0 47 D1:BB58 5E - - - ld e, (hl) 48 D1:BB59 EB - - - ex de, hl 49 D1:BB5A E5 - - - push hl 50 D1:BB5B 21 B1 EA D0 ld hl, FshCmdArg1 51 D1:BB5F 11 00 00 00 ld de, 0 52 D1:BB63 5E - - - ld e, (hl) 53 D1:BB64 E1 - - - pop hl 54 D1:BB65 CD AF B2 D1 call fshvarcpy 55 D1:BB69 CD 0C B3 D1 call ErrCatch 56 D1:BB6D C3 DB A8 D1 jp Fin 57 D1:BB71 - - - - 58 D1:BB71 00 00 00 00 fshcmdCOPYfInputBuffer: .db $00, $00, $00, $00 59 D1:BB75 53 6F 75 72 63 65 3D 20 00 - - - fshcmdCOPYfDSource: .db "Source= ", 0 60 D1:BB7E 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:BB8C - - - - #include "includes/FshCommands/MOVE.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/MOVE.asm" 1 D1:BB8C 4D 4F 56 45 00 - - - fshcmdMOVE: .db "MOVE", 0 2 D1:BB91 03 00 - - fshcmdMOVEo: .dw $0003 3 D1:BB93 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:BBC0 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:BBEC - - - - fshcmdMOVEf: 6 D1:BBEC - - - - fshcmdMOVEfArg0: 7 D1:BBEC 21 CD EA D0 ld hl, FshCmdArgFlags 8 D1:BBF0 CB 4E - - bit 1, (hl) 9 D1:BBF2 20 31 - - jr nz, fshcmdMOVEfArg1 10 D1:BBF4 CB 46 - - bit 0, (hl) 11 D1:BBF6 28 0C - - jr z, fshcmdMOVEfArg0Get 12 D1:BBF8 21 EE B3 D1 ld hl, ErrUsageo 13 D1:BBFC CD 59 B3 D1 call ErrSet 14 D1:BC00 CD 0C B3 D1 call ErrCatch 15 D1:BC04 - - - - fshcmdMOVEfArg0Get: 16 D1:BC04 21 8C BC D1 ld hl, fshcmdMOVEfDSource 17 D1:BC08 CD 1D AB D1 call printprompt 18 D1:BC0C 21 88 BC D1 ld hl, fshcmdMOVEfInputBuffer 19 D1:BC10 11 03 00 00 ld de, 3 20 D1:BC14 CD DD AF D1 call inputnumstr 21 D1:BC18 CD 82 AC D1 call strtob 22 D1:BC1C 21 A8 EA D0 ld hl, FshCmdArg0 23 D1:BC20 77 - - - ld (hl), a 24 D1:BC21 CD F0 07 02 call _NewLine 25 D1:BC25 - - - - fshcmdMOVEfArg1: 26 D1:BC25 21 CD EA D0 ld hl, FshCmdArgFlags 27 D1:BC29 CB 5E - - bit 3, (hl) 28 D1:BC2B 20 31 - - jr nz, fshcmdMOVEfExe 29 D1:BC2D CB 56 - - bit 2, (hl) 30 D1:BC2F 28 0C - - jr z, fshcmdMOVEfArg1Get 31 D1:BC31 21 EE B3 D1 ld hl, ErrUsageo 32 D1:BC35 CD 59 B3 D1 call ErrSet 33 D1:BC39 CD 0C B3 D1 call ErrCatch 34 D1:BC3D - - - - fshcmdMOVEfArg1Get: 35 D1:BC3D 21 95 BC D1 ld hl, fshcmdMOVEfDDestination 36 D1:BC41 CD 1D AB D1 call printprompt 37 D1:BC45 21 88 BC D1 ld hl, fshcmdMOVEfInputBuffer 38 D1:BC49 11 03 00 00 ld de, 3 39 D1:BC4D CD DD AF D1 call inputnumstr 40 D1:BC51 CD 82 AC D1 call strtob 41 D1:BC55 21 B1 EA D0 ld hl, FshCmdArg1 42 D1:BC59 77 - - - ld (hl), a 43 D1:BC5A CD F0 07 02 call _NewLine 44 D1:BC5E - - - - fshcmdMOVEfExe: 45 D1:BC5E 21 A8 EA D0 ld hl, FshCmdArg0 46 D1:BC62 11 00 00 00 ld de, 0 47 D1:BC66 5E - - - ld e, (hl) 48 D1:BC67 EB - - - ex de, hl 49 D1:BC68 E5 - - - push hl 50 D1:BC69 21 B1 EA D0 ld hl, FshCmdArg1 51 D1:BC6D 11 00 00 00 ld de, 0 52 D1:BC71 5E - - - ld e, (hl) 53 D1:BC72 E1 - - - pop hl 54 D1:BC73 CD AF B2 D1 call fshvarcpy 55 D1:BC77 EB - - - ex de, hl 56 D1:BC78 21 00 00 00 ld hl, 0 57 D1:BC7C CD 5C B2 D1 call fshvarset 58 D1:BC80 CD 0C B3 D1 call ErrCatch 59 D1:BC84 C3 DB A8 D1 jp Fin 60 D1:BC88 - - - - 61 D1:BC88 00 00 00 00 fshcmdMOVEfInputBuffer: .db $00, $00, $00, $00 62 D1:BC8C 53 6F 75 72 63 65 3D 20 00 - - - fshcmdMOVEfDSource: .db "Source= ", 0 63 D1:BC95 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:BCA3 - - - - #include "includes/FshCommands/CLS.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/CLS.asm" 1 D1:BCA3 43 4C 53 00 fshcmdCLS: .db "CLS", 0 2 D1:BCA7 10 00 - - fshcmdCLSo: .dw $0010 3 D1:BCA9 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:BCBB 43 4C 53 00 fshcmdCLSu: .db "CLS", 0 5 D1:BCBF - - - - fshcmdCLSf: 6 D1:BCBF CD 08 08 02 call _ClrLCDFull 7 D1:BCC3 AF - - - xor a 8 D1:BCC4 32 95 05 D0 ld (CurRow), a 9 D1:BCC8 32 96 05 D0 ld (CurCol), a 10 D1:BCCC C3 DB A8 D1 jp Fin Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/FshCommands.inc" 6 D1:BCD0 - - - - #include "includes/FshCommands/VAR.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/VAR.asm" 1 D1:BCD0 56 41 52 00 fshcmdVAR: .db "VAR", 0 2 D1:BCD4 11 00 - - fshcmdVARo: .dw $0011 3 D1:BCD6 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:BCF7 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:BD0C - - - - fshcmdVARf: 6 D1:BD0C - - - - fshcmdVARfArg0: 7 D1:BD0C 21 CD EA D0 ld hl, FshCmdArgFlags 8 D1:BD10 CB 4E - - bit 1, (hl) 9 D1:BD12 20 34 - - jr nz, fshcmdVARfExe 10 D1:BD14 CB 46 - - bit 0, (hl) 11 D1:BD16 28 0C - - jr z, fshcmdVARfArg0Get 12 D1:BD18 21 EE B3 D1 ld hl, ErrUsageo 13 D1:BD1C CD 59 B3 D1 call ErrSet 14 D1:BD20 CD 0C B3 D1 call ErrCatch 15 D1:BD24 - - - - fshcmdVARfArg0Get: 16 D1:BD24 21 6B BD D1 ld hl, fshcmdVARfDIndex 17 D1:BD28 CD 1D AB D1 call printprompt 18 D1:BD2C 21 67 BD D1 ld hl, fshcmdVARfInputBuffer 19 D1:BD30 11 03 00 00 ld de, 3 20 D1:BD34 CD DD AF D1 call inputnumstr 21 D1:BD38 CD DF AC D1 call strtow 22 D1:BD3C 11 A8 EA D0 ld de, FshCmdArg0 23 D1:BD40 EB - - - ex de, hl 24 D1:BD41 73 - - - ld (hl), e 25 D1:BD42 23 - - - inc hl 26 D1:BD43 72 - - - ld (hl), d 27 D1:BD44 CD F0 07 02 call _NewLine 28 D1:BD48 - - - - fshcmdVARfExe: 29 D1:BD48 21 A8 EA D0 ld hl, FshCmdArg0 30 D1:BD4C 11 00 00 00 ld de, 0 31 D1:BD50 5E - - - ld e, (hl) 32 D1:BD51 23 - - - inc hl 33 D1:BD52 56 - - - ld d, (hl) 34 D1:BD53 CD 84 B2 D1 call fshvarget 35 D1:BD57 CD 0C B3 D1 call ErrCatch 36 D1:BD5B CD BC 07 02 call _DispHL_s 37 D1:BD5F CD F0 07 02 call _NewLine 38 D1:BD63 C3 DB A8 D1 jp Fin 39 D1:BD67 - - - - 40 D1:BD67 00 00 00 00 fshcmdVARfInputBuffer: .db $00, $00, $00, $00 41 D1:BD6B 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:BD73 - - - - #include "includes/FshCommands/VARS.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/VARS.asm" 1 D1:BD73 56 41 52 53 00 - - - fshcmdVARS: .db "VARS", 0 2 D1:BD78 12 00 - - fshcmdVARSo: .dw $0012 3 D1:BD7A 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:BD90 56 41 52 53 00 - - - fshcmdVARSu: .db "VARS", 0 5 D1:BD95 - - - - fshcmdVARSf: 6 D1:BD95 21 CD EA D0 ld hl, FshCmdArgFlags 7 D1:BD99 CB 46 - - bit 0, (hl) 8 D1:BD9B 28 0C - - jr z, fshcmdVARSfExe 9 D1:BD9D 21 EE B3 D1 ld hl, ErrUsageo 10 D1:BDA1 CD 59 B3 D1 call ErrSet 11 D1:BDA5 CD 0C B3 D1 call ErrCatch 12 D1:BDA9 - - - - fshcmdVARSfExe: 13 D1:BDA9 06 00 - - ld b, 0 14 D1:BDAB 0E 00 - - ld c, 0 15 D1:BDAD 11 00 00 00 ld de, 0 16 D1:BDB1 - - - - fshcmdVARSfLoop: 17 D1:BDB1 CD 84 B2 D1 call fshvarget 18 D1:BDB5 7C - - - ld a, h 19 D1:BDB6 CD B8 07 02 call _PutC 20 D1:BDBA 7D - - - ld a, l 21 D1:BDBB CD B8 07 02 call _PutC 22 D1:BDBF 79 - - - ld a, c 23 D1:BDC0 0C - - - inc c 24 D1:BDC1 FE 07 - - cp 7 25 D1:BDC3 20 0E - - jr nz, fshcmdVARSfLoopU 26 D1:BDC5 E5 - - - push hl 27 D1:BDC6 C5 - - - push bc 28 D1:BDC7 D5 - - - push de 29 D1:BDC8 CD F0 07 02 call _NewLine 30 D1:BDCC D1 - - - pop de 31 D1:BDCD C1 - - - pop bc 32 D1:BDCE E1 - - - pop hl 33 D1:BDCF 0E 00 - - ld c, 0 34 D1:BDD1 18 06 - - jr fshcmdVARSfLoopEnd 35 D1:BDD3 - - - - fshcmdVARSfLoopU: 36 D1:BDD3 3E 5F - - ld a, '_' 37 D1:BDD5 CD B8 07 02 call _PutC 38 D1:BDD9 - - - - fshcmdVARSfLoopEnd: 39 D1:BDD9 04 - - - inc b 40 D1:BDDA 13 - - - inc de 41 D1:BDDB 78 - - - ld a, b 42 D1:BDDC FE 40 - - cp FshVarsSize / 2 43 D1:BDDE 38 D1 - - jr c, fshcmdVARSfLoop 44 D1:BDE0 C3 DB A8 D1 jp Fin Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/FshCommands.inc" 8 D1:BDE4 - - - - #include "includes/FshCommands/SLEEP.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/SLEEP.asm" 1 D1:BDE4 53 4C 45 45 50 00 - - fshcmdSLEEP: .db "SLEEP", 0 2 D1:BDEA 16 00 - - fshcmdSLEEPo: .dw $0016 3 D1:BDEC 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:BE16 53 4C 45 45 50 00 - - fshcmdSLEEPu: .db "SLEEP", 0 5 D1:BE1C - - - - fshcmdSLEEPf: 6 D1:BE1C F3 - - - di 7 D1:BE1D CD 38 11 02 call _EnableAPD 8 D1:BE21 3E 01 - - ld a,1 9 D1:BE23 21 90 05 D0 ld hl,apdSubTimer 10 D1:BE27 77 - - - ld (hl),a 11 D1:BE28 23 - - - inc hl 12 D1:BE29 77 - - - ld (hl),a 13 D1:BE2A FD CB 08 DE set apdRunning,(iy+apdFlags) 14 D1:BE2E FB - - - ei 15 D1:BE2F C3 DB A8 D1 jp Fin Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/FshCommands.inc" 9 D1:BE33 - - - - #include "includes/FshCommands/INFO.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/INFO.asm" 1 D1:BE33 49 4E 46 4F 00 - - - fshcmdINFO: .db "INFO", 0 2 D1:BE38 20 00 - - fshcmdINFOo: .dw $0020 3 D1:BE3A 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:BE60 49 4E 46 4F 00 - - - fshcmdINFOu: .db "INFO", 0 5 D1:BE65 - - - - fshcmdINFOf: 6 D1:BE65 21 CD EA D0 ld hl, FshCmdArgFlags 7 D1:BE69 CB 46 - - bit 0, (hl) 8 D1:BE6B 28 0C - - jr z, fshcmdINFOfExe 9 D1:BE6D 21 EE B3 D1 ld hl, ErrUsageo 10 D1:BE71 CD 59 B3 D1 call ErrSet 11 D1:BE75 CD 0C B3 D1 call ErrCatch 12 D1:BE79 - - - - fshcmdINFOfExe: 13 D1:BE79 CD 08 08 02 call _ClrLCDFull 14 D1:BE7D AF - - - xor a 15 D1:BE7E 32 95 05 D0 ld (CurRow), a 16 D1:BE82 32 96 05 D0 ld (CurCol), a 17 D1:BE86 - - - - 18 D1:BE86 CD 3B B4 D1 call printfshnamelong 19 D1:BE8A CD F0 07 02 call _NewLine 20 D1:BE8E - - - - 21 D1:BE8E 21 0F A9 D1 ld hl, FshBy 22 D1:BE92 CD C0 07 02 call _PutS 23 D1:BE96 CD F0 07 02 call _NewLine 24 D1:BE9A - - - - 25 D1:BE9A 21 19 A9 D1 ld hl, FshSite 26 D1:BE9E CD C0 07 02 call _PutS 27 D1:BEA2 CD F0 07 02 call _NewLine 28 D1:BEA6 - - - - 29 D1:BEA6 CD F0 07 02 call _NewLine 30 D1:BEAA 21 CE BE D1 ld hl, fshcmdINFOfSPS1 31 D1:BEAE CD C0 07 02 call _PutS 32 D1:BEB2 3E 27 - - ld a, $27 33 D1:BEB4 CD B8 07 02 call _PutC 34 D1:BEB8 21 34 A9 D1 ld hl, PS1 35 D1:BEBC CD C0 07 02 call _PutS 36 D1:BEC0 3E 27 - - ld a, $27 37 D1:BEC2 CD B8 07 02 call _PutC 38 D1:BEC6 CD F0 07 02 call _NewLine 39 D1:BECA - - - - 40 D1:BECA C3 DB A8 D1 jp Fin 41 D1:BECE - - - - 42 D1:BECE 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:BED6 - - - - #include "includes/FshCommands/HELP.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/HELP.asm" 1 D1:BED6 48 45 4C 50 00 - - - fshcmdHELP: .db "HELP", 0 2 D1:BEDB 21 00 - - fshcmdHELPo: .dw $0021 3 D1:BEDD 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:BEF3 48 45 4C 50 00 - - - fshcmdHELPu: .db "HELP", 0 5 D1:BEF8 - - - - fshcmdHELPf: 6 D1:BEF8 21 CD EA D0 ld hl, FshCmdArgFlags 7 D1:BEFC CB 46 - - bit 0, (hl) 8 D1:BEFE 28 0C - - jr z, fshcmdHELPfExe 9 D1:BF00 21 EE B3 D1 ld hl, ErrUsageo 10 D1:BF04 CD 59 B3 D1 call ErrSet 11 D1:BF08 CD 0C B3 D1 call ErrCatch 12 D1:BF0C - - - - fshcmdHELPfExe: 13 D1:BF0C 21 F1 BF D1 ld hl, fshcmdHELPfLine1 14 D1:BF10 CD C0 07 02 call _PutS 15 D1:BF14 CD F0 07 02 call _NewLine 16 D1:BF18 - - - - 17 D1:BF18 - - - - #macro fshcmdHELPmRow1(cmdXs) 18 D1:BF18 xor a 19 D1:BF18 ld (curCol), a 20 D1:BF18 ld hl, cmdXs 21 D1:BF18 call _PutS 22 D1:BF18 call _NewLine 23 D1:BF18 #endmacro 24 D1:BF18 - - - - #macro fshcmdHELPmRow2(cmdXs, cmdYs) 25 D1:BF18 xor a 26 D1:BF18 ld (curCol), a 27 D1:BF18 ld hl, cmdXs 28 D1:BF18 call _PutS 29 D1:BF18 ld a, 9 30 D1:BF18 ld (curcol), a 31 D1:BF18 ld hl, cmdYs 32 D1:BF18 call _PutS 33 D1:BF18 call _NewLine 34 D1:BF18 #endmacro 35 D1:BF18 - - - - #macro fshcmdHELPmRow3(cmdXs, cmdYs, cmdZs) 36 D1:BF18 xor a 37 D1:BF18 ld (curCol), a 38 D1:BF18 ld hl, cmdXs 39 D1:BF18 call _PutS 40 D1:BF18 ld a, 9 41 D1:BF18 ld (curcol), a 42 D1:BF18 ld hl, cmdYs 43 D1:BF18 call _PutS 44 D1:BF18 ld a, 19 45 D1:BF18 ld (curcol), a 46 D1:BF18 ld hl, cmdZs 47 D1:BF18 call _PutS 48 D1:BF18 call _NewLine 49 D1:BF18 #endmacro 50 D1:BF18 - - - - 51 D1:BF18 AF 32 96 05 D0 21 6B B9 D1 CD C0 07 02 3E 09 32 96 05 D0 21 85 B9 D1 CD C0 07 02 3E 13 32 96 05 D0 21 7D 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:BF45 AF 32 96 05 D0 21 8C BB D1 CD C0 07 02 3E 09 32 96 05 D0 21 A3 BC D1 CD C0 07 02 3E 13 32 96 05 D0 21 D0 BC D1 CD C0 07 02 CD F0 07 02 - - - fshcmdHELPmRow3(fshcmdMOVE, fshcmdCLS, fshcmdVAR) 53 D1:BF72 AF 32 96 05 D0 21 73 BD D1 CD C0 07 02 3E 09 32 96 05 D0 21 E4 BD D1 CD C0 07 02 3E 13 32 96 05 D0 21 33 BE D1 CD C0 07 02 CD F0 07 02 - - - fshcmdHELPmRow3(fshcmdVARS, fshcmdSLEEP, fshcmdINFO) 54 D1:BF9F AF 32 96 05 D0 21 D6 BE D1 CD C0 07 02 3E 09 32 96 05 D0 21 2A C0 D1 CD C0 07 02 CD F0 07 02 - fshcmdHELPmRow2(fshcmdHELP, fshcmdMAN) 55 D1:BFBE AF 32 96 05 D0 21 4D C3 D1 CD C0 07 02 3E 09 32 96 05 D0 21 03 C7 D1 CD C0 07 02 CD F0 07 02 - fshcmdHELPmRow2(cryptocmdENCRYPT, cryptocmdDECRYPT) 56 D1:BFDD - - - - ; Extention Point 57 D1:BFDD - - - - 58 D1:BFDD CD F0 07 02 call _NewLine 59 D1:BFE1 21 05 C0 D1 ld hl, fshcmdHELPfLine2 60 D1:BFE5 CD C0 07 02 call _PutS 61 D1:BFE9 CD F0 07 02 call _NewLine 62 D1:BFED C3 DB A8 D1 jp Fin 63 D1:BFF1 - - - - 64 D1:BFF1 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:C005 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:C02A - - - - #include "includes/FshCommands/MAN.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/FshCommands/MAN.asm" 1 D1:C02A 4D 41 4E 00 fshcmdMAN: .db "MAN", 0 2 D1:C02E 22 00 - - fshcmdMANo: .dw $0022 3 D1:C030 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:C04E 4D 41 4E 20 3C 63 6F 6D 6D 61 6E 64 3E 00 - - fshcmdMANu: .db "MAN ", 0 5 D1:C05C - - - - fshcmdMANf: 6 D1:C05C - - - - fshcmdMANfCheckArgs: 7 D1:C05C 21 CD EA D0 ld hl, FshCmdArgFlags 8 D1:C060 CB 46 - - bit 0, (hl) 9 D1:C062 28 10 - - jr z, fshcmdMANfArg0Get 10 D1:C064 CB 4E - - bit 1, (hl) 11 D1:C066 28 24 - - jr z, fshcmdMANfExe 12 D1:C068 21 EE B3 D1 ld hl, ErrUsageo 13 D1:C06C CD 59 B3 D1 call ErrSet 14 D1:C070 CD 0C B3 D1 call ErrCatch 15 D1:C074 - - - - fshcmdMANfArg0Get: 16 D1:C074 21 09 C1 D1 ld hl, fshcmdMANfPrompt 17 D1:C078 CD 1D AB D1 call printprompt 18 D1:C07C - - - - 19 D1:C07C 21 A8 EA D0 ld hl, FshCmdArg0 20 D1:C080 11 08 00 00 ld de, FshCmdCmdSize 21 D1:C084 CD A5 AD D1 call inputstr 22 D1:C088 CD F0 07 02 call _NewLine 23 D1:C08C - - - - 24 D1:C08C - - - - fshcmdMANfExe: 25 D1:C08C 21 A8 EA D0 ld hl, FshCmdArg0 26 D1:C090 11 9F EA D0 ld de, FshCmd 27 D1:C094 CD 68 AC D1 call strcpy 28 D1:C098 - - - - 29 D1:C098 21 F8 C0 D1 ld hl, fshcmdMANfPrefix 30 D1:C09C CD C0 07 02 call _PutS 31 D1:C0A0 - - - - 32 D1:C0A0 21 9F EA D0 ld hl, FshCmd 33 D1:C0A4 CD C0 07 02 call _PutS 34 D1:C0A8 CD F0 07 02 call _NewLine 35 D1:C0AC CD F0 07 02 call _NewLine 36 D1:C0B0 - - - - 37 D1:C0B0 21 9F EA D0 ld hl, FshCmd 38 D1:C0B4 CD 48 B6 D1 call manroute 39 D1:C0B8 11 00 00 00 ld de, $00 40 D1:C0BC CD 76 A9 D1 call cpHLDE 41 D1:C0C0 CA E3 A8 D1 jp z, Err 42 D1:C0C4 - - - - 43 D1:C0C4 CD C0 07 02 call _PutS 44 D1:C0C8 CD F0 07 02 call _NewLine 45 D1:C0CC CD F0 07 02 call _NewLine 46 D1:C0D0 - - - - 47 D1:C0D0 21 01 C1 D1 ld hl, fshcmdMANfUsage 48 D1:C0D4 CD C0 07 02 call _PutS 49 D1:C0D8 - - - - 50 D1:C0D8 21 9F EA D0 ld hl, FshCmd 51 D1:C0DC CD 5E B6 D1 call manrouteu 52 D1:C0E0 11 00 00 00 ld de, $00 53 D1:C0E4 CD 76 A9 D1 call cpHLDE 54 D1:C0E8 CA E3 A8 D1 jp z, Err 55 D1:C0EC CD C0 07 02 call _PutS 56 D1:C0F0 CD F0 07 02 call _NewLine 57 D1:C0F4 - - - - 58 D1:C0F4 C3 DB A8 D1 jp Fin 59 D1:C0F8 - - - - 60 D1:C0F8 4D 41 4E 2D 44 42 DF 20 00 - - - fshcmdMANfPrefix: .db "MAN-DB", $DF, ' ', 0 61 D1:C101 55 73 61 67 65 3A 20 00 fshcmdMANfUsage: .db "Usage: ",0 62 D1:C109 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" 50 D1:C113 - - - - #include "includes/CryptoCommands/CryptoCommand.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/CryptoCommand.asm" 1 D1:C113 - - - - cryptocmddecode: 2 D1:C113 E5 D5 11 4D C3 D1 CD 55 AC D1 21 55 C3 D1 D1 CC 4E AA D1 E1 decodecmdopt(cryptocmdENCRYPT, cryptocmdENCRYPTo) Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/CryptoCommand.asm" 3 D1:C127 E5 D5 11 03 C7 D1 CD 55 AC D1 21 0B C7 D1 D1 CC 4E AA D1 E1 decodecmdopt(cryptocmdDECRYPT, cryptocmdDECRYPTo) 4 D1:C13B C9 - - - ret 5 D1:C13C - - - - 6 D1:C13C - - - - cryptocmdroute: 7 D1:C13C C1 - - - pop bc 8 D1:C13D 11 55 C3 D1 CD 5A AA D1 CA C5 C3 D1 routeoptjp(cryptocmdENCRYPTo, cryptocmdENCRYPTf) 9 D1:C149 11 0B C7 D1 CD 5A AA D1 CA 7B C7 D1 routeoptjp(cryptocmdDECRYPTo, cryptocmdDECRYPTf) 10 D1:C155 C5 - - - push bc 11 D1:C156 C9 - - - ret 12 D1:C157 - - - - 13 D1:C157 - - - - cryptocmdmanroute: 14 D1:C157 C1 - - - pop bc 15 D1:C158 E5 11 4D C3 D1 CD 55 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 4E C4 D1 CD 55 AC D1 E1 11 52 C4 D1 CA 5B B6 D1 subroutestrjp(cryptocmdENCRYPT, cryptocmdROT, cryptocmdROTm) 16 D1:C17C E5 11 03 C7 D1 CD 55 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 04 C8 D1 CD 55 AC D1 E1 11 08 C8 D1 CA 5B B6 D1 subroutestrjp(cryptocmdDECRYPT, cryptocmdunROT, cryptocmdunROTm) 17 D1:C1A0 - - - - 18 D1:C1A0 E5 11 4D C3 D1 CD 55 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 5C C5 D1 CD 55 AC D1 E1 11 60 C5 D1 CA 5B B6 D1 subroutestrjp(cryptocmdENCRYPT, cryptocmdXOR, cryptocmdXORm) 19 D1:C1C4 E5 11 03 C7 D1 CD 55 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 0B C9 D1 CD 55 AC D1 E1 11 0F C9 D1 CA 5B B6 D1 subroutestrjp(cryptocmdDECRYPT, cryptocmdunXOR, cryptocmdunXORm) 20 D1:C1E8 - - - - 21 D1:C1E8 E5 11 4D C3 D1 CD 55 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 5B C6 D1 CD 55 AC D1 E1 11 60 C6 D1 CA 5B B6 D1 subroutestrjp(cryptocmdENCRYPT, cryptocmdHELP, cryptocmdHELPm) 22 D1:C20C E5 11 03 C7 D1 CD 55 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 20 CA D1 CD 55 AC D1 E1 11 25 CA D1 CA 5B B6 D1 subroutestrjp(cryptocmdDECRYPT, cryptocmdunHELP, cryptocmdunHELPm) 23 D1:C230 - - - - 24 D1:C230 11 4D C3 D1 CD 55 AC D1 11 57 C3 D1 CA 5B B6 D1 routestrjp(cryptocmdENCRYPT, cryptocmdENCRYPTm) 25 D1:C240 11 03 C7 D1 CD 55 AC D1 11 0D C7 D1 CA 5B B6 D1 routestrjp(cryptocmdDECRYPT, cryptocmdDECRYPTm) 26 D1:C250 - - - - 27 D1:C250 C5 - - - push bc 28 D1:C251 C9 - - - ret 29 D1:C252 - - - - 30 D1:C252 - - - - 31 D1:C252 - - - - cryptocmdmanrouteu: 32 D1:C252 C1 - - - pop bc 33 D1:C253 E5 11 4D C3 D1 CD 55 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 4E C4 D1 CD 55 AC D1 E1 11 89 C4 D1 CA 71 B6 D1 subrouteustrjp(cryptocmdENCRYPT, cryptocmdROT, cryptocmdROTu) 34 D1:C277 E5 11 03 C7 D1 CD 55 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 04 C8 D1 CD 55 AC D1 E1 11 3F C8 D1 CA 71 B6 D1 subrouteustrjp(cryptocmdDECRYPT, cryptocmdunROT, cryptocmdunROTu) 35 D1:C29B - - - - 36 D1:C29B E5 11 4D C3 D1 CD 55 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 5C C5 D1 CD 55 AC D1 E1 11 82 C5 D1 CA 71 B6 D1 subrouteustrjp(cryptocmdENCRYPT, cryptocmdXOR, cryptocmdXORu) 37 D1:C2BF E5 11 03 C7 D1 CD 55 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 0B C9 D1 CD 55 AC D1 E1 11 31 C9 D1 CA 71 B6 D1 subrouteustrjp(cryptocmdDECRYPT, cryptocmdunXOR, cryptocmdunXORu) 38 D1:C2E3 - - - - 39 D1:C2E3 E5 11 4D C3 D1 CD 55 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 5B C6 D1 CD 55 AC D1 E1 11 71 C6 D1 CA 71 B6 D1 subrouteustrjp(cryptocmdENCRYPT, cryptocmdHELP, cryptocmdHELPu) 40 D1:C307 E5 11 03 C7 D1 CD 55 AC D1 21 00 00 00 20 04 21 B1 EA D0 11 20 CA D1 CD 55 AC D1 E1 11 36 CA D1 CA 71 B6 D1 subrouteustrjp(cryptocmdDECRYPT, cryptocmdunHELP, cryptocmdunHELPu) 41 D1:C32B - - - - 42 D1:C32B 11 4D C3 D1 CD 55 AC D1 11 A0 C3 D1 CA 71 B6 D1 routeustrjp(cryptocmdENCRYPT, cryptocmdENCRYPTu) 43 D1:C33B 11 03 C7 D1 CD 55 AC D1 11 56 C7 D1 CA 71 B6 D1 routeustrjp(cryptocmdDECRYPT, cryptocmdDECRYPTu) 44 D1:C34B - - - - 45 D1:C34B C5 - - - push bc 46 D1:C34C C9 - - - ret 47 D1:C34D - - - - 48 D1:C34D - - - - #include "includes/CryptoCommands/CryptoCommands.inc" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/CryptoCommands.inc" 1 D1:C34D - - - - #include "includes/CryptoCommands/ENCRYPT.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/ENCRYPT.asm" 1 D1:C34D 45 4E 43 52 59 50 54 00 cryptocmdENCRYPT: .db "ENCRYPT", 0 2 D1:C355 01 02 - - cryptocmdENCRYPTo: .dw $0201 3 D1:C357 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:C3A0 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:C3C5 - - - - cryptocmdENCRYPTf: 6 D1:C3C5 - - - - cryptocmdENCRYPTfArg0: 7 D1:C3C5 21 CD EA D0 ld hl, FshCmdArgFlags 8 D1:C3C9 CB 46 - - bit 0, (hl) 9 D1:C3CB 28 10 - - jr z, cryptocmdENCRYPTfArg0Get 10 D1:C3CD CB 4E - - bit 1, (hl) 11 D1:C3CF 28 24 - - jr z, cryptocmdENCRYPTfExe 12 D1:C3D1 21 EE B3 D1 ld hl, ErrUsageo 13 D1:C3D5 CD 59 B3 D1 call ErrSet 14 D1:C3D9 CD 0C B3 D1 call ErrCatch 15 D1:C3DD - - - - cryptocmdENCRYPTfArg0Get: 16 D1:C3DD 21 45 C4 D1 ld hl, cryptocmdENCRYPTfSCypher 17 D1:C3E1 CD 1D AB D1 call printprompt 18 D1:C3E5 21 A8 EA D0 ld hl, FshCmdArg0 19 D1:C3E9 11 2C 00 00 ld de, FshCmdInptSize 20 D1:C3ED CD A5 AD D1 call inputstr 21 D1:C3F1 CD F0 07 02 call _NewLine 22 D1:C3F5 - - - - cryptocmdENCRYPTfExe: 23 D1:C3F5 - - - - 24 D1:C3F5 - - - - #macro cryptocmdENCRYPTcmpjp(cmdX, cmdXf) 25 D1:C3F5 ld hl, FshCmdArg0 26 D1:C3F5 ld de, CmdX 27 D1:C3F5 call strcmp 28 D1:C3F5 jp z, cmdXf 29 D1:C3F5 #endmacro 30 D1:C3F5 - - - - 31 D1:C3F5 21 A8 EA D0 11 4E C4 D1 CD 55 AC D1 CA A8 C4 D1 cryptocmdENCRYPTcmpjp(cryptocmdROT, cryptocmdROTf) Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/ENCRYPT.asm" 32 D1:C405 21 A8 EA D0 11 5C C5 D1 CD 55 AC D1 CA 9E C5 D1 cryptocmdENCRYPTcmpjp(cryptocmdXOR, cryptocmdXORf) 33 D1:C415 21 A8 EA D0 11 5B C6 D1 CD 55 AC D1 CA 7E C6 D1 cryptocmdENCRYPTcmpjp(cryptocmdHELP, cryptocmdHELPf) 34 D1:C425 - - - - 35 D1:C425 21 A8 EA D0 ld hl, FshCmdArg0 36 D1:C429 11 9F EA D0 ld de, FshCmd 37 D1:C42D CD 68 AC D1 call strcpy 38 D1:C431 - - - - 39 D1:C431 21 68 B3 D1 ld hl, ErrCmdNotFoundo 40 D1:C435 11 CE EA D0 ld de, FshCmdErrCode 41 D1:C439 CD 46 AA D1 call bytecpy 42 D1:C43D CD 59 B3 D1 call ErrSet 43 D1:C441 C3 E3 A8 D1 jp Err 44 D1:C445 - - - - 45 D1:C445 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:C44E - - - - #include "includes/CryptoCommands/ROT.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/ROT.asm" 1 D1:C44E 52 4F 54 00 cryptocmdROT: .db "ROT", 0 2 D1:C452 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:C489 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:C4A8 - - - - cryptocmdROTf: 5 D1:C4A8 - - - - cryptocmdROTfArg1: 6 D1:C4A8 21 CD EA D0 ld hl, FshCmdArgFlags 7 D1:C4AC CB 5E - - bit 3, (hl) 8 D1:C4AE 20 32 - - jr nz, cryptocmdROTfArg2 9 D1:C4B0 CB 56 - - bit 2, (hl) 10 D1:C4B2 28 0C - - jr z, cryptocmdROTfArg1Get 11 D1:C4B4 21 EE B3 D1 ld hl, ErrUsageo 12 D1:C4B8 CD 59 B3 D1 call ErrSet 13 D1:C4BC CD 0C B3 D1 call ErrCatch 14 D1:C4C0 - - - - cryptocmdROTfArg1Get: 15 D1:C4C0 21 41 C5 D1 ld hl, cryptocmdROTfDShift 16 D1:C4C4 CD 1D AB D1 call printprompt 17 D1:C4C8 21 B1 EA D0 ld hl, FshCmdArg1 18 D1:C4CC 11 03 00 00 ld de, 3 19 D1:C4D0 CD DD AF D1 call inputnumstr 20 D1:C4D4 CD DF AC D1 call strtow 21 D1:C4D8 11 B1 EA D0 ld de, FshCmdArg1 22 D1:C4DC EB - - - ex de, hl 23 D1:C4DD 73 - - - ld (hl), e 24 D1:C4DE CD F0 07 02 call _NewLine 25 D1:C4E2 - - - - cryptocmdROTfArg2: 26 D1:C4E2 21 BA EA D0 ld hl, FshCmdArg2 27 D1:C4E6 11 D1 EA D0 ld de, FshScratch 28 D1:C4EA CD 68 AC D1 call strcpy 29 D1:C4EE 21 CD EA D0 ld hl, FshCmdArgFlags 30 D1:C4F2 CB 66 - - bit 4, (hl) 31 D1:C4F4 28 10 - - jr z, cryptocmdROTfArg2Get 32 D1:C4F6 CB 6E - - bit 5, (hl) 33 D1:C4F8 28 24 - - jr z, cryptocmdROTfExe 34 D1:C4FA 21 EE B3 D1 ld hl, ErrUsageo 35 D1:C4FE CD 59 B3 D1 call ErrSet 36 D1:C502 CD 0C B3 D1 call ErrCatch 37 D1:C506 - - - - cryptocmdROTfArg2Get: 38 D1:C506 21 49 C5 D1 ld hl, cryptocmdROTfDMessage 39 D1:C50A CD 1D AB D1 call printprompt 40 D1:C50E 21 D1 EA D0 ld hl, FshScratch 41 D1:C512 11 10 00 00 ld de, FshScratchSize - 4 42 D1:C516 CD C9 AE D1 call inputcharstr 43 D1:C51A CD F0 07 02 call _NewLine 44 D1:C51E - - - - cryptocmdROTfExe: 45 D1:C51E 21 B1 EA D0 ld hl, FshCmdArg1 46 D1:C522 7E - - - ld a, (hl) 47 D1:C523 21 D1 EA D0 ld hl, FshScratch 48 D1:C527 CD 57 B5 D1 call rotletencrypt 49 D1:C52B E5 - - - push hl 50 D1:C52C 21 53 C5 D1 ld hl, cryptocmdROTfDResult 51 D1:C530 CD C0 07 02 call _PutS 52 D1:C534 E1 - - - pop hl 53 D1:C535 CD C0 07 02 call _PutS 54 D1:C539 CD F0 07 02 call _NewLine 55 D1:C53D C3 DB A8 D1 jp Fin 56 D1:C541 - - - - 57 D1:C541 53 68 69 66 74 3D 20 00 cryptocmdROTfDShift: .db "Shift= ", 0 58 D1:C549 4D 65 73 73 61 67 65 3D 20 00 - - cryptocmdROTfDMessage: .db "Message= ", 0 59 D1:C553 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:C55C - - - - #include "includes/CryptoCommands/XOR.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/XOR.asm" 1 D1:C55C 58 4F 52 00 cryptocmdXOR: .db "XOR", 0 2 D1:C560 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:C582 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:C59E - - - - cryptocmdXORf: 5 D1:C59E - - - - cryptocmdXORfArg1: 6 D1:C59E 21 CD EA D0 ld hl, FshCmdArgFlags 7 D1:C5A2 CB 56 - - bit 2, (hl) 8 D1:C5A4 28 10 - - jr z, cryptocmdXORfArg1Get 9 D1:C5A6 CB 5E - - bit 3, (hl) 10 D1:C5A8 28 24 - - jr z, cryptocmdXORfArg2 11 D1:C5AA 21 EE B3 D1 ld hl, ErrUsageo 12 D1:C5AE CD 59 B3 D1 call ErrSet 13 D1:C5B2 CD 0C B3 D1 call ErrCatch 14 D1:C5B6 - - - - cryptocmdXORfArg1Get: 15 D1:C5B6 21 42 C6 D1 ld hl, cryptocmdXORfDKey 16 D1:C5BA CD 1D AB D1 call printprompt 17 D1:C5BE 21 B1 EA D0 ld hl, FshCmdArg1 18 D1:C5C2 11 08 00 00 ld de, FshCmdCmdSize 19 D1:C5C6 CD A5 AD D1 call inputstr 20 D1:C5CA CD F0 07 02 call _NewLine 21 D1:C5CE - - - - cryptocmdXORfArg2: 22 D1:C5CE 21 BA EA D0 ld hl, FshCmdArg2 23 D1:C5D2 11 D1 EA D0 ld de, FshScratch 24 D1:C5D6 CD 68 AC D1 call strcpy 25 D1:C5DA 21 CD EA D0 ld hl, FshCmdArgFlags 26 D1:C5DE CB 66 - - bit 4, (hl) 27 D1:C5E0 28 10 - - jr z, cryptocmdXORfArg2Get 28 D1:C5E2 CB 6E - - bit 5, (hl) 29 D1:C5E4 28 24 - - jr z, cryptocmdXORfExe 30 D1:C5E6 21 EE B3 D1 ld hl, ErrUsageo 31 D1:C5EA CD 59 B3 D1 call ErrSet 32 D1:C5EE CD 0C B3 D1 call ErrCatch 33 D1:C5F2 - - - - cryptocmdXORfArg2Get: 34 D1:C5F2 21 48 C6 D1 ld hl, cryptocmdXORfDMessage 35 D1:C5F6 CD 1D AB D1 call printprompt 36 D1:C5FA 21 D1 EA D0 ld hl, FshScratch 37 D1:C5FE 11 09 00 00 ld de, FshScratchSize - 1 / 2 38 D1:C602 CD C9 AE D1 call inputcharstr 39 D1:C606 CD F0 07 02 call _NewLine 40 D1:C60A - - - - cryptocmdXORfExe: 41 D1:C60A 21 D1 EA D0 ld hl, FshScratch 42 D1:C60E 11 B1 EA D0 ld de, FshCmdArg1 43 D1:C612 CD E5 B5 D1 call xorcrypt 44 D1:C616 21 52 C6 D1 ld hl, cryptocmdXORfDResult 45 D1:C61A CD C0 07 02 call _PutS 46 D1:C61E 21 D1 EA D0 ld hl, FshScratch 47 D1:C622 - - - - cryptocmdXORfPrint: 48 D1:C622 7E - - - ld a, (hl) 49 D1:C623 B7 - - - or a, a 50 D1:C624 28 14 - - jr z, cryptocmdXORfPrintEnd 51 D1:C626 E5 - - - push hl 52 D1:C627 CD BE AB D1 call bytetohexstr 53 D1:C62B 7E - - - ld a, (hl) 54 D1:C62C CD B8 07 02 call _PutC 55 D1:C630 23 - - - inc hl 56 D1:C631 7E - - - ld a, (hl) 57 D1:C632 CD B8 07 02 call _PutC 58 D1:C636 E1 - - - pop hl 59 D1:C637 23 - - - inc hl 60 D1:C638 18 E8 - - jr cryptocmdXORfPrint 61 D1:C63A - - - - cryptocmdXORfPrintEnd: 62 D1:C63A CD F0 07 02 call _NewLine 63 D1:C63E C3 DB A8 D1 jp Fin 64 D1:C642 - - - - 65 D1:C642 4B 65 79 3D 20 00 - - cryptocmdXORfDKey: .db "Key= ", 0 66 D1:C648 4D 65 73 73 61 67 65 3D 20 00 - - cryptocmdXORfDMessage: .db "Message= ", 0 67 D1:C652 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:C65B - - - - #include "includes/CryptoCommands/HELP.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/HELP.asm" 1 D1:C65B 48 45 4C 50 00 - - - cryptocmdHELP: .db "HELP", 0 2 D1:C660 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:C671 45 4E 43 52 59 50 54 20 48 45 4C 50 00 - - - cryptocmdHELPu: .db "ENCRYPT HELP", 0 4 D1:C67E - - - - cryptocmdHELPf: 5 D1:C67E 21 CD EA D0 ld hl, FshCmdArgFlags 6 D1:C682 CB 56 - - bit 2, (hl) 7 D1:C684 28 0C - - jr z, cryptocmdHELPfExe 8 D1:C686 21 EE B3 D1 ld hl, ErrUsageo 9 D1:C68A CD 59 B3 D1 call ErrSet 10 D1:C68E CD 0C B3 D1 call ErrCatch 11 D1:C692 - - - - cryptocmdHELPfExe: 12 D1:C692 21 F0 C6 D1 ld hl, cryptocmdHELPfLine1 13 D1:C696 CD C0 07 02 call _PutS 14 D1:C69A CD F0 07 02 call _NewLine 15 D1:C69E - - - - 16 D1:C69E - - - - #macro cryptocmdHELPmRow1(cmdXs) 17 D1:C69E xor a 18 D1:C69E ld (curCol), a 19 D1:C69E ld hl, cmdXs 20 D1:C69E call _PutS 21 D1:C69E call _NewLine 22 D1:C69E #endmacro 23 D1:C69E - - - - #macro cryptocmdHELPmRowU(cmdXs, cmdXu) 24 D1:C69E xor a 25 D1:C69E ld (curCol), a 26 D1:C69E ld hl, cmdXs 27 D1:C69E call _PutS 28 D1:C69E ld a, ':' 29 D1:C69E call _PutC 30 D1:C69E ld a, ' ' 31 D1:C69E call _PutC 32 D1:C69E ld hl, cmdXu 33 D1:C69E call _PutS 34 D1:C69E call _NewLine 35 D1:C69E #endmacro 36 D1:C69E - - - - #macro cryptocmdHELPmRow2(cmdXs, cmdYs) 37 D1:C69E xor a 38 D1:C69E ld (curCol), a 39 D1:C69E ld hl, cmdXs 40 D1:C69E call _PutS 41 D1:C69E ld a, 9 42 D1:C69E ld (curcol), a 43 D1:C69E ld hl, cmdYs 44 D1:C69E call _PutS 45 D1:C69E call _NewLine 46 D1:C69E #endmacro 47 D1:C69E - - - - #macro cryptocmdHELPmRow3(cmdXs, cmdYs, cmdZs) 48 D1:C69E xor a 49 D1:C69E ld (curCol), a 50 D1:C69E ld hl, cmdXs 51 D1:C69E call _PutS 52 D1:C69E ld a, 9 53 D1:C69E ld (curcol), a 54 D1:C69E ld hl, cmdYs 55 D1:C69E call _PutS 56 D1:C69E ld a, 19 57 D1:C69E ld (curcol), a 58 D1:C69E ld hl, cmdZs 59 D1:C69E call _PutS 60 D1:C69E call _NewLine 61 D1:C69E #endmacro 62 D1:C69E - - - - 63 D1:C69E AF 32 96 05 D0 21 4E C4 D1 CD C0 07 02 3E 3A CD B8 07 02 3E 20 CD B8 07 02 21 89 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:C6C3 AF 32 96 05 D0 21 5C C5 D1 CD C0 07 02 3E 3A CD B8 07 02 3E 20 CD B8 07 02 21 82 C5 D1 CD C0 07 02 CD F0 07 02 - - - cryptocmdHELPmRowU(cryptocmdXOR, cryptocmdXORu) 65 D1:C6E8 - - - - 66 D1:C6E8 CD F0 07 02 call _NewLine 67 D1:C6EC C3 DB A8 D1 jp Fin 68 D1:C6F0 - - - - 69 D1:C6F0 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:C703 - - - - 6 D1:C703 - - - - #include "includes/CryptoCommands/DECRYPT.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/DECRYPT.asm" 1 D1:C703 44 45 43 52 59 50 54 00 cryptocmdDECRYPT: .db "DECRYPT", 0 2 D1:C70B 02 02 - - cryptocmdDECRYPTo: .dw $0202 3 D1:C70D 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:C756 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:C77B - - - - cryptocmdDECRYPTf: 6 D1:C77B - - - - cryptocmdDECRYPTfArg0: 7 D1:C77B 21 CD EA D0 ld hl, FshCmdArgFlags 8 D1:C77F CB 46 - - bit 0, (hl) 9 D1:C781 28 10 - - jr z, cryptocmdDECRYPTfArg0Get 10 D1:C783 CB 4E - - bit 1, (hl) 11 D1:C785 28 24 - - jr z, cryptocmdDECRYPTfExe 12 D1:C787 21 EE B3 D1 ld hl, ErrUsageo 13 D1:C78B CD 59 B3 D1 call ErrSet 14 D1:C78F CD 0C B3 D1 call ErrCatch 15 D1:C793 - - - - cryptocmdDECRYPTfArg0Get: 16 D1:C793 21 FB C7 D1 ld hl, cryptocmdDECRYPTfSCypher 17 D1:C797 CD 1D AB D1 call printprompt 18 D1:C79B 21 A8 EA D0 ld hl, FshCmdArg0 19 D1:C79F 11 2C 00 00 ld de, FshCmdInptSize 20 D1:C7A3 CD A5 AD D1 call inputstr 21 D1:C7A7 CD F0 07 02 call _NewLine 22 D1:C7AB - - - - cryptocmdDECRYPTfExe: 23 D1:C7AB - - - - 24 D1:C7AB - - - - #macro cryptocmdDECRYPTcmpjp(cmdX, cmdXf) 25 D1:C7AB ld hl, FshCmdArg0 26 D1:C7AB ld de, CmdX 27 D1:C7AB call strcmp 28 D1:C7AB jp z, cmdXf 29 D1:C7AB #endmacro 30 D1:C7AB - - - - 31 D1:C7AB 21 A8 EA D0 11 04 C8 D1 CD 55 AC D1 CA 54 C8 D1 cryptocmdDECRYPTcmpjp(cryptocmdunROT, cryptocmdunROTf) Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/DECRYPT.asm" 32 D1:C7BB 21 A8 EA D0 11 0B C9 D1 CD 55 AC D1 CA 43 C9 D1 cryptocmdDECRYPTcmpjp(cryptocmdunXOR, cryptocmdunXORf) 33 D1:C7CB 21 A8 EA D0 11 20 CA D1 CD 55 AC D1 CA 43 CA D1 cryptocmdDECRYPTcmpjp(cryptocmdunHELP, cryptocmdunHELPf) 34 D1:C7DB - - - - 35 D1:C7DB 21 A8 EA D0 ld hl, FshCmdArg0 36 D1:C7DF 11 9F EA D0 ld de, FshCmd 37 D1:C7E3 CD 68 AC D1 call strcpy 38 D1:C7E7 - - - - 39 D1:C7E7 21 68 B3 D1 ld hl, ErrCmdNotFoundo 40 D1:C7EB 11 CE EA D0 ld de, FshCmdErrCode 41 D1:C7EF CD 46 AA D1 call bytecpy 42 D1:C7F3 CD 59 B3 D1 call ErrSet 43 D1:C7F7 C3 E3 A8 D1 jp Err 44 D1:C7FB - - - - 45 D1:C7FB 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:C804 - - - - #include "includes/CryptoCommands/unROT.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/unROT.asm" 1 D1:C804 52 4F 54 00 cryptocmdunROT: .db "ROT", 0 2 D1:C808 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:C83F 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:C854 - - - - cryptocmdunROTf: 5 D1:C854 - - - - cryptocmdunROTfArg1: 6 D1:C854 21 CD EA D0 ld hl, FshCmdArgFlags 7 D1:C858 CB 5E - - bit 3, (hl) 8 D1:C85A 20 32 - - jr nz, cryptocmdunROTfArg2 9 D1:C85C CB 56 - - bit 2, (hl) 10 D1:C85E 28 0C - - jr z, cryptocmdunROTfArg1Get 11 D1:C860 21 EE B3 D1 ld hl, ErrUsageo 12 D1:C864 CD 59 B3 D1 call ErrSet 13 D1:C868 CD 0C B3 D1 call ErrCatch 14 D1:C86C - - - - cryptocmdunROTfArg1Get: 15 D1:C86C 21 ED C8 D1 ld hl, cryptocmdunROTfDShift 16 D1:C870 CD 1D AB D1 call printprompt 17 D1:C874 21 B1 EA D0 ld hl, FshCmdArg1 18 D1:C878 11 03 00 00 ld de, 3 19 D1:C87C CD DD AF D1 call inputnumstr 20 D1:C880 CD DF AC D1 call strtow 21 D1:C884 11 B1 EA D0 ld de, FshCmdArg1 22 D1:C888 EB - - - ex de, hl 23 D1:C889 73 - - - ld (hl), e 24 D1:C88A CD F0 07 02 call _NewLine 25 D1:C88E - - - - cryptocmdunROTfArg2: 26 D1:C88E 21 BA EA D0 ld hl, FshCmdArg2 27 D1:C892 11 D1 EA D0 ld de, FshScratch 28 D1:C896 CD 68 AC D1 call strcpy 29 D1:C89A 21 CD EA D0 ld hl, FshCmdArgFlags 30 D1:C89E CB 66 - - bit 4, (hl) 31 D1:C8A0 28 10 - - jr z, cryptocmdunROTfArg2Get 32 D1:C8A2 CB 6E - - bit 5, (hl) 33 D1:C8A4 28 24 - - jr z, cryptocmdunROTfExe 34 D1:C8A6 21 EE B3 D1 ld hl, ErrUsageo 35 D1:C8AA CD 59 B3 D1 call ErrSet 36 D1:C8AE CD 0C B3 D1 call ErrCatch 37 D1:C8B2 - - - - cryptocmdunROTfArg2Get: 38 D1:C8B2 21 F5 C8 D1 ld hl, cryptocmdunROTfDMessage 39 D1:C8B6 CD 1D AB D1 call printprompt 40 D1:C8BA 21 D1 EA D0 ld hl, FshScratch 41 D1:C8BE 11 10 00 00 ld de, FshScratchSize - 4 42 D1:C8C2 CD C9 AE D1 call inputcharstr 43 D1:C8C6 CD F0 07 02 call _NewLine 44 D1:C8CA - - - - cryptocmdunROTfExe: 45 D1:C8CA 21 B1 EA D0 ld hl, FshCmdArg1 46 D1:C8CE 7E - - - ld a, (hl) 47 D1:C8CF 21 D1 EA D0 ld hl, FshScratch 48 D1:C8D3 CD 7C B5 D1 call rotletdecrypt 49 D1:C8D7 E5 - - - push hl 50 D1:C8D8 21 02 C9 D1 ld hl, cryptocmdunROTfDResult 51 D1:C8DC CD C0 07 02 call _PutS 52 D1:C8E0 E1 - - - pop hl 53 D1:C8E1 CD C0 07 02 call _PutS 54 D1:C8E5 CD F0 07 02 call _NewLine 55 D1:C8E9 C3 DB A8 D1 jp Fin 56 D1:C8ED - - - - 57 D1:C8ED 53 68 69 66 74 3D 20 00 cryptocmdunROTfDShift: .db "Shift= ", 0 58 D1:C8F5 43 79 70 68 65 72 54 65 78 74 3D 20 00 - - - cryptocmdunROTfDMessage: .db "CypherText= ", 0 59 D1:C902 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:C90B - - - - #include "includes/CryptoCommands/unXOR.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/unXOR.asm" 1 D1:C90B 58 4F 52 00 cryptocmdunXOR: .db "XOR", 0 2 D1:C90F 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:C931 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:C943 - - - - cryptocmdunXORf: 5 D1:C943 - - - - cryptocmdunXORfArg1: 6 D1:C943 21 CD EA D0 ld hl, FshCmdArgFlags 7 D1:C947 CB 56 - - bit 2, (hl) 8 D1:C949 28 10 - - jr z, cryptocmdunXORfArg1Get 9 D1:C94B CB 5E - - bit 3, (hl) 10 D1:C94D 28 24 - - jr z, cryptocmdunXORfArg2 11 D1:C94F 21 EE B3 D1 ld hl, ErrUsageo 12 D1:C953 CD 59 B3 D1 call ErrSet 13 D1:C957 CD 0C B3 D1 call ErrCatch 14 D1:C95B - - - - cryptocmdunXORfArg1Get: 15 D1:C95B 21 F0 C9 D1 ld hl, cryptocmdunXORfDKey 16 D1:C95F CD 1D AB D1 call printprompt 17 D1:C963 21 B1 EA D0 ld hl, FshCmdArg1 18 D1:C967 11 08 00 00 ld de, FshCmdCmdSize 19 D1:C96B CD A5 AD D1 call inputstr 20 D1:C96F CD F0 07 02 call _NewLine 21 D1:C973 - - - - cryptocmdunXORfArg2: 22 D1:C973 21 BA EA D0 ld hl, FshCmdArg2 23 D1:C977 11 D1 EA D0 ld de, FshScratch 24 D1:C97B CD 68 AC D1 call strcpy 25 D1:C97F 21 CD EA D0 ld hl, FshCmdArgFlags 26 D1:C983 CB 66 - - bit 4, (hl) 27 D1:C985 20 45 - - jr nz, cryptocmdunXORfExe 28 D1:C987 - - - - cryptocmdunXORfArg2Get: 29 D1:C987 21 10 CA D1 ld hl, cryptocmdunXORfStringPBuffer 30 D1:C98B 06 0F - - ld b, $0F 31 D1:C98D 3E 00 - - ld a, $00 32 D1:C98F CD 67 AA D1 call memset 33 D1:C993 21 F6 C9 D1 ld hl, cryptocmdunXORfDMessage 34 D1:C997 CD 1D AB D1 call printprompt 35 D1:C99B 21 D1 EA D0 ld hl, FshScratch 36 D1:C99F 11 10 00 00 ld de, FshScratchSize - 4 37 D1:C9A3 CD A5 AD D1 call inputstr 38 D1:C9A7 01 10 CA D1 ld bc, cryptocmdunXORfStringPBuffer 39 D1:C9AB - - - - cryptocmdunXORfArg2GetLoop: 40 D1:C9AB 7E - - - ld a, (hl) 41 D1:C9AC B7 - - - or a, a 42 D1:C9AD 28 19 - - jr z, cryptocmdunXORfArg2GetLoopEnd 43 D1:C9AF 32 0C CA D1 ld (cryptocmdunXORfStringBuffer), a 44 D1:C9B3 23 - - - inc hl 45 D1:C9B4 7E - - - ld a, (hl) 46 D1:C9B5 32 0D CA D1 ld (cryptocmdunXORfStringBuffer + 1), a 47 D1:C9B9 E5 - - - push hl 48 D1:C9BA 21 0C CA D1 ld hl, cryptocmdunXORfStringBuffer 49 D1:C9BE CD 18 AC D1 call hexToA 50 D1:C9C2 E1 - - - pop hl 51 D1:C9C3 02 - - - ld (bc), a 52 D1:C9C4 23 - - - inc hl 53 D1:C9C5 03 - - - inc bc 54 D1:C9C6 18 E3 - - jr cryptocmdunXORfArg2GetLoop 55 D1:C9C8 - - - - cryptocmdunXORfArg2GetLoopEnd: 56 D1:C9C8 CD F0 07 02 call _NewLine 57 D1:C9CC - - - - cryptocmdunXORfExe: 58 D1:C9CC 21 10 CA D1 ld hl, cryptocmdunXORfStringPBuffer 59 D1:C9D0 11 B1 EA D0 ld de, FshCmdArg1 60 D1:C9D4 CD E5 B5 D1 call xorcrypt 61 D1:C9D8 21 03 CA D1 ld hl, cryptocmdunXORfDResult 62 D1:C9DC CD C0 07 02 call _PutS 63 D1:C9E0 21 10 CA D1 ld hl, cryptocmdunXORfStringPBuffer 64 D1:C9E4 CD C0 07 02 call _PutS 65 D1:C9E8 CD F0 07 02 call _NewLine 66 D1:C9EC C3 DB A8 D1 jp Fin 67 D1:C9F0 - - - - 68 D1:C9F0 4B 65 79 3D 20 00 - - cryptocmdunXORfDKey: .db "Key= ", 0 69 D1:C9F6 43 79 70 68 65 72 54 65 78 74 3D 20 00 - - - cryptocmdunXORfDMessage: .db "CypherText= ", 0 70 D1:CA03 52 65 73 75 6C 74 3A 20 00 - - - cryptocmdunXORfDResult: .db "Result: ", 0 71 D1:CA0C 00 00 00 00 cryptocmdunXORfStringBuffer: .db $00, $00, $00, $00 72 D1:CA10 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:CA20 - - - - #include "includes/CryptoCommands/unHELP.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/CryptoCommands/unHELP.asm" 1 D1:CA20 48 45 4C 50 00 - - - cryptocmdunHELP: .db "HELP", 0 2 D1:CA25 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:CA36 44 45 43 52 59 50 54 20 48 45 4C 50 00 - - - cryptocmdunHELPu: .db "DECRYPT HELP", 0 4 D1:CA43 - - - - cryptocmdunHELPf: 5 D1:CA43 21 CD EA D0 ld hl, FshCmdArgFlags 6 D1:CA47 CB 56 - - bit 2, (hl) 7 D1:CA49 28 0C - - jr z, cryptocmdunHELPfExe 8 D1:CA4B 21 EE B3 D1 ld hl, ErrUsageo 9 D1:CA4F CD 59 B3 D1 call ErrSet 10 D1:CA53 CD 0C B3 D1 call ErrCatch 11 D1:CA57 - - - - cryptocmdunHELPfExe: 12 D1:CA57 21 B5 CA D1 ld hl, cryptocmdunHELPfLine1 13 D1:CA5B CD C0 07 02 call _PutS 14 D1:CA5F CD F0 07 02 call _NewLine 15 D1:CA63 - - - - 16 D1:CA63 - - - - #macro cryptocmdunHELPmRow1(cmdXs) 17 D1:CA63 xor a 18 D1:CA63 ld (curCol), a 19 D1:CA63 ld hl, cmdXs 20 D1:CA63 call _PutS 21 D1:CA63 call _NewLine 22 D1:CA63 #endmacro 23 D1:CA63 - - - - #macro cryptocmdunHELPmRowU(cmdXs, cmdXu) 24 D1:CA63 xor a 25 D1:CA63 ld (curCol), a 26 D1:CA63 ld hl, cmdXs 27 D1:CA63 call _PutS 28 D1:CA63 ld a, ':' 29 D1:CA63 call _PutC 30 D1:CA63 ld a, ' ' 31 D1:CA63 call _PutC 32 D1:CA63 ld hl, cmdXu 33 D1:CA63 call _PutS 34 D1:CA63 call _NewLine 35 D1:CA63 #endmacro 36 D1:CA63 - - - - #macro cryptocmdunHELPmRow2(cmdXs, cmdYs) 37 D1:CA63 xor a 38 D1:CA63 ld (curCol), a 39 D1:CA63 ld hl, cmdXs 40 D1:CA63 call _PutS 41 D1:CA63 ld a, 9 42 D1:CA63 ld (curcol), a 43 D1:CA63 ld hl, cmdYs 44 D1:CA63 call _PutS 45 D1:CA63 call _NewLine 46 D1:CA63 #endmacro 47 D1:CA63 - - - - #macro cryptocmdunHELPmRow3(cmdXs, cmdYs, cmdZs) 48 D1:CA63 xor a 49 D1:CA63 ld (curCol), a 50 D1:CA63 ld hl, cmdXs 51 D1:CA63 call _PutS 52 D1:CA63 ld a, 9 53 D1:CA63 ld (curcol), a 54 D1:CA63 ld hl, cmdYs 55 D1:CA63 call _PutS 56 D1:CA63 ld a, 19 57 D1:CA63 ld (curcol), a 58 D1:CA63 ld hl, cmdZs 59 D1:CA63 call _PutS 60 D1:CA63 call _NewLine 61 D1:CA63 #endmacro 62 D1:CA63 - - - - 63 D1:CA63 AF 32 96 05 D0 21 04 C8 D1 CD C0 07 02 3E 3A CD B8 07 02 3E 20 CD B8 07 02 21 3F 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:CA88 AF 32 96 05 D0 21 0B C9 D1 CD C0 07 02 3E 3A CD B8 07 02 3E 20 CD B8 07 02 21 31 C9 D1 CD C0 07 02 CD F0 07 02 - - - cryptocmdunHELPmRowU(cryptocmdunXOR, cryptocmdunXORu) 65 D1:CAAD - - - - 66 D1:CAAD CD F0 07 02 call _NewLine 67 D1:CAB1 C3 DB A8 D1 jp Fin 68 D1:CAB5 - - - - 69 D1:CAB5 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" 51 D1:CAC8 - - - - #include "includes/PrgmCommands/PrgmCommand.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/PrgmCommands/PrgmCommand.asm" 1 D1:CAC8 - - - - prgmcmddecode: 2 D1:CAC8 - - - - ;decodecmdopt(prgmcmdPRGM, prgmcmdPRGMo) 3 D1:CAC8 C9 - - - ret 4 D1:CAC9 - - - - 5 D1:CAC9 - - - - prgmcmdroute: 6 D1:CAC9 C1 - - - pop bc 7 D1:CACA - - - - ;routeoptjp(prgmcmdPRGMo, prgmcmdPRGMf) 8 D1:CACA C5 - - - push bc 9 D1:CACB C9 - - - ret 10 D1:CACC - - - - 11 D1:CACC - - - - prgmcmdmanroute: 12 D1:CACC C1 - - - pop bc 13 D1:CACD - - - - ;routestrjp(prgmcmdPRGM, prgmcmdPRGMm) 14 D1:CACD C5 - - - push bc 15 D1:CACE C9 - - - ret 16 D1:CACF - - - - 17 D1:CACF - - - - 18 D1:CACF - - - - prgmcmdmanrouteu: 19 D1:CACF C1 - - - pop bc 20 D1:CAD0 - - - - ;routeustrjp(prgmcmdPRGM, prgmcmdPRGMu) 21 D1:CAD0 C5 - - - push bc 22 D1:CAD1 C9 - - - ret 23 D1:CAD2 - - - - 24 D1:CAD2 - - - - #include "includes/PrgmCommands/PrgmCommands.inc" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/PrgmCommands/PrgmCommands.inc" 1 D1:CAD2 - - - - #include "includes/PrgmCommands/PRGM.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/PrgmCommands/PRGM.asm" 1 D1:CAD2 50 52 47 4D 00 - - - prgmcmdPRGM: .db "PRGM", 0 2 D1:CAD7 00 01 - - prgmcmdPRGMo: .dw $0100 3 D1:CAD9 68 65 6C 70 00 - - - prgmcmdPRGMm: .db "help", 0 4 D1:CADE 50 52 47 4D 00 - - - prgmcmdPRGMu: .db "PRGM", 0 5 D1:CAE3 - - - - prgmcmdPRGMf: 6 D1:CAE3 - - - - 7 D1:CAE3 21 EF CA D1 ld hl, prgmcmdPRGMSprgm 8 D1:CAE7 CD 20 03 02 call _Mov9ToOP1 9 D1:CAEB - - - - 10 D1:CAEB CD 30 B5 D1 call prgmasm 11 D1:CAEF - - - - 12 D1:CAEF 05 43 48 41 52 00 - - prgmcmdPRGMSprgm: .db ProgObj, "CHAR", 0 Listing for file "/home/pi/Documents/asm/fsh-shell/includes/PrgmCommands/PrgmCommands.inc" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/PrgmCommands/PrgmCommand.asm" Listing for file "/home/pi/Documents/asm/fsh-shell/includes/Command.asm" Listing for file "FSHa.asm" 77 D1:CAF5 - - - - 78 D1:CAF5 45 4E 44 46 53 48 41 - .db "ENDFSHA" 79 D1:CAFC - - - - 80 D1:CAFC - - - - .end