Re: Noob question: examine arbitrary memory address? #ELF #memory


joshbensadon
 

Hi John,

The neat thing about 1802 OUT instruction is that it increments the X Register.
So, if you make the X register the same as the PC register, not only will it point to the next byte (since the PC increments) but the OUT increments it too and program execution continues on next instruction.
Very easy way to output a constant.

Here's the shortest program to output a value.

E0      Set X = 0 (PC)
64      Output
AA      (value to be output)
30      Jump to begining
00

Josh


From: cosmacelf@groups.io <cosmacelf@groups.io> on behalf of John Kennedy <johntkennedy@...>
Sent: Sunday, September 20, 2020 11:24 PM
To: cosmacelf@groups.io <cosmacelf@groups.io>
Subject: Re: [cosmacelf] Noob question: examine arbitrary memory address? #ELF #Memory
 
Could someone tell me what the simplest program to a display a value on the 2 hex displays would be?
My experiments are not working, which makes me thing I do have another hardware issue on my hands..

Join cosmacelf@groups.io to automatically receive all group messages.