[gforth] / gforth / abi-code-test.fs  

gforth: gforth/abi-code-test.fs


1 : dvdkhlng 1.1 abi-code my+ ( n1 n2 -- n3 )
2 : anton 1.2 \ ABI: SP passed in di, returned in ax, address of FP passed in si
3 :     \ Caller-saved: ax,cx,dx,si,di,r8-r11,xmm0-xmm15
4 :     8 di d) ax lea \ compute new sp in result reg
5 :     di ) dx mov \ get old tos
6 :     dx ax ) add \ add to new tos
7 :     ret
8 : dvdkhlng 1.1 end-code
9 :    
10 :     : my+-compiled ( n1 n2 -- n3 ) my+ ;
11 :    
12 : anton 1.2 12 34 my+ 46 <> throw
13 :     12 34 my+-compiled 46 <> throw

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help