home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Disk User Volume 4 #5
/
Commodore_Disk_User_Vol.4_5_1991_-.d64
/
prob1b
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
2KB
|
96 lines
1000 ! this assembly language program,
1010 ! once you have assembled it using
1020 ! 6510+ or similar, will produce
1030 ! a smooth scrolling message on
1040 ! the bottom line of the screen.
1050 !
1060 *=$c000
1070 !
1080 sei
1090 lda #$7f
1100 sta $dc0d
1110 lda $dc0d
1120 lda #$1b
1130 sta $d011
1140 lda #$f2 ;_ set latch at bottom
1150 sta $d012 ; line of screen
1160 lda #<irq
1170 sta $0314
1180 lda #>irq
1190 sta $0315
1200 lda #$01
1210 sta $d019
1220 sta $d01a
1230 lda #147 ;_ clear screen
1240 jsr $ffd2 ;
1250 lda #14 ;_ lower case char. set
1260 jsr $ffd2 ;
1270 cli
1280 rts;_ return to basic
1290 !
1300 pixels byt $00 ;_ pixel offset
1310 byteno byt $00 ;_ pos'n in message
1320 !
1330 irq ;
1340 ldx #$02 ;_ timing loop of
1350 l1 dex ; 11 cycles
1360 bne l1 ;
1365 !
1370 lda pixels ;_ pixel shift of
1380 ora #$c0 ; bottom line
1390 sta $d016 ;
1400 lda #$fb
1410 l2 cmp $d012 ;_ wait until raster
1420 bne l2 ; line is in border
1430 lda #$c8
1440 sta $d016 ;_ reset pixel shift
1450 lda pixels ;_ horiz. pixel offset
1460 sec
1470 sbc #1 ;_ =speed (1-8)
1480 and #7 ;_ gives byte in range 0-7
1490 sta pixels ;_ store new offset
1500 bcs return ;_ branch to return
1505 !
1510 ldx #$00 ;
1520 br1 lda 1024+960+1,x;
1530 sta 1024+960,x ; shift bottom
1540 lda 55296+960+1,x ; line left by
1550 sta 55296+960,x ; one full
1560 inx ; char. pos'n
1570 cpx #$27 ;
1580 bne br1 ;
1585 !
1590 ldx byteno
1600 inx ;_ next character
1610 cpx #mess1-mess ;_ message done?
1620 bne br2 ;_ not yet!
1630 ldx #$00 ;_ reset position
1640 br2 stx byteno ;_ store position
1645 !
1650 lda mess,x ;_ get next char.
1660 sta 1024+999 ;_ and store it
1670 lda #1 ;
1680 sta 55296+999 ;_ colour it white
1685 !
1690 return ;
1695 !
1700 lda #$01 ;
1710 sta $d019 ; next latch
1720 jmp $ea31 ;
1730 !
1740 !
1750 mess ;_ message start
1760 ;
1770 byt " this program was written"
1780 byt " by jason finch for commo"
1790 byt "dore disk user techno inf"
1800 byt "o (march 1991). if you wo"
1810 byt "uld like to know how to d"
1820 byt "o this sort of smooth scr"
1830 byt "oller then consult the co"
1840 byt "mments in the program. si"
1850 byt "gned: jrf.... "
1860 byt " "
1870 ;
1880 mess1 ;_ mess1-mess=message length