こんにちは、x86アセンブラコードのコンパイルに問題があります。nasmを使用してコンパイルしていますが、コンパイラから構文が間違っていると言われます。簡単なラベルを使ってジャンプしているのでわかりませんか?誰かが私にそれを説明してもらえますか。
; reads character and prints ascii code in console
[BITS 16]
SEGMENT code
..start:
mov ax, pile
mov ss, ax
mov ax, topofstack
mov sp, ax
loop: ; gives syntax error
mov ah, 00h
int 16h
cmp ax, 1c0dh ; user pressed enter, jump to end
je end
mov ah, 09h ; write character and attribute at cursor position
mov bh, 0h ; flags...
mov bl, 08h
mov cx, 01h
int 10h
jmp loop ; gives syntax error
end:
mov ax, 04c00h
int 21h
SEGMENT pile stack
resb 64
topofstack: