CODINGSOURCES ★ CODING Source &033 - Affichage de text en Overscan ★

Routine d'affichage de text en overscan ( le code provient de Crown Cruncher v1.4 ). Ce source ce compile sans problème sous MAXAM ou l'assembleur de WinAPE.

 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; http://cpcrulez.fr
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

            org &4000

            di
            ld      a, &0C9
            ld      hl, (&39)
            ld      (hl), a

            ld      sp, &0

            ld      hl, byte_4127
            call    sub_40A1

            ld      hl, byte_4108
            call    sub_4091         ; modif registres BCxx

            ld      bc, &7F8A
            out     (c), c

            ld      hl, byte_412C    ;  text
            ld      de, &8000
            call    sub_40E2

            ld      hl, byte_4122
            call    sub_40A1

loc_404F:   call    sub_40BC
            jr      nc, loc_404F

loc_4054:   call    sub_40BC
            jr      c, loc_4054

jp 0

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

sub_4091:   ld      b, &0BC
            ld      a, (hl)
            inc     hl
            cp      &0FF
            ret     z
            out     (c), a
            inc     b
            ld      a, (hl)
            inc     hl
            out     (c), a
            jr      sub_4091

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

sub_40A1:   ld      bc, &7F10
            out     (c), c
            ld      a, (hl)
            inc     hl
            or      &40 ; '@'
            out     (c), a
            ld      c, &0

loc_40AE:   out     (c), c
            ld      a, (hl)
            inc     hl
            or      &40 ; '@'
            out     (c), a
            inc     c
            bit     &2, c
            jr      z, loc_40AE
            ret

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

sub_40BC:   ld      a, &5
            ld      bc, &0F782
            out     (c), c
            ld      bc, &0F40E
            out     (c), c
            ld      bc, &0F6C0
            out     (c), c
            ld      c, &0
            out     (c), c
            ld      bc, &0F792
            out     (c), c
            or      &40
            ld      c, a
            dec     b
            out     (c), c
            ld      b, &0F4
            in      a, (c)
            rla
            ret

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

sub_40E2:   ld      a, (hl)
            inc      hl
            or      a
            ret      z
            push      de
            exx
            pop      de
            ld      h, &7
            ld      l, a
            add      hl, hl
            add      hl, hl
            add      hl, hl
            ld      b, &8

loc_40F1:   ld      a, (hl)
            ld      (de), a
            inc      hl
            ld      a, d
            add      a, &8
            ld      d, a
            djnz      loc_40F1
            exx
            inc      de
            ld      a, d
            and      &7
            or      e
            jr      nz, sub_40E2
            ld      a, d
            add      a, &38
            ld      d, a
            jr      sub_40E2

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

read "datas.inc"

» Download ce fichier + le fichier  "data*.inc"

http://cpcrulez.fr

[next=coding_src]

A voir aussi sur CPCrulez , les sujets suivants pourront vous intéresser...

» Coding Source 31
» Coding Listing - Rsx - Fast Saving And Loading On The Cpc464   (Popular Computing Weekly)
» Coding Source 28 Scrollrasters
» Coding Listing - Rsx - Fast Disc Formatter
» Coding Listing - Game - Shoot   (Amstrad Computer User)
» Coding Listing - Graphic - Fractual Nebulae   (Computing With The Amstrad)
» Coding Listing - Graphic - Crtc - On - Screen Effects On The Cpc464   (Popular Computing Weekly)
» Coding Listing - Banner Print For Epson   (Amstrad Computer User)
» Coding Listing - League Fixtures   (The Amstrad User)

CPCrulez[Content Management System] v8.00 par hERMOL
Page créée en 202 millisecondes et consultée 159 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 CPC664 é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.