[colorforth] pentium words
- Subject: [colorforth] pentium words
- From: Mark Slicker <maslicke@xxxxxxxxxxx>
- Date: Sat, 26 Jun 2004 19:49:48 -0400 (EDT)
I've cataloged most of the pentium specific words in Chuck's networking
image[1]. The comment gives the number of times the definition occurs
in the source and description of the word. I think maybe these words
should be factored in some form into their own block. In addition to
these occurances, I redefined them in my own code. Many are MachineForth
variations of single operation. What do you think?
w $66 1, ;( word prefix )
( from/to memory )
1@ $8a 2, ; ( 5 fetch byte from byte address )
@b $8a 2, ; ( 1 )
1! [a!] $288 2, [drop] ; ( 2 store byte to byte address )
@w $8b66 3, ; ( 3 fetch 16-bits from byte address )
w@ $8b 2, ; ( 1 fetch 32-bits from byte address )
!b [a!] $289 2, [drop] ; ( 1 store 32-bits to byte address )
b@ w@ $ff and ; ( 1 fetch 32-bits and mask byte)
!w [a!] $28966 3, [drop] ; ( 1 store 16-bits to byte address )
w! [w] $289 2, [drop] ; ( 1 store 16-bits to A addresss )
2! a! w! ; ( 1 store 16-bits to byte address )
( from/to ports )
4@ [dup] $ed 1, ; ( 1 fetch 32-bits from port address A )
4! $ef 1, [drop] ; ( 2 store 32-bits to port address A )
2@ [dup a!] $ed66 2, ; ( 1 fetch 16-bits from port )
2! [a!] $ef66 2, [drop] ; ( 1 store 16-bits to port )
p@ $ec 1, ; ( 3 fetch byte from port A, no dup )
p@ [a! dup] $ec 1, ; ( 1 fetch byte from port )
p@ [a! ?dup] $ec 1, ; ( 1 fetch byte from port )
p@ [dup a!] $ec 1, ; ( 1 fetch byte from port )
p@ [0] $ec 1, ; ( 1 fetch byte from port A, zeroed T )
p! $ee 1, ; ( 1 store byte to port A )
p! $ee 1, [drop] ; ( 3 store byte to port A, drop )
p! [a!] $ee 1, [drop] ; ( 3 store byte to port A
p!+ $42ee 2, ; ( 1 store byte to port A, increment A )
out $e1e6 2, ; ( 1 store byte to port $e1 )
( shift left/right )
2*s ?lit e0c1 2, 1, ; ( 1 zero filled shift left )
2/s ?lit e8c1 2, 1, ; ( 1 zero filled shift right )
2/s ?lit f8c1 2, 1, ; ( 4 signed shift right )
( misc )
*byte $c486 2, ; ( 3 swap lower bytes of T )
+a c2ff 2, ; ( 1 increment A ? )
[1] http://personalwebs.oakland.edu/~maslicke/colorforth/ether-udp.html
---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com