[Help!] Use two different assembly symbol in D, but they are same address.

a11e99z black80 at bk.ru
Sat Aug 24 12:55:57 UTC 2019


On Saturday, 24 August 2019 at 12:16:34 UTC, lili wrote:
> On Saturday, 24 August 2019 at 12:09:19 UTC, a11e99z wrote:
>> On Saturday, 24 August 2019 at 11:53:01 UTC, lili wrote:
>>>  [...]
>>
>> resb 8
>> just reserving 8 bytes not initializing it.
>> probably u compare some garbage. sometimes it equals, 
>> sometimes not.
>> no?
>
> I write wrong, not  if (_vga_x == _vga_y) but if (&_vga_x == 
> &_vga_y)

try to do next:
add funtion in asm that returns real addresses to vga_x,y
extern(C) void asmVgas( int** px, int** py)
call it
int *px, *py;
asmVgas( &px, &py);
writefln( "%s=%s,%s=%s",px, &_vga_x,py, &_vga_y);
and see result



More information about the Digitalmars-d-learn mailing list