To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.pbforthOpen lugnet.robotics.rcx.pbforth in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / pbFORTH / 349
348  |  350
Subject: 
hforth register usage
Newsgroups: 
lugnet.robotics.rcx.pbforth
Date: 
Fri, 19 May 2000 02:31:54 GMT
Reply-To: 
sjm@[stopspammers]judgement.com
Viewed: 
1314 times
  
Ralph,

I'm trying to add an assembler word and trying to deduce register.
usage. Could you verify for me please.

It looks like the top cell on the stack is actually a register (r6).
The second cell on the stack is pointer to by r7.

This means that consuming a stack cell means using the value in r6
and when done pop a new value into r6 from the data stack. Similarly
pushing a new value on the stack means first pushing r6 on the stack
and putting the new value in r6. A word consumes one value from
the stack and then pushes a new one just reads the old value from r6
sets r6 to the new valuewithout touching the stack pointer.

r5 is the return stack pointer. I have no need to touch this.
r4 is the next word pointer. I have no need to touch this.

r3-r0 seem to be available as scratch registers to assembler code.

Of course all of these registers have appropriate mnemonics.

Am I close?

Steve



Message has 1 Reply:
  RE: hforth register usage
 
(...) Right. If you look at the beginning of h8hforth.asm, I've abstracted the actual register names so I could move them around....here's the snippet from the file... ; The H8/300 Forth machine register usage has to be closely intertwined with ; (...) (25 years ago, 19-May-00, to lugnet.robotics.rcx.pbforth)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR