用openwatcom编译测试过
boot.asm文件:
.186 .MODEL SMALL .DATA .CODE ORG 0 JMP Start hello DB 'Hello, World', 13, 10, 0 Start: MOV AX, 07C0H MOV DS, AX MOV ES, AX CLD MOV SI, OFFSET hello CALL PrintStr Hang: JMP Hang PrintStr: LODSB OR AL, AL JZ PrintStrEnd MOV AH, 0EH MOV BX, 0007 INT 10H JMP PrintStr PrintStrEnd: RET ORG 510 DW 0AA55H END
Makefile文件:
ASM = wasm CL = wcl boot.bin: boot.asm $(ASM) boot.asm $(CL) boot.obj exe2bin boot.exe boot.bin clean: del *.exe del *.obj