26 lines
566 B
Text
26 lines
566 B
Text
.model small
|
|
.stack 1024
|
|
|
|
.data
|
|
|
|
UserRam BYTE 256 DUP (0)
|
|
|
|
.code
|
|
start:
|
|
|
|
mov ax,@data ;assembler calculates this offset for us
|
|
mov ds,ax ;the 8086 can only load segment registers from other registers, not directly from immediate values.
|
|
|
|
mov ax,@code
|
|
mov es,ax
|
|
|
|
mov ax,3422h
|
|
mov word ptr [ds:UserRam],ax
|
|
mov bl, byte ptr [ds:UserRam]
|
|
call doMonitor ;a routine that prints the contents of
|
|
;the 8086's registers to the screen
|
|
|
|
mov ax,4C00h
|
|
int 21h ;return to MS-DOS
|
|
|
|
end start
|