10. how the local .asm variables (used in asm rouitne shall be
handled (e.g. where in ram to place the local variables).
- PŮVODNÍ ZPRÁVA -
Od: "pito"
Komu: [email protected]
Předmět: HOW TO - Assembler in anmforth
Datum: 7.9.2010 - 8:42:46
> Hi Matthias and co.,
> I'd
Hi Matthias and co.,
I'd like to ask how to start working with assembler in amforth. This
might be of general interest, therefore HOW TO.
The example could be the timer int routine:
: tick_isr _one timer 2@ d+ timer 2! ;
which does "timer = timer + 1" where timer is double integer. I've
seen usar
A test for .sls and .sla:
\ a quick test for one line .s
marker -testsdtot
: stest
-12345
.sls cr
5 0 do dup .sls cr loop
5 0 do drop .sls cr loop
drop
.sls cr
;
: stest1
$
.sla cr
5 0 do dup .sla cr loop
5 0 do drop .sla cr loop
drop
.sla cr
;
--
EX:
> ste
Hi, this is a collection of .s variations in various shapes and
bases.
Have a fun! Pito.
\ Some new .s
\ by Pito 2010-09-06
marker -newdots
: u.r ( s n -- ) 0 swap ud.r ; \ comment if installed
\ ONE LINE HEXA STACK
: .slh
sp@
." [TOS> "
depth 1- 0 ?do
dup i
2* +
base @ swap hex @