Hello, Guest the thread was viewed1.5k times and contains 3 replies

last post from MIRKOSOFT at the

Values for SYS command and use/call in ML code

  • Hi!


    I was searching very small and short commented ROM/RAM disassemply/map for

    - value for A, X, Y register for SYS command

    - value for Z register for SYS command

    - value SR for SYS command

    - value SP for SYS command

    - value of Bank for SYS command

    - SYS routine address

    - LO and HI byte for use with SYS command as address


    But nothing found - C65 is more undocumented than documented, Mega65 ROM/RAM description Ithink is not final so notapplicable.


    Like we know SYS command can be performed with preloaded register values and even preform in ML code using LO and HI byte - since Basic 7on Commodore 128 can be called

    SYS <address>, A,X,Y,S


    So,where to findthese values an/or good resources?


    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

  • No idea, but I did SYS sysaddr,12,34,56 and saved memory content in Xemu. By inspecting the memory dump saved, I found this:


    0000000 00 00 80 c0 00 30 0c 22 38 00 00 00 00 7e 00 00

    0000020 00 00 00 00 00 00 00 c0 1b 00 00 00 00 00 00 00

    0000040 00 00 00 00 71 26 00 00 00 00 00 00 00 01 20 00


    As 12, 34, 56 is hex 0C 22 38, I have the suspect, they are stored in the ZP from address 6 ? Which according to your list is kinda similar to C128 ...

  • I've been more or less working on a C65 ROM map (for the 911001 version of the ROM) for a few weeks now, but it's not being "finished" yet. There are quite a few bytes that you have to look through and wife and children do not really understand the "real urgency" of making such a C65 map. :D


    At least I can help you with the values you are looking for: