小编vij*_*ari的帖子

MASM:如何解决错误“不允许立即操作数”

我的汇编程序具有以下结构:

BPB_FAT16   STRUCT                     ; Base BPB_FAT16. Size=0x19=25.
BytesPerSector      DW  0x0200 ; Size of HW sector, usualy 512.
SectorsPerCluster   DB  0x01   ; Valid values 1,2,4,8,16,32,64,128.
ReservedSectors     DW  0x0001 ; NrOfSectors preceding FAT.
NumberOfFats        DB  0x02   ;
RootEntries         DW  0x00E0 ; Max number of YWORD entries in the 
                               ;root dir.
SmallSectors        DW  0x0B40 ; See also .LargeSectors.
MediaDescriptor     DB  0xF0   ; 0xF0 floppy disk, 0xF8 hard disk.
SectorsPerFat       DW  0x0009 ;
SectorsPerTrack     DW  0x0012 ;
NumberOfHeads       DW  0x0002 ;
HiddenSectors       DW 0x00000000 …
Run Code Online (Sandbox Code Playgroud)

x86 assembly masm bootloader data-structures

0
推荐指数
1
解决办法
289
查看次数

NASM 中 MASM 指针 PTR 的选项是什么

在 NASM 环境中运行以下 MASM 命令时出现错误:

MOV BYTE PTR [DI-02H],0FH
Run Code Online (Sandbox Code Playgroud)

它给出了一个错误和一个警告消息:

warning: 'PTR' is not a NASM keyword [-w+ptr]
error: symbol 'PTR' not defined
Run Code Online (Sandbox Code Playgroud)

在这里我想知道 MASM 的“PTR”的 NASM 选项是什么。

assembly masm nasm

0
推荐指数
1
解决办法
481
查看次数

标签 统计

assembly ×2

masm ×2

bootloader ×1

data-structures ×1

nasm ×1

x86 ×1