Author Topic: mov immediant to memory always gives error  (Read 10693 times)

nobody

  • Guest
mov immediant to memory always gives error
« on: October 08, 2005, 06:27:46 PM »
I am trying some simple code that compiles under everything except for nasm and i just have no idea what i could do, if i add a byte ptr thing it says that it excpects end of line or a comma if i dont then it says operation size not specified
compiling to flat binary

[bits 16]


;since this is loaded at 0xf000:0 and the computer starts from there we
;need it to jump to the post which means a restart as it assumes real mode and all registers garbled
SECTION .text
_post:
mov [t],0x60
mov ah,[t]
mov [t],0x8000
mov ax,[t]
nop
section .data

t dw 0xF2F1

nobody

  • Guest
Re: mov immediant to memory always gives error
« Reply #1 on: October 08, 2005, 06:38:24 PM »
Try:

SECTION .text
_post:
mov byte [t],0x60
mov ah,[t]
mov word [t],0x8000
mov ax,[t]
nop
section .data

t dw 0xF2F1

-----
nmt