考慮下面的宏: 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