emu8086 merupakan program emulator untuk bahasa assembly yang mungkin sangat susah dipelajari, karena ini merupakan bahasa tingkat rendah yang dapat dimengerti oleh mesin, kali ini saya mencoba menshare contoh program dengan menggunakan emu8086, untuk source kodenya, seperti ini
data segment
col dw 320
row dw 240
x dw 320, 330, 340, 350, 360
dw 370, 378, 386, 394, 400
dw 406, 411, 415, 417, 419
dw 420, 419, 417, 415, 411
dw 406, 400, 394, 386, 378
dw 370, 360, 350, 340, 330
dw 320, 309, 299, 289, 279
dw 270, 261, 253, 245, 239
dw 233, 228, 224, 222, 220
dw 220, 220, 222, 224, 228
dw 233, 239, 245, 253, 261
dw 269, 279, 289, 299, 309
y dw 140, 140, 142, 144, 148
dw 153, 159, 165, 173, 181
dw 189, 199, 209, 219, 229
dw 240, 250, 260, 270, 280
dw 290, 298, 306, 314, 320
dw 326, 331, 335, 337, 339
dw 340, 339, 337, 335, 331
dw 326, 320, 314, 306, 298
dw 290, 280, 270, 260, 250
dw 240, 229, 219, 209, 199
dw 190, 181, 173, 165, 159
dw 153, 148, 144, 142, 140
mx dw 320, 329, 338, 347, 356
dw 365, 372, 380, 386, 392
dw 397, 402, 405, 408, 409
dw 410, 409, 408, 405, 402
dw 397, 392, 386, 380, 372
dw 365, 356, 347, 338, 329
dw 320, 310, 301, 292, 283
dw 275, 267, 259, 253, 247
dw 242, 237, 234, 231, 230
dw 230, 230, 231, 234, 237
dw 242, 247, 253, 259, 267
dw 274, 283, 292, 301, 310
my dw 150, 150, 151, 154, 157
dw 162, 167, 173, 179, 187
dw 194, 203, 212, 221, 230
dw 240, 249, 258, 267, 276
dw 285, 292, 300, 306, 312
dw 317, 322, 325, 328, 329
dw 330, 329, 328, 325, 322
dw 317, 312, 306, 300, 292
dw 285, 276, 267, 258, 249
dw 240, 230, 221, 212, 203
dw 195, 187, 179, 173, 167
dw 162, 157, 154, 151, 150
hx dw 320, 350, 371, 380, 371
dw 350, 320, 290, 268, 260
dw 268, 290
hy dw 180, 188, 209, 240, 270
dw 291, 300, 291, 270, 240
dw 210, 188
r dw ?
lcolor db ?
parac dw 4 dup(0)
data ends
;--------------------------------------------------------------------
code segment
main proc far
assume cs:code,ds:data,es:data
start: mov ax,data
mov ds,ax
mov es,ax
mv: mov ah,0
mov al,12h
int 10h
mov si,offset x
mov di,offset y
mov bl,60
init: mov ax,0c05h
mov bh,0
mov dx,[di]
mov cx,[si]
int 10h
inc si
inc si
inc di
inc di
dec bl
jne init
mov si,offset x
mov di,offset y
mov bl,12
init1: mov ax,0c03h
mov bh,0
mov dx,[di]
mov cx,[si]
int 10h
add si,10
add di,10
dec bl
jne init1
mov col,320
mov row,240
mov ah,2ch
int 21h
mov si,offset x
mov di,offset y
add dh,dh
mov al,dh
mov ah,00h
add si,ax
add di,ax
mov lcolor,0fh
call draw_line
mov ah,2ch
int 21h
mov si,offset mx
mov di,offset my
add cl,cl
mov al,cl
mov ah,00h
add si,ax
add di,ax
mov lcolor,0ah
call draw_line
mov ah,2ch
int 21h
mov si,offset hx
mov di,offset hy
mov al,ch
mov ah,00h
mov bl,12
div bl
add ah,ah
mov al,ah
mov ah,00h
add si,ax
add di,ax
mov lcolor,09h
call draw_line
mov ah,2ch
int 21h
cmp cl,59
jne con
cmp dh,55
jl con
call beep
call delay1
jmp last
con: mov ah,2ch
int 21h
cmp cl,0
jne con1
cmp dh,0
jne con1
call beep
call delay1
jmp last
con1:
call gensound
call delay
last: mov ah,0bh
int 21h
cmp al,0
jne exit
jmp mv
mov ah,4ch
int 21h
exit: mov ah,4ch
int 21h
main endp
;---------------
dapat didownload
disini