Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;===============================================================
- PlotPixel:
- ;===============================================================
- ;Inputs:
- ; B is the x-coordinate
- ; C is the y-coordinate
- ; D=Method
- ; 1=Test
- ; 2=Off
- ; 3=On
- ; (BufPtr) points to the buffer to draw to
- ;Outputs:
- ; BC is equal to (BufPtr)
- ; DE not modified
- ; HL points to the byte the pixel is drawn to
- ; When using the pixel test method:
- ; z means pixel off
- ; nz means pixel on
- ;Destroys:
- ; A
- ;===============================================================
- ld a,3Fh ;7
- srl b \ rra ;12 19
- srl b \ rra ;12 31
- srl b \ rra ;12 43
- cpl ;4 47
- or d ;4 51
- rrca \ rrca ;8 59
- ld (Method),a ;13 72
- ld a,b ;4 76
- ld b,0 ;7 83
- ld h,b \ ld l,c ;4 87
- add hl,bc ;11 98
- add hl,bc ;11 109
- add hl,hl ;11 120
- add hl,hl ;11 131
- ld c,a ;4 135
- add hl,bc ;11 146
- ld bc,(BufPtr) ;20 166
- add hl,bc ;11 177
- .db $CB ;15 192
- Method:
- .db 46h
- ret ;10 202 37 bytes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement