Updated BASIC and KERNAL disassembly

Basic and Machine Language

Moderator: Moderators

User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

Re: Updated BASIC and KERNAL disassembly

Post by srowe »

Mike wrote: Wed Jan 03, 2024 8:05 am One can only think that indirect JMP in the SE code is a brainf*rt ... it really should have been JMP $A2C2 instead:
Thanks for the confirmation. The way I work on these disassemblies is I note oddities when I notice them and then come back when I understand the code better.
On a related note, I have a suggestion for your latest RS 232 fix (the one in BLK5). You set the warmstart entry to point to $0000, ...

Code: Select all

*	=	$A000

	.WORD	RSCOLD
	.WORD	0			; unused
	.BYT	"A0",'C'+$80,'B'+$80,'M'+$80
... as some software could however divert the NMI vector or re-initialise it to the KERNAL default, you should rather point that entry to $FEC7 instead.

This continues the original NMI code after $FEC4 JMP ($A002), so when the KERNAL or some other program (like MINIMON) checks for the A0CBM signature, the KERNAL vectors are reset but at least it does not crash.
I'm struggling to recall my reasons for this. I think I did it because my NMI handler does not check for the A0CBM signature. If something intercepts the NMI vector it's highly likely to break my code anyway.

Interestingly, I happen to be working on more RS-232 code at the moment. Only this is interfacing to a real UART (16550A).

Thanks
Simon
User avatar
Soloman
Vic 20 Amateur
Posts: 44
Joined: Fri Sep 22, 2023 1:46 am
Location: Bilthoven, Netherlan
Occupation: Data-analyst

Re: Updated BASIC and KERNAL disassembly

Post by Soloman »

Thank you very much! It helps me a lot. Together with the book Mapping the Vic ( Compute!).
Post Reply