Assembly in Dosbox, and draw a line

Last Updated or created 2022-11-16

Below my setup in Dosbox.
(As used 30 years ago)

First install dosbox (Linux/Windows)

download the package with used files and compilers from here:

extract with tar xzvf /tmp/assembly.tgz to a directory

start dosbox and mount the directory as C

mount c /path/assembly

Run “a line”, this a batchfile which starts the editor (qedit)
When closing the file (esc – q menu)
It will compile the assembly and write out a executable

This is the batchfile

@echo off
q %1.asm
masm %1.asm;
link %1.obj;
exe2bin %1.exe
echo READY!

line assembly code

    NAME lijnentrekroutine


    ASSUME CS:Code,DS:Code
org 100h
    mov ax,13h            ;set video mode
    int 10h

    mov bx,100
    mov cx,100
    mov dx,0a000h
    mov es,dx
    mov ax,320
    mul cx
    add ax,bx
    mov di,ax
    mov al,2
    inc bx
    inc bx
    inc cx
    cmp bx,150
    jnz hiero

    mov ah,8
    int 21h
    mov ax,3
    int 10h

    MOV AX,4C00h
    INT 21h

code ends
end start