This commit is contained in:
Stephen Toth 2018-07-18 15:53:34 -04:00
parent 46b083a251
commit f993fb057f
4 changed files with 1828 additions and 1790 deletions

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

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

View File

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