考虑下面的宏: pixelFast MACRO
; This macro draws a pixel, assuming the coordinates are already loaded in cx&dx and the color is in al.
xor bh, bh
mov ah, 0ch
int 10h
ENDM
drawRect MAC
我有一个代码段位于boot.img文件的扇区37,在我的主引导记录中,我将这段代码加载到内存0x5678:0x1234,这是我的汇编代码: [BITS 16] ;Set code generation to 16 bit mode
ORG 0x1234 ;set addressing to begin at 0x5678:0x1234
mov ax, cs
mov ds, ax