Hi, here is the data stack printed Vertically, TOS on rigt side.
Currently HEX only, not optimised yet.. Pito

\ Some new .s
\ by Pito 2010-09-10
\ v3 WITH TOS ON RIGHT SIDE
\    PRINTED VERTICALLY !!!
\ not optimised yet

marker -newdots

: u.r       ( s n -- )   0 swap ud.r ;  \ comment if installed

variable temporary

: num4 ( n -- n4th ) \ takes 4th nibble
8 rshift 4 rshift $f and ;    \ WHY DOES SHIFT NOT WORK WITH WORD???
: num3 ( n -- n3rd ) \ takes 3rd nibble
8 rshift $f and ;    \ WHY DOES SHIFT NOT WORK WITH WORD???
: num2 ( n -- n2nd ) \ takes 2nd nibble
4 rshift $f and ;    \ WHY DOES SHIFT NOT WORK WITH WORD???
: num1 ( n -- n1st ) \ takes 1st nibble
$f and ;    \ WHY DOES SHIFT NOT WORK WITH WORD???

\ ONELINE HEXA STACK VERTICAL
: .svh
sp@ temporary !
." ["
depth dup 0 ?do
dup 1- i  -
2* temporary @ + 
base @ swap hex @ num4 1 u.r ."  " base !
loop
drop ." <T]" cr

sp@ temporary !
." ["
depth dup 0 ?do
dup 1- i  -
2* temporary @ + 
base @ swap hex @ num3 1 u.r ."  " base !
loop
drop ." <O]" cr

sp@ temporary !
." ["
depth dup 0 ?do
dup 1- i  -
2* temporary @ + 
base @ swap hex @ num2 1 u.r ."  " base !
loop
drop ." <S]" cr

sp@ temporary !
." ["
depth dup 0 ?do
dup 1- i  -
2* temporary @ + 
base @ swap hex @ num1 1 u.r ."  " base !
loop
drop ." <H]" cr

;

: stest1
.svh
$ABCD
.svh
20 0 do dup .svh cr loop
20 0 do drop .svh cr loop
drop
.svh
cr
;

-------------------------

ex:

> stest1
[<T]
[<O]
[<S]
[<H]
[A <T]
[B <O]
[C <S]
[D <H]
[A A <T]
[B B <O]
[C C <S]
[D D <H]

[A A A <T]
[B B B <O]
[C C C <S]
[D D D <H]

[A A A A <T]
[B B B B <O]
[C C C C <S]
[D D D D <H]

[A A A A A <T]
[B B B B B <O]
[C C C C C <S]
[D D D D D <H]

[A A A A A A <T]
[B B B B B B <O]
[C C C C C C <S]
[D D D D D D <H]

[A A A A A A A <T]
[B B B B B B B <O]
[C C C C C C C <S]
[D D D D D D D <H]

[A A A A A A A A <T]
[B B B B B B B B <O]
[C C C C C C C C <S]
[D D D D D D D D <H]

[A A A A A A A A A <T]
[B B B B B B B B B <O]
[C C C C C C C C C <S]
[D D D D D D D D D <H]

[A A A A A A A A A A <T]
[B B B B B B B B B B <O]
[C C C C C C C C C C <S]
[D D D D D D D D D D <H]

[A A A A A A A A A A A <T]
[B B B B B B B B B B B <O]
[C C C C C C C C C C C <S]
[D D D D D D D D D D D <H]

[A A A A A A A A A A A A <T]
[B B B B B B B B B B B B <O]
[C C C C C C C C C C C C <S]
[D D D D D D D D D D D D <H]

[A A A A A A A A A A A A A <T]
[B B B B B B B B B B B B B <O]
[C C C C C C C C C C C C C <S]
[D D D D D D D D D D D D D <H]

[A A A A A A A A A A A A A A <T]
[B B B B B B B B B B B B B B <O]
[C C C C C C C C C C C C C C <S]
[D D D D D D D D D D D D D D <H]

[A A A A A A A A A A A A A A A <T]
[B B B B B B B B B B B B B B B <O]
[C C C C C C C C C C C C C C C <S]
[D D D D D D D D D D D D D D D <H]

[A A A A A A A A A A A A A A A A <T]
[B B B B B B B B B B B B B B B B <O]
[C C C C C C C C C C C C C C C C <S]
[D D D D D D D D D D D D D D D D <H]

[A A A A A A A A A A A A A A A A A <T]
[B B B B B B B B B B B B B B B B B <O]
[C C C C C C C C C C C C C C C C C <S]
[D D D D D D D D D D D D D D D D D <H]

