32-bit Forth on the 65c816
Re: 32-bit Forth on the 65c816
Interesting. Given that memory is plentiful on the '816 wasting a byte for each stored address seems acceptable to avoid that penalty.
- barrym95838
- Posts: 2056
- Joined: 30 Jun 2013
- Location: Sacramento, CA, USA
Re: 32-bit Forth on the 65c816
Dr Jefyll wrote:
Oops -- thanks, Mike. You've reminded me to mention that my "times 2" and "times 4" comments apply when the underlying machine addresses bytes -- unlike yours, obviously! And of course byte addressing, though sometimes handy, is hardly a necessity.
Since it does nothing (multiplies "times 1"), your code for cells has only one optimization possible. When cells appears in the source code have it defined to do nothing then, not at run time. IOW don't even compile a jump to NEXT.
J
Since it does nothing (multiplies "times 1"), your code for cells has only one optimization possible. When cells appears in the source code have it defined to do nothing then, not at run time. IOW don't even compile a jump to NEXT.
J
Maybe I could try this instead?
Code: Select all
; 1035 ;--------------------------------------------------------- CELLS
00000318:00000313; 1036 NOT_IMM 'CELLS'
00000319:0543454c; 1036
0000031a:4c530000; 1036
; 1037 _cells: ; ( n -- n' ) Cells->address units
0000031b:00000053; 1038 .dw donext_
Mike
- GARTHWILSON
- Forum Moderator
- Posts: 8775
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: 32-bit Forth on the 65c816
Do this:
: CELLS ; IMMEDIATE
: CELLS ; IMMEDIATE
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
- BigDumbDinosaur
- Posts: 9428
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: 32-bit Forth on the 65c816
Martin_H wrote:
Interesting. Given that memory is plentiful on the '816 wasting a byte for each stored address seems acceptable to avoid that penalty.
x86? We ain't got no x86. We don't NEED no stinking x86!