i no work

This commit is contained in:
Stephen Toth 2018-07-18 13:43:36 -04:00
parent c55af400e4
commit 46b083a251
10 changed files with 3976 additions and 3769 deletions

View File

@ -15,6 +15,8 @@ Setup:
CALL fshvarreset
call prgminstallload
CALL drawstatusbar
CALL printmotd

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -19,6 +19,7 @@ commanddecode:
call fshcmddecode
call cryptocmddecode
call prgmcmddecode
;Extention Point
ret
@ -36,6 +37,7 @@ commandroute:
call fshcmdroute
call cryptocmdroute
call prgmcmdroute
;Extention Point
ld hl, ErrCmdNotFoundo
@ -46,3 +48,4 @@ commandroute:
#include "includes/FshCommands/FshCommand.asm"
#include "includes/CryptoCommands/CryptoCommand.asm"
#include "includes/PrgmCommands/PrgmCommand.asm"

View File

@ -0,0 +1,13 @@
prgmcmdPRGM: .db "PRGM", 0
prgmcmdPRGMo: .dw $0100
prgmcmdPRGMm: .db "help", 0
prgmcmdPRGMu: .db "PRGM", 0
prgmcmdPRGMf:
ld hl, prgmcmdPRGMSprgm
ld de, OP1
call strcpy
call prgmasm
prgmcmdPRGMSprgm: .db "NOS1", 0

View File

@ -0,0 +1,24 @@
prgmcmddecode:
decodecmdopt(prgmcmdPRGM, prgmcmdPRGMo)
ret
prgmcmdroute:
pop bc
routeoptjp(prgmcmdPRGMo, prgmcmdPRGMf)
push bc
ret
prgmcmdmanroute:
pop bc
routestrjp(prgmcmdPRGM, prgmcmdPRGMm)
push bc
ret
prgmcmdmanrouteu:
pop bc
routeustrjp(prgmcmdPRGM, prgmcmdPRGMu)
push bc
ret
#include "includes/PrgmCommands/PrgmCommands.inc"

View File

@ -0,0 +1 @@
#include "includes/PrgmCommands/PRGM.asm"

View File

@ -1,4 +1,5 @@
;STRINGS -------------------------
Fsh: .db "FSHA", 0
FshName: .db "Fsh SHell", 0
FshBy: .db "By pixiys", 0
FshSite: .db "stephenltoth.com/fsh-shell", 0

View File

@ -1,31 +1,78 @@
#define prgmloadersize prgmloaderend - prgmloader
#define prgmunloadersize prgmunloaderend - prgmunloader
prgmloaderloc equ SafeSScreen
prgmunloaderloc equ SafeSScreen + prgmloadersize
prgmbasic:
prgmasm:
call _ClrTxtShdw
call _HomeUp
call _RunIndicOn
call _APDSetup
call _EnableAPD
;jp prgmloaderloc
call _clrtxtshdw
call _homeup
call _runindicon
call _apdsetup
call _enableapd
jp prgmloaderloc
prgmloader:
;load prgm to userMem
;ld hl, prgmunloaderloc
;push hl
set appAutoScroll,(iy + appflags)
jp userMem
call prgm_to_usermem
ld hl, prgmunloaderloc
push hl
set appautoscroll,(iy + appflags)
jp usermem
prgmloaderend:
#define prgmloadersize prgmloaderend - prgmloader
prgmunloader:
;ld FSHA to userMem
call _RunIndicOff
ld hl, fsh
ld de, op1
call strcpy
call prgm_to_usermem
call _runindicoff
jp Fin
prgmunloaderend:
#define prgmunloadersize prgmunloaderend - prgmunloader
prgminstallload:
ld hl, prgmloader
ld de, prgmloaderloc
ld bc, prgmloadersize
ldir
ld hl, prgmunloader
ld de, prgmunloaderloc
ld bc, prgmunloadersize
ldir
ret
prgm_to_usermem:
ld a,$9 ; 'add hl,bc'
ld (prgm_to_usermem.smc),a
call _ChkFindSym
call _ChkInRam
ex de,hl
jr z, prgm_to_usermem.in_ram
xor a,a
ld (prgm_to_usermem.smc),a
ld de,9
add hl,de
ld e,(hl)
add hl,de
inc hl
prgm_to_usermem.in_ram: ; hl -> size bytes
call _LoadDEInd_s
inc hl
inc hl ; bypass tExtTok, tAsm84CECmp
push hl
push de
ex de,hl
call _ErrNotEnoughMem ; check and see if we have enough memory
pop hl
ld (asm_prgm_size),hl ; store the size of the program
ld de,userMem
push de
call _InsertMem ; insert memory into usermem
pop de
pop hl ; hl -> start of program
ld bc,(asm_prgm_size) ; load size of current program
prgm_to_usermem.smc equ $
add hl,bc ; if not in ram smc it so it doesn't execute
ldir ; copy the program to userMem
ret ; return

View File

@ -25,6 +25,6 @@ FshCmdErrCode equ FshCmdArgFlags + 1
FshCmdOP equ FshCmdErrCode + 1
FshScratch equ FshCmdOP + 2
SafeSScreen equ FshVarsSize + FshCmdInptSize + FshPrgmSize + 10
SafeSScreen equ RanVars + FshVarsSize + FshCmdInptSize + FshPrgmSize + 10
.list