Skeleton of a source file in Nasm format: bits 16 ;optional org 100h ;code starts at 100h section .text ; code here... MOV AH, 4Ch ; "exit to DOS" function as last code in main INT 21h section .data ; data items here (DB and DW variables) x: DW 0 ;x can be used as operand: MOV AX,X section .bss ; uninitialized data here Notes: numbers are decimal unless appended with h or prepended with 0x 21h or 0x21 labels are supported. To assemble from command line: nasm[w] myprog.asm -fbin -o myprog.com or use the nasmide: Options--Assembler to tell it where the nasm.exe is. paste from Windows by right click Edit--Paste in window bar. Options--Environment set to 45/50 lines for more viewing area. DOS debug can look at the .COM file and debug it.