void dumplong(unsigned long x)
_dumplong:
push bp
mov bp,sp
char buf[9];
sub sp,OFFSET L04604
char *z = "0123456789abcdef";
mov ax,OFFSET L03767
mov dx,ds
mov WORD PTR -16[bp],ax
mov WORD PTR -14[bp],dx
y = 0;
mov WORD PTR ?y@?1??dumplong@@9@9,OFFSET 0
buf[0] = 'P';
buf[1] = 'P';
buf[2] = 'P';
buf[3] = 'P';
mov BYTE PTR -12[bp],OFFSET 80
mov BYTE PTR -11[bp],OFFSET 80
mov BYTE PTR -10[bp],OFFSET 80
mov BYTE PTR -9[bp],OFFSET 80
buf[3-y] = 'R';
mov ax,OFFSET 3
sub ax,WORD PTR ?y@?1??dumplong@@9@9
lea bx,WORD PTR -12[bp]
add bx,ax
mov BYTE PTR ss:[bx],OFFSET 82
buf[4] = 'P';
mov BYTE PTR -8[bp],OFFSET 80
buf[4+y] = 'S';
mov ax,WORD PTR ?y@?1??dumplong@@9@9
add ax,OFFSET 4
lea bx,WORD PTR -12[bp]
add bx,ax
mov BYTE PTR ss:[bx],OFFSET 83
buf[5] = 'P';
buf[6] = 'P';
buf[7] = 'P';
mov BYTE PTR -7[bp],OFFSET 80
mov BYTE PTR -6[bp],OFFSET 80
mov BYTE PTR -5[bp],OFFSET 80
I've been looking at this for hours.
Unless I've somehow stuffed up the test, this data is
all being set to 'P'.
Regardless of whether I do a subtraction or an addition
(of 0), the data is not changed.
buf[3-y] = 'R';
mov ax,OFFSET 3 ; ax = 3
sub ax,WORD PTR ?y@?1??dumplong@@9@9 ; ax -= y
lea bx,WORD PTR -12[bp] ; bx = &buf[0]
add bx,ax ; bx += ax
mov BYTE PTR ss:[bx],OFFSET 82 ; *bx = 'R'
I've been looking at this for hours.
Unless I've somehow stuffed up the test, this data is
all being set to 'P'.
I don't follow, you set buf[3] to 'R' (shows as OFFSET 82 in the
disassembly) and buf[4] to 'S'.
Ah, as soon as I hit send I realized what you were saying - you don'tCorrect.
think there's a miscompilation. You're saying the write to ss:[bx] isn't working, and you suspect the lea is to blame?
It seems correct to me, the base should be irrelevant and the actualOk, thanks for the analysis. I thought I might have been doing
write has the correct override. I don't know what could be causing
that!
I tried zapping the add into a subtract, on the assumptionI appear to have 1.52C as per the name of the CD,
that it was a compiler bug, since I think I am using 1.52
but I think there is a 1.52C available via patch.
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 65 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 09:22:52 |
| Calls: | 862 |
| Files: | 1,311 |
| D/L today: |
2 files (6,679K bytes) |
| Messages: | 265,083 |