[MPlayer-dev-eng] [BUG] surround audio plugin broken

Herman Tamas hermantom at dunasoft.com
Mon Jan 6 08:56:14 CET 2003


On Mon, 6 Jan 2003 01:21:29 -0500
D Richard Felker III <dalias at aerifal.cx> wrote:

> I only have one question... should the interpreter be written in
> forth? ;))))
ööööö öö forth? what is it? ;)
& im not talkin about an interpreter but a native compiler.
i have some - tho just a very lil - experience in this field
but i can c its not a huge pain as most ppl think 2 implement
such a "beast". if u dont try 2 overly automate & make convenient
the development process, it can b as small as this:

drop drop, ; nip nip, ;
over dup, 8b4604 3, ;
swap 89c28b06 4, 8916 2, ;
+ ?lit if 5 1, , ; then 306 2, nip ;
u+ ?lit if 8106 2, , ; then 14604 3, drop ;
- ?lit if 2d 1, , ; then 2906 2, drop ;
and ?lit if 25 1, , ; then 2306 2, nip ;
or ?lit if d 1, , ; then b06 2, nip ;
xor ?lit if 35 1, , ; then 3306 2, nip ;
neg f7d8 2, ; nop 90 1, ; 2/ d1f8 2, ; 2* d1e0 2, ;
shr ?lit if c1e8 2, c, ; then 89c1d32e 4, drop ;
shl ?lit if c1e0 2, c, ; then 89c1d326 4, drop ;
push 50 1, drop ; pop dup, 58 1, ; r@ dup, 8b0424 3, ;
r+ ?lit if 830424 3, , ; then 10424 3, drop ;
@ ?lit if dup, 8b05 2, , ; then 8b00 2, ;
c@ ?lit if dup, 31c08a05 4, , ; then 9231c08a 4, 2 1, ;
! ?lit if ?lit if c705 2, swap , , ; then 8905 2, , drop ; then 8b168910 4, drop drop ;
c! ?lit if ?lit if c605 2, swap , c, ; then 8805 2, , drop ; then 8b168810 4, drop drop ;
+! ?lit if ?lit if 8105 2, swap , , ; then 105 2, , drop ; then 8b160110 4, drop drop ;

Macros
? ?lit if a9 1, , ; then 8506 2, drop ;
* ?lit if b9 1, , f7e1 2, ; then 91adf7e1 4, ;
/ ?lit if b9 1, , 99f7f9 3, ; then 89c1ad99 4, f7f9 2, ;
mod ?lit if b9 1, , 99f7f9 3, 89d0 2, ; then 89c1ad99 4, f7f989d0 4, ;
/mod ?lit if b9 1, , 99f7f983 4, ee048916 4, ; then 918b0699 4, f7f98916 4, ;
*/ ?lit if ?lit if bb 1, , b9 1, , f7ebf7f9 4, ; then b9 1, , 93ad 2, f7ebf7f9 4, ; then 91ad93ad 4, f7ebf7e9 4, ;
max ?lit if ba 1, , 39c27e02 4, 89d0 2, ; then max compile, ;
min ?lit if ba 1, , 39c27d02 4, 89d0 2, ; then min compile, ;
for ?lit if 68 1, , here reset ; then push here reset ;
next ff0c2475 4, here 1 allot back 83c404 3, ;
times ?lit 1 - here dup 4 - @ + swap for dup compile, next drop ;
" 34 fparse csliteral ;

it defines a primitive instruction set what is sufficient 4
writing just any program. & it is a native optimizing compiler
4 the x86. those hexa numbers r x86 machine codes and the
1, 2, 3, , words store 1 2 3 or 4 bytes of data 2 the compile area.
?lit does the literal optimization & thats all...


More information about the MPlayer-dev-eng mailing list