Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Sets the LCD window bounds to the given rectangular area. Behavior is
- ; undefined if width=0, height=0, or any bound is offscreen.
- ; I: b=y, c=height, e=width, l=x/2
- ; O: a=y+height-1, b=0, c=height, de=width, hl=y+height-1
- ;FO: c=0, others=(dec l[=y+height])
- Draw_Common_X1:
- ld h,0
- add hl,hl
- ;Sets the LCD window bounds to the given rectangular area. Behavior is
- ; undefined if width=0, height=0, or any bound is offscreen.
- ; I: b=y, c=height, e=width, hl=x
- ; O: a=y+height-1, b=0, c=height, de=width, hl=y+height-1
- ;FO: c=0, others=(dec l[=y+height])
- Draw_Common:
- ld d,0
- ;Sets the LCD window bounds to the given rectangular area. Behavior is
- ; undefined if width=0, height=0, or any bound is offscreen.
- ; I: b=y, c=height, de=width, hl=x
- ; O: a=y+height-1, b=0, c=height, de=width, hl=y+height-1
- ;FO: c=0, others=(dec l[=y+height])
- Draw_Common_W2:
- ld a,$52
- call LCD_Out_A_HL
- ld a,$21
- call LCD_Out_A_HL
- add hl,de
- dec hl
- ld a,$53
- call LCD_Out_A_HL
- ld l,b
- ld a,$50
- call LCD_Out_A_L
- ld a,$20
- call LCD_Out_A_HL
- add hl,bc
- dec l
- ld a,$51
- ; jp LCD_Out_A_L
- ;Outputs L to LCD register A
- ; I: a=LCD register, l=output
- ; O: a=output, hl=output
- ;FO: all=unaffected
- LCD_Out_A_L:
- ld h,0
- ;Outputs HL to LCD register A
- ; I: a=LCD register, hl=output
- ; O: a=output, hl=output
- ;FO: all=unaffected
- LCD_Out_A_HL:
- out ($10),a
- out ($10),a
- ld a,h
- out ($11),a
- ld a,l
- out ($11),a
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement