This commit is contained in:
Stephen Toth 2018-07-23 00:39:26 -04:00
parent f3125cb4c5
commit ac3b80cbb1
6 changed files with 1903 additions and 1851 deletions

BIN
bin/EASE.8Xp Normal file

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -7,6 +7,6 @@ prgmcmdPRGMf:
ld hl, prgmcmdPRGMSprgm
call _Mov9ToOP1
jp prgmasm
jp prgmrun
prgmcmdPRGMSprgm: .db ProgObj, "CHAR", 0
prgmcmdPRGMSprgm: .db ProgObj, "EASE", 0

View File

@ -1,8 +1,6 @@
#define prgmmovsize prgmmov_end - prgmmov_start
prgmbasic:
prgmasm:
prgmrun:
call _HomeUp
call _RunIndicOn
call _APDSetup
@ -31,22 +29,21 @@ prgmloader:
call _DrawStatusBar
;ld hl,(prgmNamePtr)
;call NamePtrToOP1
;bit isBasic,(iy+pgrmStatus)
;jp nz,RunBasicProgram
ld a, 's'
call _PutC
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
push hl
call prgm_to_usermem
ld hl, userMem + 1
ld a, (hl)
cp a,tAsm84CECmp
jr nz,RunBasicProgram ; is it a basic program
ld hl, prgmunloader
call _PushErrorHandler
ld hl, prgmunloader
push hl
jp userMem ; simply call userMem to execute the program
RunBasicProgram:
runBasicProgram:
call _RunIndicOn
call DeleteTempProgramGetName
;ld hl,(actualSizePrgm)
;call DeleteTempProgramGetName
;ld hl,(asm_prgm_size);actualSizePrgm)
;push hl
;call _CreateProg ; create a temp program so we can execute
;inc de
@ -54,36 +51,64 @@ RunBasicProgram:
;pop bc
;call _ChkBCIs0
; jr z,InROM ; there's nothing to copy
;ld hl,(prgmDataPtr)
; ld hl,(userMem)
;ldi
;jp po,InROM
;ldir
InROM: call _OP4ToOP1
InROM: ;call _OP4ToOP1
GoodInRAM:
;ld de,apperr1
;ld hl,StopError
;ld bc,StopErrorEnd-StopError
;ldir
;set graphdraw,(iy+graphFlags)
;ld hl,ErrCatchBASIC
;call _PushErrorHandler
;set progExecuting,(iy+newdispf)
;set allowProgTokens,(iy+newDispF)
;set cmdExec,(iy+cmdFlags);settheseflagsto execute BASIC prgm
;res onInterrupt,(iy+onflags)
;ld hl,ReturnHereBASIC
;push hl
;sub a,a
;ld (kbdGetKy),a
set graphdraw,(iy+graphFlags)
ld hl,prgmerrunloader;ErrCatchBASIC
call _PushErrorHandler
set progExecuting,(iy+newdispf)
set allowProgTokens,(iy+newDispF)
set cmdExec,(iy+cmdFlags) ;settheseflagsto execute BASIC prgm
res onInterrupt,(iy+onflags)
ld hl, prgmunloader
push hl
sub a,a
ld (kbdGetKy),a
ei
jp _ParseInp ; run program
ErrCatchBASIC:
call _boot_ClearVRAM
call _DrawStatusBar
call _DispErrorScreen
set textInverse, (iy + textFlags)
ld hl,1
ld (curRow),hl
ld hl,QuitStr1
call _PutS
ld hl,QuitStr2
res textInverse, (iy + textFlags)
call _PutS
call _GetKey
jr +_
prgmunloader:
ld hl, prgmFsh
call _PopErrorHandler
_: ld hl, prgmFsh
call _Mov9ToOP1
call _ChkFindSym
call _ChkInRam
ex de,hl
jr z,ExistsInRAM
ld de,9
add hl,de
ld e,(hl)
add hl,de
inc hl
ExistsInRAM: ; HL->totalPrgmSize bytes
call prgm_to_usermem
call _RunIndicOff
jp Fin
jp userMem
prgm_to_usermem:
ld a, 09h ; 'add hl,bc'

View File

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