1

この as86 用のアセンブリを fasm に変換しようとしています。3 つの質問があります。

1) seg es与えられたerror: illegal instruction.this が 16 ビットで有効でないのはなぜですか?

2) (FASM 構文) はmov byte [0],0x41(as86 構文) とまったく同じmov [0],#0x41ですか? そうでない場合、同等のものを見せてもらえますか?

3) entry startFASM でエラーが発生するのはなぜですか?

アセンブリ コードは次のとおりです。

as86

entry start
start:
       mov ax,#0xb800
       mov es,ax
       seg es
       mov [0],#0x41
       seg es
       mov [1],#0x1f
 loop1: jmp loop1

そして、私が書いた fasm バージョン:

FASM

use16
format binary

start:
    mov ax,0xb800
    mov es,ax
    seg es
    mov byte [0],0x41
    seg es
    mov byte [1],0x1f
loop1:  jmp loop1
4

2 に答える 2

1

正しい構文は次のとおりです。

mov byte [es:0],0x41    ;I'm not sure if this instruction is supported under 16 bit CPU

また

push bx 
mov  bx,0   ;you can use also: xor  bx, bx
mov  byte [es:bx],0x41
pop  bx
于 2013-01-19T22:52:33.343 に答える
0

seg es怪しく見える。以下を試してください:

mov byte ptr es:[0],0x41
于 2013-01-19T21:43:41.747 に答える