| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- .286
- .model small
- .code
- org 100h
- start:
- mov ax, 12h
- int
- 10h
- mov cx, 0fh
- gg:
- mov ax, 100
- mov bx, cx
- call putpixel
- inc ax
- inc bx
- call putpixel
- loop gg
- mov ah, 08h
- int 21h
- mov ax, 03
- int 10h
- mov ax, 4ch
- int 21h
- putpixel proc near
- pusha
- push es
- mov di, cx
- push 0a000h
- pop es
- push bx
- mov cl, 6
- shl bx, cl
- pop dx
- shl dx, 4
- add bx, dx
- push ax
- shr ax, 3
- add bx, ax
- pop ax
- and ax, 7
- mov cl, 7
- sub cl, al
- mov ax, 1
- shl ax, cl
- mov m1, al
- mov offs, bx
- xor cx, cx
- puts:
- mov dx, 3ceh
- mov ax, 5
- out dx, ax
- mov dx, 3c4h
- mov ax, 100h
- shl ax, cl
- add ax, 2
- out dx, ax
- mov si, offs
- mov al, es:[si]
- mov bx, 1
- shl bx, cl
- test di, bx
- jz nwrt
- or al, m1
- jmp myout
- nwrt:
- mov bl, m1
- not bl
- and al, bl
- myout:
- mov es:[si], al
- mov dx, 3c4h
- mov ax, 0F02h
- out dx, ax
- inc cl
- cmp cl, 4
- jnz puts
- pop es
- popa
- ret
- m1 db ?
- offs dw ?
- endp
- end start
|