Are all sys commands in there from basic for asm with jsr... in the x16 doc ?
-------
lda #4
sta $01 ; rom bank 4 (BASIC)
------
thanks
Memory Banking Question
Re: Memory Banking Question
- Attachments
-
- rom.jpg (29.69 KiB) Viewed 2455 times
Re: Memory Banking Question
Those are not published APIs, so the address for those can change between builds.
If you want to inspect the code to see how it works, you can check out the ROM source code on the Github Repo. Otherwise, we're not going to publish the addresses for the BASIC ROM routines, because they are not fixed and will change from one release to the next.
Re: Memory Banking Question
It doesn't list the addresses to JSR to for the BASIC commands ..
poking around the ROM repo, I think I understand why that is ...
https://github.com/X16Community/x16-rom ... ic/basic.s
https://github.com/X16Community/x16-rom ... c/tokens.s
The way the ROM is currently assembled, the addition or removal of any BASIC keyword would result in the table addresses changing..
Changes to the functions themselves would shift the final address of the subroutine.
BASIC does not provide an API in the way that the KERNAL does.
consider this -
https://github.com/X16Community/x16-rom ... /vectors.s
No matter what may change about the underlying implementation or if new Kernal functions are added later,
.segment "JMPTBL" will always provide good location to some KERNAL function...
. . . .
If there is some BASIC function you want to call from ASM, you would need to do it some other way - possibly could incorporate the code from the ROM repo for that bit of BASIC, otherwise would need some way to ensure that your program is calling into the correct location in the BASIC bank
poking around the ROM repo, I think I understand why that is ...
https://github.com/X16Community/x16-rom ... ic/basic.s
https://github.com/X16Community/x16-rom ... c/tokens.s
The way the ROM is currently assembled, the addition or removal of any BASIC keyword would result in the table addresses changing..
Changes to the functions themselves would shift the final address of the subroutine.
BASIC does not provide an API in the way that the KERNAL does.
consider this -
https://github.com/X16Community/x16-rom ... /vectors.s
No matter what may change about the underlying implementation or if new Kernal functions are added later,
.segment "JMPTBL" will always provide good location to some KERNAL function...
. . . .
If there is some BASIC function you want to call from ASM, you would need to do it some other way - possibly could incorporate the code from the ROM repo for that bit of BASIC, otherwise would need some way to ensure that your program is calling into the correct location in the BASIC bank
Re: Memory Banking Question
the timing man... heheTomXP411 wrote: ↑Tue Apr 09, 2024 11:17 pmThose are not published APIs, so the address for those can change between builds.
If you want to inspect the code to see how it works, you can check out the ROM source code on the Github Repo. Otherwise, we're not going to publish the addresses for the BASIC ROM routines, because they are not fixed and will change from one release to the next.
Re: Memory Banking Question
hello, thanks for the information about the basic.
this vector table is great.
demo:
jmp GRAPH_draw_rect ; $FF2F: void GRAPH_draw_rect(word x, word y, word width, word height, word corner_radius, bool fill);
what is this please :bool fill is this 0 or 1?
What kind of data must be entered?
greeting
this vector table is great.
demo:
jmp GRAPH_draw_rect ; $FF2F: void GRAPH_draw_rect(word x, word y, word width, word height, word corner_radius, bool fill);
what is this please :bool fill is this 0 or 1?
What kind of data must be entered?
greeting
Re: Memory Banking Question
Any idea when it will be?Important: The layout of the banks is not yet final.
Re: Memory Banking Question
Probably not for a long time - at least until the Gen-2 systems are being sold.
You're probably not going to see a major reshuffling of banks at this point; instead, it's more likely we'll see new functions and utility programs added to banks 16+. The terminal program, for example, will probably live in 16, we'll see an assembler and a couple of compilers up there, as well.
Re: Memory Banking Question
An assembler that produces the ASM code as inline for the basic could perhaps be developed now.
This wonderful BASLOAD also worked out beautifully.
a basic compiler could give priority to the asm inline.
greeting
This wonderful BASLOAD also worked out beautifully.
a basic compiler could give priority to the asm inline.
greeting
Re: Memory Banking Question
MAGIC DESK! MAGIC DESK!TomXP411 wrote: ↑Wed Apr 10, 2024 4:15 pm You're probably not going to see a major reshuffling of banks at this point; instead, it's more likely we'll see new functions and utility programs added to banks 16+. The terminal program, for example, will probably live in 16, we'll see an assembler and a couple of compilers up there, as well.
(kidding )