From BASIC? Use, USRWhat's the easiest way to execute an OSBYTE call and see register A, X and Y contents afterwards?
The Welcome Guide says "On return from the machine code section, an integer number is generated from the four registers P, Y, X, A (most significant byte to least significant byte)."A%=&80:PRINT USR(&FFF4)
B1040080
So, in the above example, P=&B1, Y=4, X=0, A=&80
EDIT: But I suspect wiser heads than mine would tell you to look at what the documentation tells you each call should return / preserve / trample on
BBC Micro User Guide https://www.stardot.org.uk/forums/viewtopic.php?t=14024
Master Reference Manuals https://www.stardot.org.uk/forums/viewtopic.php?t=20466
Advanced User Guide https://www.stardot.org.uk/forums/viewtopic.php?t=17243
Beeb Wiki https://beebwiki.mdfs.net/OSBYTE which has a nice summary of what usually happens to A, X and Y.
Statistics: Posted by james — Fri Feb 16, 2024 8:01 am