LAX PLEASE... :(

This commit is contained in:
Stephen Toth 2018-07-22 23:23:58 -04:00
parent 334518d6b6
commit f3125cb4c5
8 changed files with 3982 additions and 3932 deletions

View File

@ -15,7 +15,7 @@ Setup:
CALL fshvarreset
;call prgminstallload
call prgminstallload
CALL drawstatusbar

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
call prgmasm
jp prgmasm
prgmcmdPRGMSprgm: .db ProgObj, "CHAR", 0

View File

@ -1,23 +1,23 @@
prgmcmddecode:
;decodecmdopt(prgmcmdPRGM, prgmcmdPRGMo)
decodecmdopt(prgmcmdPRGM, prgmcmdPRGMo)
ret
prgmcmdroute:
pop bc
;routeoptjp(prgmcmdPRGMo, prgmcmdPRGMf)
routeoptjp(prgmcmdPRGMo, prgmcmdPRGMf)
push bc
ret
prgmcmdmanroute:
pop bc
;routestrjp(prgmcmdPRGM, prgmcmdPRGMm)
routestrjp(prgmcmdPRGM, prgmcmdPRGMm)
push bc
ret
prgmcmdmanrouteu:
pop bc
;routeustrjp(prgmcmdPRGM, prgmcmdPRGMu)
routeustrjp(prgmcmdPRGM, prgmcmdPRGMu)
push bc
ret

View File

@ -1,9 +1,8 @@
#define prgmmovsize prgmmov_end - prgmmov_end
#define prgmmovsize prgmmov_end - prgmmov_start
prgmbasic:
prgmasm:
call _ClrTxtShdw
call _HomeUp
call _RunIndicOn
call _APDSetup
@ -11,16 +10,16 @@ prgmasm:
jp prgmloader
prgminstallload:
ld hl, prgmmov_start
ld hl, prgmloader_start
ld de, SafeSScreen
ld bc, prgmmovsize
ldir
ret
prgmloader_start:
relocate(SafeSScreen)
prgmmov_start:
.org SafeSScreen
prgmmov:
prgmloader:
@ -34,13 +33,15 @@ prgmloader:
;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
ld hl, prgmunloader
call _PushErrorHandler
ld de, prgmunloader
push de
jp UserMem ; simply call userMem to execute the program
ld hl, prgmunloader
push hl
jp userMem ; simply call userMem to execute the program
RunBasicProgram:
call _RunIndicOn
@ -136,10 +137,6 @@ DeleteTempProgramGetName:
jp _PopOP1
tmpPrgmName: .db tempProgObj,"ZTGP",0
prgmFsh: .db ProgObj, "FSHA", 0
prgmmov_end:
.org prgmmov_start
endrelocate()

View File

@ -1,3 +1,4 @@
#include "includes/macros/misc.asm"
#include "includes/macros/pixel.asm"
#include "includes/macros/draw.asm"
#include "includes/macros/relocate.asm"

View File

@ -0,0 +1,19 @@
#macro relocate(new_location)
#ifdef old_location
.echo "Mateo(or Pixiys): ",__file,":",__line,": Error: You cannot nest relocated blocks."
#else
#define old_location eval($)
.org new_location
#define g_location eval(new_location)
#endif
#endmacro
#macro endrelocate()
#ifdef g_location
.org $-g_location + old_location
#undefine g_location
#undefine old_location
#else
.echo "Error line ",__line,": No relocate statements corresponds to this endrelocate."
#endif
#endmacro