Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IDEAL
- ; MODEL small
- ; STACK 100h
- ; DATASEG
- ; CODESEG
- ; proc drawpiece
- params
- al - color
- cx - starting x coord
- dx - starting y coord
- ; push bx
- ; push ax
- ; push di
- ; push dx
- ; push si
- ; push cx
- ; mov ah, 0Ch
- ; xor si, si
- ; xor di, di
- ; dpflp: ;draw pieces function loop
- ; int 10h
- ; inc si
- ; add cx, 1
- ; cmp si, 13 ;change somehow
- ; jb dpflp
- ; pop cx
- ; push cx
- ; add cx, 6
- ; xor si, si
- ; inc di
- ; inc dx
- ; cmp di, 13 ;change somehow
- ; jb dpflp
- drawing the mouse after drawing a piece because it doesn't draw stuff under the mouse... somehow...
- ; mov ax, 1
- ; int 33h
- ; pop cx
- ; pop si
- ; pop dx
- ; pop di
- ; pop ax
- ; pop bx
- ; ret
- ; endp drawpiece
- ; proc rect
- cx: starting x
- dx: starting
- al: color
- height: bp-2
- width: bp
- ; push bp
- ; mov bp, sp
- ; sub bp, 4
- ; push cx
- ; push dx
- ; push ax
- ; push di
- ; push si
- ; push bx
- ; mov bh, 0h
- ; mov ah,0ch
- ; xor di, di
- ; xor si, si
- ; startloop:
- ; int 10h
- ; inc cx
- ; inc di
- ; cmp di, [bp-2]
- ; jb startloop
- ; xor cx, cx
- ; xor di, di
- ; inc dx
- ; inc si
- ; cmp si, [bp]
- ; jb startloop
- ; pop bp
- ; pop bx
- ; pop si
- ; pop di
- ; pop ax
- ; pop dx
- ; pop cx
- ; ret
- ; endp rect
- ; start:
- ; mov ax, @data
- ; mov ds, ax
- Let's start coding!
- Graphic mode
- ; mov ax, 13h
- ; int 10h
- ; exit:
- ; mov ax, 4c00h
- int 21h
- ; END start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement