Skip to content
Low-level programming · Higher-level thinking
Login Register
Forum / Bugs and Fixes

Wrong address used

A community discussion post from the original code:zIRON forum.

0CodErr member
Posts
201
Threads
37
Location
Unknown

Wrong address used

program RAW_IMAGE 'test';

#set bits 32;

byte  my_byte  = 9;
word  my_word  = 0x7;
dword my_dword = 0b1;

al  = my_byte;
ax  = my_word;
eax = my_dword;

Result is:

00000000  A0D0282501        mov al,[0x12528d0]
00000005  66A1D1282501      mov ax,[0x12528d1]
0000000B  A1D3282501        mov eax,[0x12528d3]
00000010  0907              or [edi],eax
00000012  0001              add [ecx],al
00000014  0000              add [eax],al
00000016  00                db 0x00

I think should be:

00000000  A010000000        mov al,[0x10]
00000005  66A111000000      mov ax,[0x11]
0000000B  A113000000        mov eax,[0x13]
00000010  0907              or [edi],eax
00000012  0001              add [ecx],al
00000014  0000              add [eax],al
00000016  00                db 0x00

Replies

Colin admin
Posts
928
Threads
49
Location
Bulgaria

Fixed this, was a small issue with an uninitialized return value. Thanks for the report.