~z88dk-team/z88dk-pkg/trunk

« back to all changes in this revision

Viewing changes to libsrc/sms/clear_vram.asm

  • Committer: Bazaar Package Importer
  • Author(s): Luca Falavigna
  • Date: 2008-02-12 08:23:49 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080212082349-wgijt44scmgje90o
Tags: 1.7.ds1-1ubuntu1
* Merge from Debian unstable. Remaining Ubuntu changes:
  - build z88dk and z88dk-bin binary packages for lpia too
  - update Maintainer field as per spec

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
        XLIB    clear_vram
 
2
        LIB     VRAMToHL
 
3
        
 
4
;==============================================================
 
5
; Clear VRAM
 
6
;==============================================================
 
7
; Sets all of VRAM to zero
 
8
;==============================================================
 
9
.clear_vram
 
10
        ld      hl,$0000
 
11
        call    VRAMToHL
 
12
        ; Output 16KB of zeroes
 
13
        ld      hl, $4000    ; Counter for 16KB of VRAM
 
14
        ld      a, $00       ; Value to write
 
15
.clearVRAM1
 
16
        out     ($be),a      ; Output to VRAM address, which is auto-incremented after each write
 
17
        dec     h
 
18
        jp      nz, clearVRAM1
 
19
        dec     l
 
20
        jp      nz, clearVRAM1
 
21
        ret