lived.ch, 15.12.2023 C128_Edass_128_Source_Code Starts with SYS 2816 Press ENTER to END/QUIT Animation goanim.asm -a:0011-a: -e: *= $0b00 .obj m .bank 15 ; ;project: charanim.asm ;update 06.01.2024 ; ;set variable charmod = $2000 base = $400 color = $d800 ; ;------------------------------ ;what is it doing? ;transfer rom characters ;to ram. 1st 64 uppercase, ;starting $2000, dec 8192 ;------------------------------ ; ;make highres memory ready ;basic source code moved to $4000 ; jsr init ;char transfer mloop jsr create jsr $ffe4 cmp #$0d ;enter pressed beq out ;adios then jmp mloop out lda #$14 ;set normal char sta $a2c ;pointer lda #$93 ;clear screen jsr $ffd2 rts ;return to basic ; init lda #$ff sta $d8 lda #$3b ;bitmap on sta $d011 lda #$1b ;bitmap off sta $d011 lda #$00 sta $d8 ; lda #$05 ;screen color sta $d020 lda #$06 sta $d021 ; ;switch to bank 14 ;and do the transfer of first 256 ;characters ; lda #$01 ;bank 14 sta $ff00 ;where character ldx #$00 ;rom is get lda $d000,x ;transfer to ram sta $2000,x ;location 8192 lda $d0ff,x ;hex $2000 sta $20ff,x ;64 characters lda $d1ff,x ;need no more for sta $21ff,x ;animation inx cpx #$ff bne get ;loop until done ; ;back to bank 15 ; lda #$00 ;activate bank 15 sta $ff00 ;again ; ;set pointer ; lda #$18 ;point to the new sta $0a2c ;char location ; ;upercase ; ;$1e would be ; ;lowercase ;clear screen ;show the animation with @ and a ; lda #$93 jsr $ffd2 ldx #$00 show lda #$00 ;@ 2nd line sta base+40,x lda #$01 ;a 3rd line sta base+80,x lda #$01 sta color+40,x lda #$0e sta color+80,x lda #$02 sta base,x sta base+120,x lda #$01 sta color,x lda #$0e sta color+120,x inx cpx #$28 bne show ; ; make border ready ldx #$00 doit lda #$ff sta charmod+16,x inx cpx #$8 bne doit rts ; ;modifiy @, at $2000 location ; create ldx #$00 ldy #$00 animate lda char1,x ;get the bytes sta charmod,y ;store in $2000 lda char2,x sta charmod+8,y ;2nd character ; txa ;save x counter sta $02a1 ;store it here ldx #$00 ;small delay raster lda #$10 ;set according to wait0 cmp $d012 ;your needs bne wait0 inx cpx #$10 bne raster lda $02a1 ;get it back tax ;$02a1 is unused ; ;memory location inx ;continue our iny ;char animation cpy #$8 bne animate ldy #$00 cpx #24 ;until 24th byte bne animate ;is reached rts ;and repeat ;@ char1 .byte $c1,$80,$b6,$80,$9c,$c1,$e3,$c1 .byte $c1,$b6,$b6,$80,$9c,$c1,$e3,$c1 .byte $c1,$b6,$b6,$80,$9c,$c1,$e3,$c1 ;a char2 .byte $b6,$80,$80,$c1,$c9,$dd,$9c,$ff .byte $a6,$90,$88,$c1,$c9,$dc,$9f,$ff .byte $b2,$84,$88,$c1,$c9,$9d,$fc,$ff As mentioned, SYS 2816 to start it.