VOOZH about

URL: https://qiita.com/Stosstruppe/items/cd5e0c80ba2062ec69d9

⇱ PC-88 z80asmでVBLANK #Z80 - Qiita


👁 Image
2

Go to list of users who liked

0

Share on X(Twitter)

Share on Facebook

Add to Hatena Bookmark

More than 5 years have passed since last update.

@Stosstruppe

PC-88 z80asmでVBLANK

2
Last updated at Posted at 2018-08-08

直接テキストVRAMをクリアして書き込むより、仮想テキストVRAMに書き込んでからVBLANKで一気に転送する方がいいかもしれない。

vblank.asm
; z88dk / PC-88 mon
; z80asm -b -l vblank.asm

tvram equ $f3c8

 org $b000
start:
 call crtset
.loop
 ld e, a
 call vblank
 ld a, e
 call cls
 inc a
 jr loop

crtset:
 ld hl, $e6b4
 ld (hl), $f8 ; アトリビュート
 inc hl
 inc hl
 inc hl
 inc hl
 ld (hl), $00 ; ファンクション・キー表示スイッチ
 inc hl
 ld (hl), $ff ; カラー/白黒スイッチ
 ld b, 80
 ld c, 25
 call $6f6b ; CRTSET
 ret

vblank:
 in a, ($40)
 and $20
 jr nz, vblank
.wait
 in a, ($40)
 and $20
 jr z, wait
 ret

cls:
 ld hl, tvram
 ld de, 40
 ld c, 25
.clsy
 ld b, 80
.clsx
 ld (hl), a
 inc hl
 djnz clsx
 add hl, de
 dec c
 jr nz, clsy
 ret

👁 vblank.png

2

Go to list of users who liked

0
0

Go to list of comments

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2

Go to list of users who liked

0