Standard REL files load as MODKEEP and update ProDOS images

This commit is contained in:
David Schmenk 2024-02-26 12:57:11 -08:00
parent 7527a5a7d3
commit 578d002b8c
17 changed files with 40 additions and 17 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -2,7 +2,7 @@ import cmdsys
//
// Useful values for everyone
//
const _SYSVER_ = $0210 // Version built against
const _SYSVER_ = $0211 // Version built against
const FALSE = 0
const TRUE = not FALSE
const NULL = 0

View File

@ -1,5 +1,5 @@
DW $6502
DW 0 ; SYSFLAGS
DW RESFLAGS ; SYSFLAGS
DW DEFSEG ; DEF OFFSET
DW 1 ; DEF COUNT (INCLUDING INIT)
DW MODINIT ; MOD INIT

View File

@ -21,3 +21,21 @@ FETCHOP EQU NEXTOP+1
; JUMP TO BYTECODE INTERPRETER ADDRESS
;
INTERP EQU $03D0
;
; SYSTEM FLAGS: MEMORY ALLOCATOR SCREEN HOLES
;
RESTXT1 EQU $0001
RESTXT2 EQU $0002
RESXTXT1 EQU $0004
RESXTXT2 EQU $0008
RESHGR1 EQU $0010
RESHGR2 EQU $0020
RESXHGR1 EQU $0040
RESXHGR2 EQU $0080
NOJITC EQU $0100
;
; MODULE FREE FLAGS
;
MODNOKEEP EQU $0000
MODKEEP EQU $2000
MODINITKEEP EQU $4000

View File

@ -3,13 +3,9 @@
;
INCLUDE INC/PLASMA.INC
;
; EXTERNALS USED BY THIS MODULE
;
EXTRN PUTS
EXTRN PUTLN
;
; EXT REL HEADER
;
RESFLAGS EQU 0
INCLUDE INC/EXTHEADER.INC
;
; ADD MODULE DEPENDENCIES
@ -19,7 +15,15 @@
ASC "CMDSY"
MSB OFF
ASC "S"
DB 0 ; TERMINATE LIST WITH ZERO
;
; EXTERNALS USED FROM CMDSYS
;
EXTRN PUTS
EXTRN PUTLN
;
; TERMINATE DEPENDENCY LIST WITH ZERO
;
DB 0
;
; DATA AND 6502 CODE SEGMENT
;
@ -42,13 +46,14 @@ GOODBYE DEF GOODBYE ; CALLABLE FROM EXTERNAL MODULES
JSR PUTS
JMP PUTLN
;
; INITIALIZE MODULE AND RETURN SUCCESS
; INITIALIZE MODULE AND RETURN MOD KEEP STATUS
;
INIT JSR HELLO
LDA #$00
LDA #>MODNOKEEP
LDY #<MODNOKEEP
DEX
STA ESTKL,X
STA ESTKH,X
STY ESTKH,X
RTS
;
; EXT REL DEFSEG

View File

@ -1116,7 +1116,7 @@ def loadmod(mod)#1
//
// Call init routine if it exists.
//
fixup = 0
fixup = modkeep
if init
init = init - defofst + bytecode
fixup = adddef(init, @deflast)()

View File

@ -1137,7 +1137,7 @@ def loadmod(mod)#1
//
// Call init routine if it exists.
//
initcode = 0
initcode = modkeep
if init
init = init + defofst
initcode = adddef(init, @deflast)()

View File

@ -1212,7 +1212,7 @@ def loadmod(mod)#1
//
// Call init routine if it exists.
//
initcode = 0
initcode = modkeep
if init
init = init + defofst
initcode = adddef(deffirst, init, @deflast)()

View File

@ -1231,7 +1231,7 @@ def loadmod(mod)#1
//
// Call init routine if it exists.
//
initcode = 0
initcode = modkeep
if init
initcode = adddef(defext, init + defofst, @deflast)()
if initcode < 0

View File

@ -1254,7 +1254,7 @@ def loadmod(mod)#1
//
// Call init routine if it exists.
//
initcode = 0
initcode = modkeep
if init
initcode = adddef(deffirst, defext, init + defofst, @deflast)()
if initcode < 0

View File

@ -1020,7 +1020,7 @@ def loadmod(mod)#1
//
// Call init routine if it exists.
//
fixup = 0
fixup = modkeep
if init
init = init - defofst + bytecode
fixup = adddef(init, @deflast)()