Hi:
definition _vga_x and _vga_y symbol in asm, compile use nasm -f elf64 -o boot.o boot.asm
  [section .bss]
    ...

  [global _vga_x]
  _vga_x:
          resb 8
  [global _vga_y]
  _vga_y:
          resb 8


  and nm boot.o show below
    ...
   00107000 B _vga_x
   00107008 B _vga_y

 and In another D file use this two symbol

extern(C) {
 extern __gshared int _vga_x; //definition in boot.asm
 extern __gshared int _vga_y; //definition in boot.asm
}

 void tt()
 {
    if (_vga_x == _vga_y)
      //where is true, why?
 }

but when a run tt so strange things happend that the test is true.
 Is where has a coding mistake.
 src  https://github.com/lilijreey/OS-D



Reply via email to