Post Reply 
Saturn ASM question
12-28-2017, 03:32 PM
Post: #1
Saturn ASM question
Hi all,

I've been taking advantage of some time off work between Christmas and the New Year to come to grips with both SysRPL and ASM programming on the HP 50g. My learning material for the latter is the excellent "Introduction to Saturn Assembly Language" by Gilbert Fernandes and Eric Rechlin. I'm basically copy/pasting source code strings from my text editor onto the stack of an emulated HP 50g and running ASM to get executable code. I do have extable installed both on the emulator and on my physical 50g to make things that much easier.

My question is, how do I make use of pointers to the built-in real numbers in ASM?

I'm (finally...) writing a bunch of archival utilities, including one that tests for the presence of an SD card and returns either 1. or 0. to the stack using code such as this:

Code:
LC 2F94C % %1
D=D-1 A
D1=D1- 5
DAT1=C A

Fairly straightforward. Load the address of %1 ($2F94C on the 49/50) into C, decrement the number of 5-nibble blocks available, decrement the stack pointer and place the address in C on the top of that stack.

This code will never run on a 48 so it's not a problem in this instance, however I'd be happier if I could use the symbol defined in extable rather than the literal 2F94C. How do I do that? This is probably just a question of syntax that I haven't yet managed to figure out.

"LC %1" is clearly not the way because the "%" sign introduces a comment...

Thanks in advance.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Saturn ASM question - grsbanks - 12-28-2017 03:32 PM
RE: Saturn ASM question - pier4r - 12-28-2017, 03:53 PM
RE: Saturn ASM question - DavidM - 12-28-2017, 04:32 PM
RE: Saturn ASM question - grsbanks - 12-28-2017, 04:51 PM
RE: Saturn ASM question - DavidM - 12-28-2017, 05:48 PM
RE: Saturn ASM question - grsbanks - 12-28-2017, 05:57 PM
RE: Saturn ASM question - grsbanks - 12-28-2017, 05:14 PM
RE: Saturn ASM question - grsbanks - 12-28-2017, 06:03 PM
RE: Saturn ASM question - DavidM - 12-29-2017, 04:56 PM
RE: Saturn ASM question - grsbanks - 12-30-2017, 12:11 AM



User(s) browsing this thread: 1 Guest(s)