[A A A A A A A A A A A A A A A A A A <T]
[B B B B B B B B B B B B B B B B B B <O]
[C C C C C C C C C C C C C C C C C C <S]
[D D D D D D D D D D D D D D D D D D <H]

[A A A A A A A A A A A A A A A A A A A <T]
[B B B B B B B B B B B B B B B B B B B <O]
[C C C C C C C C C C C C C C C C C C C <S]
[D D D D D D D D D D D D D D D D D D D <H]

[A A A A A A A A A A A A A A A A A A A A <T]
[B B B B B B B B B B B B B B B B B B B B <O]
[C C C C C C C C C C C C C C C C C C C C <S]
[D D D D D D D D D D D D D D D D D D D D <H]

[A A A A A A A A A A A A A A A A A A A A A <T]
[B B B B B B B B B B B B B B B B B B B B B <O]
[C C C C C C C C C C C C C C C C C C C C C <S]
[D D D D D D D D D D D D D D D D D D D D D <H]

[A A A A A A A A A A A A A A A A A A A A <T]
[B B B B B B B B B B B B B B B B B B B B <O]
[C C C C C C C C C C C C C C C C C C C C <S]
[D D D D D D D D D D D D D D D D D D D D <H]

[A A A A A A A A A A A A A A A A A A A <T]
[B B B B B B B B B B B B B B B B B B B <O]
[C C C C C C C C C C C C C C C C C C C <S]
[D D D D D D D D D D D D D D D D D D D <H]

[A A A A A A A A A A A A A A A A A A <T]
[B B B B B B B B B B B B B B B B B B <O]
[C C C C C C C C C C C C C C C C C C <S]
[D D D D D D D D D D D D D D D D D D <H]

[A A A A A A A A A A A A A A A A A <T]
[B B B B B B B B B B B B B B B B B <O]
[C C C C C C C C C C C C C C C C C <S]
[D D D D D D D D D D D D D D D D D <H]

[A A A A A A A A A A A A A A A A <T]
[B B B B B B B B B B B B B B B B <O]
[C C C C C C C C C C C C C C C C <S]
[D D D D D D D D D D D D D D D D <H]

[A A A A A A A A A A A A A A A <T]
[B B B B B B B B B B B B B B B <O]
[C C C C C C C C C C C C C C C <S]
[D D D D D D D D D D D D D D D <H]

[A A A A A A A A A A A A A A <T]
[B B B B B B B B B B B B B B <O]
[C C C C C C C C C C C C C C <S]
[D D D D D D D D D D D D D D <H]

[A A A A A A A A A A A A A <T]
[B B B B B B B B B B B B B <O]
[C C C C C C C C C C C C C <S]
[D D D D D D D D D D D D D <H]

[A A A A A A A A A A A A <T]
[B B B B B B B B B B B B <O]
[C C C C C C C C C C C C <S]
[D D D D D D D D D D D D <H]

[A A A A A A A A A A A <T]
[B B B B B B B B B B B <O]
[C C C C C C C C C C C <S]
[D D D D D D D D D D D <H]

[A A A A A A A A A A <T]
[B B B B B B B B B B <O]
[C C C C C C C C C C <S]
[D D D D D D D D D D <H]

[A A A A A A A A A <T]
[B B B B B B B B B <O]
[C C C C C C C C C <S]
[D D D D D D D D D <H]

[A A A A A A A A <T]
[B B B B B B B B <O]
[C C C C C C C C <S]
[D D D D D D D D <H]

[A A A A A A A <T]
[B B B B B B B <O]
[C C C C C C C <S]
[D D D D D D D <H]

[A A A A A A <T]
[B B B B B B <O]
[C C C C C C <S]
[D D D D D D <H]

[A A A A A <T]
[B B B B B <O]
[C C C C C <S]
[D D D D D <H]

[A A A A <T]
[B B B B <O]
[C C C C <S]
[D D D D <H]

[A A A <T]
[B B B <O]
[C C C <S]
[D D D <H]

[A A <T]
[B B <O]
[C C <S]
[D D <H]

[A <T]
[B <O]
[C <S]
[D <H]

[<T]
[<O]
[<S]
[<H]

ok
> -12345 $FFE2 2200 0 -1
ok
> .svh
[C F 0 0 F <T]
[F F 8 0 F <O]
[C E 9 0 F <S]
[7 2 8 0 F <H]
ok
> 

Pito




------------------------------------------------------------------------------
Automate Storage Tiering Simply
Optimize IT performance and efficiency through flexible, powerful, 
automated storage tiering capabilities. View this brief to learn how
you can reduce costs and improve performance. 
http://p.sf.net/sfu/dell-sfdev2dev
_______________________________________________
Amforth-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to