Last Updated or created 2023-08-21
Below you can find the files in a zip for writing assemby machine code in dosbox.
I’ve got mine extracted in ~/projects/dos
To automount this i’ve edited
~/.dosbox/dosbox-*.conf ;-------- bottom part [autoexec] # Lines in this section will be run at startup. # You can put your MOUNT lines here. mount c: /home/myusername/projects/dos c:
The files
- A.BAT – Runs editor, masm,linker (start with a<space>progname
- DEBUG.COM – msdos debugger
- EXE2BIN.EXE – exe to com (if segments allow)
- GFX.ASM – example template (see below)
- LINK.EXE – masm linker
- MASM.EXE – masm compiler
- Q* – editor stuff
- Q.EXE – editor
- SR.EXE – sourcer
- SYMDEB.EXE
- TASM.EXE – turbo assembler
- TD.EXE – turbo debugger
- TLINK.EXE – turbo linker
Template
; everything in 64k CS, DS, and SS are the same .model small ; start pointer .stack 100h .code start: ; set mode 13 (320x200 * 265 colors palette) mov ah,0 mov al,13h int 10h ; set pixel in the middle color 2 (cyan) mov ah,0ch mov al,2 mov cx,160 mov dx,100 int 10h ; wait key input mov ah,0 int 16h ; set mode back to text mov ah,0 mov al,3 int 10h ; exit to dos mov ax,4c00h int 21h end start
Usage
start dosbox
a gfx (edit gfx.asm example)
esc, q, e
gfx (run program)