Login
Back to forumReply to this topicGo to last reply

Posted By

MIRKOSOFT
on 2020-10-02
10:30:34
 Values for SYS command and use/call in ML code

Hi!

I was searching commented ROM/RAM disassemply/map for:
- value for A, X, Y register for SYS command - success - found
- value SR for SYS command - success - found
- SYS routine address - success found
- value for SP for SYS command - never found
- LO and HI byte for use with SYS command as address - never found
- also, here comes Q about banks on C16/Plussy - C128 has also bank value, but I don't know howit works on 264 Series - really big amount of free RAM for Basic is unclear if is there not bankswitching, so, if applicable also need bank number location for SYS command

Like we know SYS command can be performed with preloaded register values and even preform in ML code using LO and HI byte.

So, Q is: Where are in RAM located LO and HI bytes for address and Stack Pointer and maybe Bank + even Kernal SYS routine address on C16/Plussy?

For complete found info:
C128
-----
0005 SR value for SYS
0006 A reg. value for SYS
0007 X reg. value for SYS
0008 Y reg. value for SYS
0009 SP value for SYS
0002 Bank value for SYS
0003 LO-byte SYS address
0004 HI-byte SYS address
22661 / $5885 SYS

C64
----
780 $030C A value for SYS
781 $030D X value for SYS
782 $030E Y value for SYS
783 $030F SP value for SYS
20 $0014 LO-byte SYS address
21 $0015 HI-byte SYS address
57642 $E12A SYS

VIC20
-----
780 $030C A value for SYS
781 $030D X value for SYS
782 $030E Y value for SYS
783 $030F SR value for SYS
57639 $E127 SYS

C16+4
-----
2034 $07F2 A value for SYS
2035 $07F3 X value for SYS
2036 $07F4 Y value for SYS
2037 $07F5 SR value for SYS

Thank you for help.
Miro

Posted By

siz
on 2020-10-22
09:21:49
 Re: Values for SYS command and use/call in ML code

Just found this unanswered post.

The 264 series (C16, plus/4 and the rest) does not have a bank switching. All BASIC memory reads access RAM only (I'm not sure about PEEK) so you don't have to care about that. What you see on BASIC startup is the real available memory for BASIC.

I'm not sure why do you need the start address for SYS. If you use it from BASIC you just write SYS <address>, in assembly you don't need those memory locations just set the registers and do a JSR.

The address of the SYS implementation in BASIC is $A7B5.

Posted By

MIRKOSOFT
on 2020-10-22
18:19:41
 Re: Values for SYS command and use/call in ML code

I'm trying to modify Basic on various Commodore 8-bits: C128, VIC20, C64 and 264 series.
This is reason. Purpose is to extend Basic command SYS.

Miro

Posted By

SVS
on 2020-10-23
03:59:30
 Re: Values for SYS command and use/call in ML code

in one of the recent releases of Ultimate Map I've added more info about the use of SYS command.
Anyway the OS96 by Solder/Hannes manages the RAM banking by the register $FD16.

siz is right when says that PEEK function always read from RAM (over $7FFF address').



Back to topReply to this topic


Copyright © Plus/4 World Team, 2001-2024. Support Plus/4 World on Patreon