|
Post by mirkosoft on Jun 9, 2018 16:06:34 GMT
Hi!
I need to implement QUIT command.
Normally it reports ?UNIMPLEMENTED COMMAND ERROR.
I don't know if Basic 7.0 has any other unimplemented command with the same message - if not it will be easy, but I'm not sure.
So, exist also other unimplemented command in Basic 7.0?
If other unimplemented commands exist, please help me implementing QUIT command - it needs in this case only to call own routine, nothing more, nothing less.
Thank you for help.
Miro
|
|
|
Post by Zippy Zapp on Jun 11, 2018 15:40:03 GMT
Hmm, not sure but I would think someone has mapped out the unimplemented commands by now.
As for a command to exit your program you can use END.
|
|
|
Post by mirkosoft on Jun 11, 2018 16:34:15 GMT
It's not about programming in Basic, I want to build there own function which is not for Basic, even not for use with Kernal.
Miro
|
|
|
Post by Zippy Zapp on Jun 11, 2018 18:40:10 GMT
It's not about programming in Basic, I want to build there own function which is not for Basic, even not for use with Kernal. Miro Oh. Your whole post talks about BASIC and the error message which is BASIC. If you don't want BASIC information I think you will need to better describe what you are trying to do... Sorry, I can't help you with low level stuff, I am guessing ROM changes?
|
|
|
Post by mirkosoft on Jun 11, 2018 20:14:16 GMT
Ok, little big description: I want to implement QUIT as command to use exit of Commodore Basic 7.0 to another program/system. Try to write QUIT command and you'll get this message: ?UNIMPLEMENTED COMMAND ERROR It's unimplemented command and even Basic 7.1, 7.80 and both versions of 8.0 it has not implemented.
So, this is my purpose how to use it and finally it can be implemented without Basic ROM changes, it can be easier to make by internal/external ROM. Miro
|
|
|
Post by mirkosoft on Jul 28, 2018 1:29:10 GMT
I found all what I need. QUIT command execution is at address $47C6 and rewriting vector to own (substract 1 from address) allows give to QUIT command custom function. Also OFF - other unimplemented command has similar vector to the same error message output and exit. My ROM mod needs only 18 bytes and QUIT exits Basic 7.
Miro
|
|
|
Post by jmpff3d on Oct 29, 2018 18:31:22 GMT
OFF and QUIT are the ?UNIMPLEMENTED COMMANDS in the 1986 AD C-128 roms. If you are modifying roms, OFF and QUIT are very simple to hijack for your own use. As an example, I used their vector for a 64mode mmu freezer option : c-128.freeforums.net/thread/622/poor-mans-64mode-freezer-cart-- Changes to 1986 AD stock roms, as follows: ; basiclo ROM modications >f46b9 53 57 41 d0 49 43 c5 46:swaPicEf ; replace ofF with icE .. this means OFF command no longer exists in this mod.
; unimplemented OFF and QUIT commands vector here at $4846, so in this mod ICE and QUIT will activate freezer, and OFF no longer exists. . f4846 a2 28 ldx #$28 ; this ldx becomes useless in this modification but we leave it alone. . f4848 4c 19 cf jmp $cf19 ; point to "GO ICE64?" and MMU config code, instead of $4d3c as before. -- ; in original basiclo ROM, $4d3c leads to ?UNIMPLEMENTED COMMAND ERROR ; ; kernal ROM modifications - in 1986 kernal rom, a fair amount of unused empty bytes start at $cf19 ; setup code for "GO ICE64?" option, MMU config, and switch to 64mode. . fcf19 78 sei ; disable IRQs ; ; etc etc etc ;
In this example, the new ICE (or the old QUIT) command will hit the same $4846 location that OFF did before except this time it will jump to $cf19 (where I placed my own code). Additionally, as you can see above, the OFF command has been completely taken out of the command table in $46b9 and replaced by ICE. Cheers !
|
|
|
Post by mirkosoft on Oct 29, 2018 19:35:26 GMT
I did it longer time ago, I'm sorry for no update.
Miro
|
|
|
Post by jmpff3d on Oct 29, 2018 20:43:08 GMT
It's a bit of a pain to hunt/peck through the C128 memory map so I'm happy the information is available here in case someone in the present or future needs it !
Cheers!
|
|