Skip to content

Instantly share code, notes, and snippets.

@s-chizhik
Last active August 29, 2015 14:21
Show Gist options
  • Save s-chizhik/bc9ce985171db2f4bcef to your computer and use it in GitHub Desktop.
Save s-chizhik/bc9ce985171db2f4bcef to your computer and use it in GitHub Desktop.
data segment
; add your data here!
pkey db "press any key...$"
bitmap dw 0112h, 0200h, 0f00h, 0ff0h, 0100h, 0150h, 0550h, 0354h,0100h, 0150h, 0550h, 0354h, 0112h, 0200h, 0000h, 0000h,
dw 0100h, 0150h, 0550h, 0354h, 0112h, 0200h, 0000h, 0000h,0112h, 0200h, 0000h, 0000h, 0100h, 0150h, 0550h, 0354h
data ends
stk segment stack
dw 128 dup(0)
stk ends
code segment
assume ds:data, ss: stk, cs: code
start:
; set segment registers:
mov ax, data
mov ds, ax
mov es, ax
mov ax, bitmap[2]
; Сохранение видео режима
mov ah, 0fh
int 10h
push ax
;установление своего видео режима
mov ah, 0
mov al, 0Ch
add al, 80h
int 10h
; Очистка экрана
mov ah, 06h
mov al, 0
int 10h
mov ax, 9
mov bx, 0
mov cx, 0
lea dx, bitmap
int 33h
mov ax, 1
int 33h
mov ah, 02h
mov bh, 0
mov dh, 10
mov dl, 10
int 10h
mov ah, 01h
mov ch, 4
mov cl, 5
int 10h
; wait for any key....
mov ah, 1
int 21h
; возврат видео режима
pop ax
mov ah, 0
int 10h
lea dx, pkey
mov ah, 9
int 21h ; output string at ds:dx
;
; wait for any key....
mov ah, 1
int 21h
mov ax, 4c00h ; exit to operating system.
int 21h
code ends
end start ; set entry point and stop the assembler.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment