简体   繁体   中英

error A2023 instruction operand must have size with LGDT instruction

I'm having this error mentioned above in the following assembly code and I couldn't find much on the net too regarding this error code.

mov  ax,main_data
mov  ds,ax
mov  bx,gdt_info
lgdt [bx]

main_data segment use16
gdt_start:
c32_gdt GDT <0,0,0,0,0,0>
d32_gdt GDT <0,0,0,0,0,0>

gdt_info:
    dw gdt_info - gdt_start - 1
    dd gdt_start

main_data ends

得到它的工作需要指定由指针大小fword GDT寄存器是48位或大小为6个字节,从而得到它的工作: lgdt fword ptr [bx]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM