Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LCDUp: ;shifts the LCD up by the amount in a
- push bc ;
- push de ;Preserve registers
- push hl ;
- ld b,a
- LCDUpLoop
- push bc
- ld hl,LCDBuffer+12
- ld de,LCDBuffer
- ld bc,756
- ldir
- pop bc
- djnz LCDUpLoop
- pop hl ;
- pop de ;Restore registers
- pop bc ;
- ret
- LCDDown: ;shifts the screen down the amount of lines in a
- push bc ;
- push de ;Preserve registers
- push hl ;
- ld b,a
- LCDDownLoop
- push bc
- ld hl,LCDBuffer+767-12
- ld de,LCDBuffer+767
- ld bc,756
- lddr
- pop bc
- djnz LCDDownLoop
- pop hl ;
- pop de ;Restore registers
- pop bc ;
- ret
- LCDRight: ;shifts the screen right the amount of lines in a
- push bc ;
- push de ;Preserve registers
- push hl ;
- ld b,a
- LCDRightLoop:
- push bc
- ld hl,LCDBuffer
- ld c,64
- LCDRightMainLoop:
- ld b,12
- or a
- LCDRightSmallLoop:
- rr (hl)
- inc hl
- djnz LCDRightSmallLoop
- dec c
- jr nz,LCDRightMainLoop
- pop bc
- djnz LCDRightLoop
- pop hl ;
- pop de ;Restore registers
- pop bc ;
- ret
- LCDLeft: ;shifts the screen left the amount of lines in a
- push bc ;
- push de ;Preserve registers
- push hl ;
- ld b,a
- LCDLeftLoop:
- push bc
- ld hl,LCDBuffer+767
- ld c,64
- LCDLeftMainLoop:
- ld b,12
- or a
- LCDLeftSmallLoop:
- rl (hl)
- dec hl
- djnz LCDLeftSmallLoop
- dec c
- jr nz,LCDLeftMainLoop
- pop bc
- djnz LCDLeftLoop
- pop hl ;
- pop de ;Restore registers
- pop bc ;
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement