You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is about making the Monitor embeddable as kind of an "operating system" in other projects that are using QNICE such as MiSTer2MEGA65.
Currently, the gbc4mega65 project needs to do very un-(q)nice code duplications to embed the Monitor. Some simple changes of the Monitor, such as outsourcing the list of operating-system functions to two include files (one containing only the !reset jump and one containing all the rest) and outsourcing the hard coded .ORG of the monitor's variables into another include file would help. Something like this in qmon.asm:
#include "qmon_reset.asm"
#include "qmon_os.asm"
instead of
reset! RBRA QMON$COLDSTART, 1 ; Skip the dispatch table on reset
getc! RBRA IO$GETCHAR, 1
putc! RBRA IO$PUTCHAR, 1
gets! RBRA IO$GETS, 1
puts! RBRA IO$PUTS, 1
crlf! RBRA IO$PUT_CRLF, 1
[ ... and so on ...]
qmon_reset.asm would contain a #define where reset! shall jump to, so just replacing qmon_reset.asm would already lead to clean code without duplication.
Nice to have: Super helpful would be some enhancements of the assembler to be able to calculate .ORG addresses relative to labels and to .EQUs because then at certain places such as variables.asm in the QNICE project and also in the variables part inside the gbc4mega65 project, one would not need to hardcode the stack address any more.
Maybe there are better ways to do all of this, so this is just a braindump to trigger the appropriate actions when time is ripe.
The text was updated successfully, but these errors were encountered:
This issue is about making the Monitor embeddable as kind of an "operating system" in other projects that are using QNICE such as MiSTer2MEGA65.
Currently, the gbc4mega65 project needs to do very un-(q)nice code duplications to embed the Monitor. Some simple changes of the Monitor, such as outsourcing the list of operating-system functions to two include files (one containing only the !reset jump and one containing all the rest) and outsourcing the hard coded .ORG of the monitor's variables into another include file would help. Something like this in
qmon.asm
:instead of
qmon_reset.asm
would contain a #define wherereset!
shall jump to, so just replacingqmon_reset.asm
would already lead to clean code without duplication.Nice to have: Super helpful would be some enhancements of the assembler to be able to calculate .ORG addresses relative to labels and to .EQUs because then at certain places such as
variables.asm
in the QNICE project and also in the variables part inside the gbc4mega65 project, one would not need to hardcode the stack address any more.Maybe there are better ways to do all of this, so this is just a braindump to trigger the appropriate actions when time is ripe.
The text was updated successfully, but these errors were encountered: