CODINGSOURCES ★ CODING Source &028 - Scroll vertical en Rasters ★

Scroll plein ecran en rastersCoding Sources

Ce source ce compile sans problème sous l'assembleur de WinAPE.

 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; http://cpcrulez.fr
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
            org &1000
off_3A8F    equ byte_37DD+690
off_3D46    equ byte_37DD+1385
            ld      a,&1
            call      &0BC0E
            ld       bc,&0
            call     &0BC38
            ld       bc,&0
            ld       a,&0
            call     &0BC32
            di
            ld       hl,&0C9FB
            ld       (&38),hl
            ei
            call     AffColonn           ; affiche les colonnes
            ld       a,&1
            ld       (byte_364C),a
            ld       bc,&7F00
            out      (c),c
            ld       a,&54
            out      (c),a
            ld       bc,&7F10
            out      (c),c
            ld       a,&54
            out      (c),a
loc_3552:   ld       b,&0F5
loc_3554:   in       a,(c)               ; &bb19
            rra
            jp       nc,loc_3554
loc_355A:   ld       hl,byte_37DD
            ld       (word_364E),hl
loc_3560:
            ld       hl,off_3A8F
            ld       (word_3650),hl
loc_3566:
            ld       hl,byte_37DD
            ld       (word_3652),hl
            halt
loc_3570:   ld       de,DATAraster
            ld       a,&0A0
loc_3575:   ex       af,af'
            ld       hl,(word_364E)
            ld       bc,&7F01
            out      (c),c
            outi
            ld       (word_364E),hl
            ld       hl,(word_3650)
            ld       bc,&7F02
            out      (c),c
            outi
            ld       (word_3650),hl
            ld       hl,(word_3652)
            ld       bc,&7F03
            out      (c),c
            outi
            ld       (word_3652),hl
            ld       bc,&0BC02
            out      (c),c
            inc      b
            ld       a,(de)
            inc      de
            out      (c),a
            ex       af,af'
            dec      a
            jp       nz,loc_3575
            ld       bc,&7F01
            out      (c),c
            ld       a,&54
            out      (c),a
            ld       bc,&7F02
            out      (c),c
            ld       a,&54
            out      (c),a
            ld       bc,&7F03
            out      (c),c
            ld       a,&54
            out      (c),a
            ld       bc,&0BC02
            out      (c),c
            ld       bc,&0BD2E
            out      (c),c
            ld       hl,(loc_355A+1)
            inc      hl
loc_35D5:   ld      a,1
            dec     a
            jp      nz,loc_35E0
            ld      a,&0E6
            ld      hl,byte_37DD
loc_35E0:   ld      (loc_35D5+1),a
            ld      (loc_355A+1),hl
            ld      hl,(loc_3560+1)
            inc     hl
loc_35EA:   ld      a,1
            dec     a
            jp      nz,loc_35F5
            ld      a,&0E6
            ld      hl,off_3A8F
loc_35F5:   ld      (loc_35EA+1),a
            ld      (loc_3560+1),hl
            ld      hl,(loc_3566+1)
            inc     hl
loc_35FF:   ld      a,1
            dec     a
            jp      nz,loc_360A
            ld      a,&0E6
            ld      hl,off_3D46
loc_360A:   ld      (loc_35FF+1),a
            ld      (loc_3566+1),hl
            ld      a,(byte_364C)
            cp      1
            jp      z,loc_362A
            ld      a,(byte_364D)
            dec     a
            ld      (byte_364D),a
            jp      nz,loc_3649
            ld      a,&1
            ld      (byte_364C),a
            jp      loc_3649
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
loc_362A:   ld       hl,(loc_3570+1)
            inc      hl
loc_362E:   ld       a,1
            dec      a
            jp       nz,loc_3643
            ld       a,&83
            ld       (byte_364D),a
            ld       a,&0
            ld       ( byte_364C),a
            ld       a,&83
            ld       hl,DATAraster
loc_3643:   ld      (loc_362E+&1),a
            ld      (loc_3570+&1),hl
loc_3649:
            jp      loc_3552
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Les datas
byte_364C:  db 0
byte_364D:  db 0
word_364E:  dw 0
word_3650:  dw 0
word_3652:  dw 0
DATAraster: db  '.....................................'
            db  '//000111111111111111111111111111111111111000//'
            db '.--,,,++++++++++++++++++++++++++++++++++++,,,---'
            db  '.....................................'
            db  '//000111111111111111111111111111111111111000//.--,,,++++'
            db  '++++++++++++++++++++++++++++++++,,,---..................'
            db  '...................//00011111111111111111111111111111111'
            db  '1111000//.--,,,++++++++++++++++++++++++++++++++++++,,,---'
byte_37DD:  db  'KKKKKKKKKKKKKKKTTTTTKKKKKKKKKKKKKKKTTTTTTTTTTTTTTTTTTTTTT'
            db  'TTTKKKKKKKKKKKKKKKTTTTTKKKKKKKKKKKKKKKTTTTTKKKKKKKKKKKKK'
            db  'KKKKTTTTTKKKKKKKKKKKKKKKTTTTTKKKKKKTTTTTTKKKTTTTTKKKKKKT'
            db  'TTTTTKKKTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT'
            db  'TTTTTTTKKKKKKKKKKKKKKKTTTTTKKKKKKKKKKKKKKKTTTTTTTTTTTTTT'
            db  'TTTTTTTTTTTKKKKKKKKKKKKKKKTTTTTKKKKKKKKKKKKKKKTTTTTKKKKK'
            db  'KKKKKKKKKKTTTTTKKKKKKKKKKKKKKKTTTTTKKKKKKTTTTTTKKKTTTTTK'
            db  'KKKKKTTTTTTKKKTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT'
            db  'TTTTTTTTTTTTTKKKKKKKKKKKKKKKTTTTTKKKKKKKKKKKKKKKTTTTTTTT'
            db  'TTTTTTTTTTTTTTTTTKKKKKKKKKKKKKKKTTTTTKKKKKKKKKKKKKKKTTTT'
            db  'TKKKKKKKKKKKKKKKTTTTTKKKKKKKKKKKKKKKTTTTTKKKKKKTTTTTTKKK'
            db  'TTTTTKKKKKKTTTTTTKKKTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT'
            db  'TTTTTTTTTTTTTTTTTTTKKKTTTTTTTTTTTTTTTTTKKKTTTTTTTTTKKKTT'
            db  'TTTTTTTTTTTTTTTTTTTTTTTKKKTTTKKKTTTTTTTTTTTKKKTTTKKKTTTK'
            db  'KKTTTTTKKKTTTTTTTTTKKKTTTTTKKKTTTKKKTTTKKKTTTTTKKKTTTKKK'
            db  'TTTKKKTTTTTKKKTTTKKKTTTKKKTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT'
            db  'TTTTTTTTTTTTTTTTTTTTTTTTTKKKTTTTTTTTTTTTTTTTTKKKTTTTTTTT'
            db  'TKKKTTTTTTTTTTTTTTTTTTTTTTTTTKKKTTTKKKTTTTTTTTTTTKKKTTTK'
            db  'KKTTTKKKTTTTTKKKTTTTTTTTTKKKTTTTTKKKTTTKKKTTTKKKTTTTTKKK'
            db  'TTTKKKTTTKKKTTTTTKKKTTTKKKTTTKKKTTTTTTTTTTTTTTTTTTTTTTTT'
            db  'TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTKKKTTTTTTTTTTTTTTTTT'
            db  'KKKTTTTTTTTTKKKTTTTTTTTTTTTTTTTTTTTTTTTTKKKTTTKKKTTTTTTT'
            db  'TTTTKKKTTTKKKTTTKKKTTTTTKKKTTTTTTTTTKKKTTTTTKKKTTTKKKTTT'
            db  'KKKTTTTTKKKTTTKKKTTTKKKTTTTTKKKTTTKKKTTTKKKTTTTTTTTTTTTT'
            db  'TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTKKKKKKKKKKKKKK'
            db  'KTTTTTKKKKKKKKKKKKKKKTTTTTTTTTTTTTTTTTTTTTTTTTTTTKKKTTTK'
            db  'KKKKKTTTTTKKKTTTKKKTTTKKKTTTTTKKKTTTTTTTTTKKKTTTTTKKKTTT'
            db  'KKKTTTKKKTTTTTKKKTTTTTTKKKKKKTTTTTKKKTTTTTTKKKKKKTTTTTTT'
            db  'TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTKKKKKKKK'
            db  'KKKKKKKTTTTTKKKKKKKKKKKKKKKTTTTTTTTTTTTTTTTTTTTTTTTTTTTK'
            db  'KKTTTKKKKKKTTTTTKKKTTTKKKTTTKKKTTTTTKKKTTTTTTTTTKKKTTTTT'
            db  'KKKTTTKKKTTTKKKTTTTTKKKTTTTTTKKKKKKTTTTTKKKTTTTTTKKKKKKT'
            db  'TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTKK'
            db  'KKKKKKKKKKKKKTTTTTKKKKKKKKKKKKKKKTTTTTTTTTTTTTTTTTTTTTTT'
            db  'TTTTTKKKTTTKKKKKKTTTTTKKKTTTKKKTTTKKKTTTTTKKKTTTTTTTTTKK'
            db  'KTTTTTKKKTTTKKKTTTKKKTTTTTKKKTTTTTTKKKKKKTTTTTKKKTTTTTTK'
            db  'KKKKKTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT'
            db  'TTTT'
            db   0
AffColonn:      ld      de,&0C000
                ld      hl,ecran_grille
                ld      a,(hl)
                inc     hl
                ld      (loc_4C1F+1),a
loc_4C17:       ld      a,d
                cp      0
                jp      z,locret_4C37
                ld      a,(hl)
                ld      b,a
loc_4C1F:       cp      1
                jp      z,loc_4C2B
                ld      a,b
                ld      (de),a
                inc     de
                inc     hl
                jp      loc_4C17
loc_4C2B:       inc     hl
                ld      a,(hl)
                inc     hl
                ld      b,(hl)
                inc     hl
loc_4C30:       ld      (de),a
                inc     de
                djnz    loc_4C30
                jp      loc_4C17
locret_4C37:    ret
ecran_grille:
                read "data.inc"

★ AMSTRAD CPC ★ DOWNLOAD ★

Other platform tool:
» coding  src28  scrollrastersDATE: 2005-03-03
DL: 101 fois
TYPE: ZIP
SIZE: 2Ko

Je participe au site:
» Newfile(s) upload/Envoye de fichier(s)
★ AMSTRAD CPC ★ A voir aussi sur CPCrulez , les sujets suivants pourront vous intéresser...

Lien(s):
» Coding » Logon System ACPC n°37 - Histoire de rasters
» Coding Src's » Big Scroll (Computing With the Amstrad)
» Coding Src's » Graphic - Scroll - Bremse
» Coding Src's » StarScroll Demo
» Coding Src's » Scrolling 16 pixels en overscan (TWO-MAG)
» Coding » AMSLIVE n°04 - Asic - Scrollhard

CPCrulez[Content Management System] v8.75-desktop/c
Page créée en 049 millisecondes et consultée 928 fois

L'Amstrad CPC est une machine 8 bits à base d'un Z80 à 4MHz. Le premier de la gamme fut le CPC 464 en 1984, équipé d'un lecteur de cassettes intégré il se plaçait en concurrent  du Commodore C64 beaucoup plus compliqué à utiliser et plus cher. Ce fut un réel succès et sorti cette même années le CPC 664 équipé d'un lecteur de disquettes trois pouces intégré. Sa vie fut de courte durée puisqu'en 1985 il fut remplacé par le CPC 6128 qui était plus compact, plus soigné et surtout qui avait 128Ko de RAM au lieu de 64Ko.