One problem I'm seeing is that you are not setting ds
and es
to point to the dseg
segment. It is your responsibility to do that for .EXE programs, not DOS', assembler's or linker's.
Modify the code like so:
cseg SEGMENT
START:
mov ax, dseg
mov ds, ax
mov es, ax
mov maxX, largh
mov maxY, alt
...
Also you don't have any stack segment, which is bad as interrupts may overwrite your code or data.
Add one:
sseg segment stack 'stack'
dw 2048 dup (?)
sseg ends