[M3devel] more assembly symbols please?

Jay jayk123 at hotmail.com
Sat Jan 19 12:32:21 CET 2008


duh, finally, got it. parameters being passed in the wrong order -- left to right instead of right to left.
should have read the assembly of some multi parameter function calls...
 
PROCEDURE RTLinker_PutInt (i: INTEGER;  width := 0) =  VAR    num : ARRAY [0..30] OF CHAR;    len := FromInt (ADR (num[0]), i, 10);  BEGIN    FOR i := 1 TO width - len DO PutChar (' ') END;    PutChars (ADR (num[0]), len);  END RTLinker_PutInt;Dump of assembler code for function RTLinker__RTLinker_PutInt:0x005de25f <RTLinker__RTLinker_PutInt+0>:       push   %ebp0x005de260 <RTLinker__RTLinker_PutInt+1>:       mov    %esp,%ebp0x005de262 <RTLinker__RTLinker_PutInt+3>:       sub    $0x38,%esp0x005de265 <RTLinker__RTLinker_PutInt+6>:       mov    0x8(%ebp),%edx0x005de268 <RTLinker__RTLinker_PutInt+9>:       sub    $0x4,%esp0x005de26b <RTLinker__RTLinker_PutInt+12>:      lea    0xffffffd9(%ebp),%eax0x005de26e <RTLinker__RTLinker_PutInt+15>:      push   %eax0x005de26f <RTLinker__RTLinker_PutInt+16>:      push   %edx0x005de270 <RTLinker__RTLinker_PutInt+17>:      push   $0xa0x005de272 <RTLinker__RTLinker_PutInt+19>:      call   0x5de345 <RTLinker__FromInt>
 
and I AVed writing to the address 0xA..
 
 - Jay
_________________________________________________________________
Connect and share in new ways with Windows Live.
http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_012008
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20080119/7bd322ee/attachment-0002.html>


More information about the M3devel mailing list