This commit is contained in:
Stephen Toth 2018-08-26 22:55:31 -04:00
parent ac3b80cbb1
commit c7677b4315
4 changed files with 1894 additions and 1817 deletions

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -3,10 +3,33 @@ prgmcmdPRGMo: .dw $0100
prgmcmdPRGMm: .db "help", 0 prgmcmdPRGMm: .db "help", 0
prgmcmdPRGMu: .db "PRGM", 0 prgmcmdPRGMu: .db "PRGM", 0
prgmcmdPRGMf: prgmcmdPRGMf:
prgmcmdPRGMfCheckArgs:
ld hl, FshCmdArgFlags
bit 0, (hl)
jr z, prgmcmdPRGMfArg0Get
bit 1, (hl)
jr z, prgmcmdPRGMfExe
ld hl, ErrUsageo
call ErrSet
call ErrCatch
prgmcmdPRGMfArg0Get:
ld hl, prgmcmdPRGMfPrompt
call printprompt
ld hl, FshCmdArg0
ld de, 8
call inputstr
call _NewLine
prgmcmdPRGMfExe:
ld hl, fshCmdArg0
ld de, prgmcmdPRGMSprgm + 1
call strcpy
ld hl, prgmcmdPRGMSprgm ld hl, prgmcmdPRGMSprgm
call _Mov9ToOP1 call _Mov9ToOP1
jp prgmrun jp prgmrun
prgmcmdPRGMSprgm: .db ProgObj, "EASE", 0 prgmcmdPRGMSprgm: .db ProgObj, 0, 0, 0, 0, 0, 0, 0, 0, 0
prgmcmdPRGMfPrompt: .db "Prgm=", 0

View File

@ -28,13 +28,15 @@ prgmloader:
;ld (mpLcdCtrl),a ; Set LCD to 16bpp ;ld (mpLcdCtrl),a ; Set LCD to 16bpp
call _DrawStatusBar call _DrawStatusBar
;ld hl,(prgmNamePtr) ;ld hl,(prgmNamePtr)
;call NamePtrToOP1 ;call NamePtrToOP1
call prgm_to_usermem call prgm_to_usermem
ld hl, userMem + 1 ld hl, userMem
inc hl
inc hl
ld a, (hl) ld a, (hl)
cp a,tAsm84CECmp cp a,tExtTok
jr nz,RunBasicProgram ; is it a basic program jr z, runBasicProgram ; is it a basic program
ld hl, prgmunloader ld hl, prgmunloader;ErrCatchBASIC
call _PushErrorHandler call _PushErrorHandler
ld hl, prgmunloader ld hl, prgmunloader
push hl push hl
@ -50,8 +52,8 @@ runBasicProgram:
;inc de ;inc de
;pop bc ;pop bc
;call _ChkBCIs0 ;call _ChkBCIs0
; jr z,InROM ; there's nothing to copy ;jr z,InROM ; there's nothing to copy
; ld hl,(userMem) ;ld hl,(userMem)
;ldi ;ldi
;jp po,InROM ;jp po,InROM
;ldir ;ldir
@ -62,7 +64,7 @@ GoodInRAM:
;ld bc,StopErrorEnd-StopError ;ld bc,StopErrorEnd-StopError
;ldir ;ldir
set graphdraw,(iy+graphFlags) set graphdraw,(iy+graphFlags)
ld hl,prgmerrunloader;ErrCatchBASIC ld hl,ErrCatchBASIC
call _PushErrorHandler call _PushErrorHandler
set progExecuting,(iy+newdispf) set progExecuting,(iy+newdispf)
set allowProgTokens,(iy+newDispF) set allowProgTokens,(iy+newDispF)
@ -73,6 +75,7 @@ GoodInRAM:
sub a,a sub a,a
ld (kbdGetKy),a ld (kbdGetKy),a
ei ei
halt
jp _ParseInp ; run program jp _ParseInp ; run program
@ -85,12 +88,15 @@ ErrCatchBASIC:
ld (curRow),hl ld (curRow),hl
ld hl,QuitStr1 ld hl,QuitStr1
call _PutS call _PutS
ld hl,QuitStr2
res textInverse, (iy + textFlags) res textInverse, (iy + textFlags)
ld hl,QuitStr2
call _PutS call _PutS
call _GetKey call _GetKey
jr +_ jr +_
QuitStr1: .db "1:",0
QuitStr2: .db "Quit",0
prgmunloader: prgmunloader:
call _PopErrorHandler call _PopErrorHandler
@ -161,7 +167,15 @@ DeleteTempProgramGetName:
call nc,_DelVarArc ; delete the temp prgm if it exists call nc,_DelVarArc ; delete the temp prgm if it exists
jp _PopOP1 jp _PopOP1
prgmattributes:
tmpPrgmName: .db tempProgObj,"ZTGP",0 tmpPrgmName: .db tempProgObj,"ZTGP",0
prgmFsh: .db ProgObj, "FSHA", 0 prgmFsh: .db ProgObj, "FSHA", 0
prgmFlags: .db $00 ;basic
#define isasm equ 0
#define isbasic equ 1
#define isice equ 2
prgmmov_end: prgmmov_end:
endrelocate() endrelocate()