objexe.asm

来自「开源的nasm编译器源码,研究编译器原理很有帮且」· 汇编 代码 · 共 31 行

ASM
31
字号
; Demonstration of how to write an entire .EXE format program as a .OBJ; file to be linked. Tested with the VAL free linker.; To build:;    nasm -fobj objexe.asm;    val objexe.obj,objexe.exe;; To test:;    objexe; (should print `hello, world')	  	  segment code..start:  mov ax,data	  mov ds,ax	  mov ax,stack	  mov ss,ax	  mov sp,stacktop	  mov dx,hello	  mov ah,9	  int 0x21	  mov ax,0x4c00	  int 0x21	  segment datahello:	  db 'hello, world', 13, 10, '$'	  segment stack stack	  resb 64stacktop:

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?