flat assembler
Message board for the users of flat assembler.

Index > Main > use32 directive not will add prefix 0x66?

Author
Thread Post new topic Reply to topic
Byte



Joined: 21 Mar 2026
Posts: 6
Byte 27 Mar 2026, 13:50
fasm for DOS
Code:
format binary

_inc_addr   EQU  01000h
use32

ORG 0A000h

Main:
  mov   EAX, 00000010h
  mov   EBX, _inc_addr
  mov   [EBX], EAX
.....
    

Disassembly: (lDebug)
Code:
 B81000     mov  ax, 010
 0000         add  [bx+si], al
 BB0010     mov  bx, 1000
 0000         add  [bx+si], al
 8903         mov  [bp+di], ax
    


Why B81000000, not 66B810000000 ?
Why
Code:
8903         mov  [bp+di], ax    
?
Post 27 Mar 2026, 13:50
View user's profile Send private message Visit poster's website Reply with quote
Core i7



Joined: 14 Nov 2024
Posts: 150
Location: Socket on motherboard
Core i7 27 Mar 2026, 15:31
Apparently your disassembler is in 16-bit mode, because this design works correctly.

Code:
format binary
inc_addr  equ 1000h
use32
org 0A000h

start: mov  eax,10h
       mov  ebx,inc_addr
       mov  [ebx],eax
       ret
    


Description:
Filesize: 10.19 KB
Viewed: 3 Time(s)

Bin.png


Post 27 Mar 2026, 15:31
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2026, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.