Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_29.ADF » P/+sctxt1
P/+sctxt1
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_29.ADF |
Filename: | P/+sctxt1 |
Read OK: | ✔ |
File size: | 12E7 bytes |
Load address: | 2B204556 |
Exec address: | 78746373 |
File contents
SCREEN SCROLLING ROUTINES ~~~~~~~~~~~~~~~~~~~~~~~~~ By Richard Dimond Since I found that I had the game 'Thrust' on 'Play it Again Sam 1' which I had successfully transferred to disc, I thought that I would try to get the routines that Mark Bellis was wanting. However all my efforts to try to break out of the program to get the coding were foiled by getting the opening screen each time. The only way out then was to press break and lose the program. I thought then that I would try to make my own routines and I have put on the disc a demonstration of these routines. I wanted to use the Thrust screen and tried to get it using Snapshot but I could not gat this to work so I have made up a rather crude screen with some BASIC routines to show how they work. When run, press 1, 2 or 3 to choose the scroll and afterwards, space re-runs the program or Q to quit. While these do not give as smooth or as quick a scroll as in Thrust, I hope that they may form a basis for someone to enjoy experimenting with them. If anyone has any problems, I shall be glad to help and, if I acn improve them myself later, I will send them in. Here is some explanation of how I developed these and how they work for those interested in experimenting with them. I realised that it needed something like - LDA &6482 :STA &6480 :LDA &648A :STA &6488 : .... LDA &6484 :STA &6482 :LDA &648C :STA &648A : .... LDA &6486 :STA &6484 : .... LDA &65C0 :STA &6486 : .... LDA &65C2 :STA &65C0 : .... etc I made up the BASIC program BSCROLL to do this. This works provided that the odd bytes of each character were zero and also was very slow. After coding this, it ran much quicker and smoother but was not as quick as the Thrust routine. To speed it up I have made it scroll 4 bytes at a time rather than 2 and also had to include all 4 bytes though this does not give as smooth a scroll. To do this I have used the routine - LDY#0 .loop3 LDA(a),Y : STA(b),Y INY CPY#4:BNEloop3 where a and b are zero page addresses pointing to screen addresses with a initially = b+4. The addresses are then incrased by 8 for the next character and repeated 40 times to complete the line. This has then scrolled lower half of the characters into the top half. Next the upper half of the characters in the next line must be scrolled into the lower half of the line above. To do this a must be set to the address of the start of the next line and the initial value of b increased by 4. This is done by subtracting from their values at the end of the line at suba. A similar subtraction is then made at the end of this line at subb to bring the values back to a = b+4 for scrolling the lower half of this line. The value in register X is compared to alternate between the two subs. The scrolling then continues then until the comparisom of a+1 at chk in line 480. When this is equal, the comparison in line 500 is made and if not equal, the scrolling continues half a line each time until this is equal. The coding can easily be altered to cover a different area of the screen by altering four values - b can be the value of the start of any line ie &5800 plus any multiple of &140 a must initially be equal to b+4 the comparison value in line 480 can be any value greater than the high byte of the addresses up to &7F the address in line 500 should equal b Having got this scrolling working well, I found that Thrust also had routines for scrolling down and left so I tried modifying the program to do these scrollings as well. To scroll down is very similar. except that the initial values of a and b must point to the last line and the comparison in line 400 to the upper limit. The address in line 420 must also be the last non zero byte of the screen. The left scroll is rather different. The bits of the screen have to be shifted left four times each time. This done with the routine in loop3 lines 240 - 290. The two bytes to be shifted each time needed to stored in temp, shifted and loaded back each time. Also the characters are shifted in columns rather than lines. To do this, I saved the addresses of the top of the column in aa and bb and increased these by 8 after each column had been shifted. The routine is stopped at line 430 as before but the address can be any suitable non zero point in mid screen. **************************************************************************
00000000 20 0d 53 43 52 45 45 4e 20 53 43 52 4f 4c 4c 49 | .SCREEN SCROLLI| 00000010 4e 47 20 52 4f 55 54 49 4e 45 53 0d 7e 7e 7e 7e |NG ROUTINES.~~~~| 00000020 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e |~~~~~~~~~~~~~~~~| 00000030 7e 7e 7e 7e 7e 0d 42 79 20 52 69 63 68 61 72 64 |~~~~~.By Richard| 00000040 20 44 69 6d 6f 6e 64 0d 0d 53 69 6e 63 65 1a 20 | Dimond..Since. | 00000050 49 20 66 6f 75 6e 64 20 74 68 61 74 20 49 20 68 |I found that I h| 00000060 61 64 20 74 68 65 20 67 61 6d 65 20 27 54 68 72 |ad the game 'Thr| 00000070 75 73 74 27 20 6f 6e 20 27 50 6c 61 79 20 69 74 |ust' on 'Play it| 00000080 20 41 67 61 69 6e 20 53 61 6d 20 31 27 20 77 68 | Again Sam 1' wh| 00000090 69 63 68 0d 49 20 68 61 64 1a 20 73 75 63 63 65 |ich.I had. succe| 000000a0 73 73 66 75 6c 6c 79 20 74 72 61 6e 73 66 65 72 |ssfully transfer| 000000b0 72 65 64 20 74 6f 20 64 69 73 63 2c 20 49 20 74 |red to disc, I t| 000000c0 68 6f 75 67 68 74 20 74 68 61 74 20 49 20 77 6f |hought that I wo| 000000d0 75 6c 64 20 74 72 79 20 74 6f 20 67 65 74 0d 74 |uld try to get.t| 000000e0 68 65 20 72 6f 75 74 69 6e 65 73 20 74 68 61 74 |he routines that| 000000f0 1a 20 4d 61 72 6b 20 42 65 6c 6c 69 73 20 77 61 |. Mark Bellis wa| 00000100 73 20 77 61 6e 74 69 6e 67 2e 20 20 48 6f 77 65 |s wanting. Howe| 00000110 76 65 72 20 61 6c 6c 20 6d 79 20 65 66 66 6f 72 |ver all my effor| 00000120 74 73 20 74 6f 20 74 72 79 0d 74 6f 20 62 72 65 |ts to try.to bre| 00000130 61 6b 20 6f 75 74 20 6f 66 1a 20 74 68 65 1a 20 |ak out of. the. | 00000140 70 72 6f 67 72 61 6d 20 74 6f 20 67 65 74 20 74 |program to get t| 00000150 68 65 20 63 6f 64 69 6e 67 20 77 65 72 65 20 66 |he coding were f| 00000160 6f 69 6c 65 64 20 62 79 20 67 65 74 74 69 6e 67 |oiled by getting| 00000170 20 74 68 65 0d 6f 70 65 6e 69 6e 67 20 73 63 72 | the.opening scr| 00000180 65 65 6e 20 65 61 63 68 20 74 69 6d 65 2e 20 20 |een each time. | 00000190 54 68 65 20 6f 6e 6c 79 1a 20 77 61 79 1a 20 6f |The only. way. o| 000001a0 75 74 1a 20 74 68 65 6e 20 77 61 73 20 74 6f 20 |ut. then was to | 000001b0 70 72 65 73 73 20 62 72 65 61 6b 20 61 6e 64 0d |press break and.| 000001c0 6c 6f 73 65 20 74 68 65 20 70 72 6f 67 72 61 6d |lose the program| 000001d0 2e 0d 0d 49 20 74 68 6f 75 67 68 74 20 74 68 65 |...I thought the| 000001e0 6e 20 74 68 61 74 20 49 1a 20 77 6f 75 6c 64 20 |n that I. would | 000001f0 74 72 79 20 74 6f 20 6d 61 6b 65 20 6d 79 20 6f |try to make my o| 00000200 77 6e 20 72 6f 75 74 69 6e 65 73 20 61 6e 64 20 |wn routines and | 00000210 49 20 68 61 76 65 20 70 75 74 20 6f 6e 0d 74 68 |I have put on.th| 00000220 65 20 64 69 73 63 20 61 20 64 65 6d 6f 6e 73 74 |e disc a demonst| 00000230 72 61 74 69 6f 6e 20 6f 66 20 74 68 65 73 65 1a |ration of these.| 00000240 20 72 6f 75 74 69 6e 65 73 2e 1a 20 20 49 20 77 | routines.. I w| 00000250 61 6e 74 65 64 20 74 6f 20 20 75 73 65 20 74 68 |anted to use th| 00000260 65 20 54 68 72 75 73 74 0d 73 63 72 65 65 6e 20 |e Thrust.screen | 00000270 61 6e 64 20 74 72 69 65 64 20 74 6f 20 67 65 74 |and tried to get| 00000280 20 69 74 20 75 73 69 6e 67 20 53 6e 61 70 73 68 | it using Snapsh| 00000290 6f 74 20 62 75 74 20 49 20 63 6f 75 6c 64 20 6e |ot but I could n| 000002a0 6f 74 20 67 61 74 20 74 68 69 73 20 74 6f 20 77 |ot gat this to w| 000002b0 6f 72 6b 0d 73 6f 20 49 20 68 61 76 65 20 6d 61 |ork.so I have ma| 000002c0 64 65 20 75 70 1a 20 61 1a 20 72 61 74 68 65 72 |de up. a. rather| 000002d0 20 63 72 75 64 65 20 73 63 72 65 65 6e 20 77 69 | crude screen wi| 000002e0 74 68 20 73 6f 6d 65 20 42 41 53 49 43 20 72 6f |th some BASIC ro| 000002f0 75 74 69 6e 65 73 20 74 6f 20 73 68 6f 77 0d 68 |utines to show.h| 00000300 6f 77 20 74 68 65 79 20 77 6f 72 6b 2e 20 20 57 |ow they work. W| 00000310 68 65 6e 20 72 75 6e 2c 20 70 72 65 73 73 20 31 |hen run, press 1| 00000320 2c 1a 20 32 1a 20 6f 72 1a 20 33 1a 20 74 6f 1a |,. 2. or. 3. to.| 00000330 20 63 68 6f 6f 73 65 1a 20 74 68 65 1a 20 73 63 | choose. the. sc| 00000340 72 6f 6c 6c 1a 20 61 6e 64 0d 61 66 74 65 72 77 |roll. and.afterw| 00000350 61 72 64 73 2c 20 73 70 61 63 65 20 72 65 2d 72 |ards, space re-r| 00000360 75 6e 73 20 74 68 65 20 70 72 6f 67 72 61 6d 20 |uns the program | 00000370 6f 72 20 51 20 74 6f 20 71 75 69 74 2e 0d 0d 57 |or Q to quit...W| 00000380 68 69 6c 65 20 74 68 65 73 65 20 64 6f 20 6e 6f |hile these do no| 00000390 74 20 67 69 76 65 1a 20 61 73 1a 20 73 6d 6f 6f |t give. as. smoo| 000003a0 74 68 1a 20 6f 72 1a 20 61 73 20 71 75 69 63 6b |th. or. as quick| 000003b0 20 61 20 73 63 72 6f 6c 6c 20 61 73 20 69 6e 20 | a scroll as in | 000003c0 54 68 72 75 73 74 2c 20 49 0d 68 6f 70 65 20 74 |Thrust, I.hope t| 000003d0 68 61 74 20 74 68 65 79 20 6d 61 79 20 66 6f 72 |hat they may for| 000003e0 6d 20 61 20 62 61 73 69 73 20 66 6f 72 20 73 6f |m a basis for so| 000003f0 6d 65 6f 6e 65 1a 20 74 6f 1a 20 65 6e 6a 6f 79 |meone. to. enjoy| 00000400 1a 20 65 78 70 65 72 69 6d 65 6e 74 69 6e 67 20 |. experimenting | 00000410 77 69 74 68 0d 74 68 65 6d 2e 20 20 49 66 20 61 |with.them. If a| 00000420 6e 79 6f 6e 65 20 68 61 73 20 61 6e 79 20 70 72 |nyone has any pr| 00000430 6f 62 6c 65 6d 73 2c 20 49 20 73 68 61 6c 6c 20 |oblems, I shall | 00000440 62 65 20 67 6c 61 64 20 74 6f 20 68 65 6c 70 1a |be glad to help.| 00000450 20 61 6e 64 2c 1a 20 69 66 20 49 20 61 63 6e 0d | and,. if I acn.| 00000460 69 6d 70 72 6f 76 65 20 74 68 65 6d 20 6d 79 73 |improve them mys| 00000470 65 6c 66 20 6c 61 74 65 72 2c 20 49 20 77 69 6c |elf later, I wil| 00000480 6c 20 73 65 6e 64 20 74 68 65 6d 20 69 6e 2e 0d |l send them in..| 00000490 0d 48 65 72 65 20 69 73 20 73 6f 6d 65 20 65 78 |.Here is some ex| 000004a0 70 6c 61 6e 61 74 69 6f 6e 20 6f 66 20 68 6f 77 |planation of how| 000004b0 20 49 20 64 65 76 65 6c 6f 70 65 64 1a 20 74 68 | I developed. th| 000004c0 65 73 65 1a 20 61 6e 64 1a 20 68 6f 77 20 74 68 |ese. and. how th| 000004d0 65 79 20 77 6f 72 6b 20 66 6f 72 0d 74 68 6f 73 |ey work for.thos| 000004e0 65 20 69 6e 74 65 72 65 73 74 65 64 20 69 6e 20 |e interested in | 000004f0 65 78 70 65 72 69 6d 65 6e 74 69 6e 67 20 77 69 |experimenting wi| 00000500 74 68 20 74 68 65 6d 2e 0d 0d 49 20 72 65 61 6c |th them...I real| 00000510 69 73 65 64 20 74 68 61 74 20 69 74 20 6e 65 65 |ised that it nee| 00000520 64 65 64 20 73 6f 6d 65 74 68 69 6e 67 20 6c 69 |ded something li| 00000530 6b 65 20 2d 0d 0d 20 20 20 20 20 20 20 20 20 20 |ke -.. | 00000540 4c 44 41 20 26 36 34 38 32 20 3a 53 54 41 20 26 |LDA &6482 :STA &| 00000550 36 34 38 30 20 3a 4c 44 41 20 26 36 34 38 41 20 |6480 :LDA &648A | 00000560 3a 53 54 41 20 26 36 34 38 38 20 3a 20 2e 2e 2e |:STA &6488 : ...| 00000570 2e 0d 20 20 20 20 20 20 20 20 20 20 4c 44 41 20 |.. LDA | 00000580 26 36 34 38 34 20 3a 53 54 41 20 26 36 34 38 32 |&6484 :STA &6482| 00000590 20 3a 4c 44 41 20 26 36 34 38 43 20 3a 53 54 41 | :LDA &648C :STA| 000005a0 20 26 36 34 38 41 20 3a 20 2e 2e 2e 2e 0d 20 20 | &648A : ..... | 000005b0 20 20 20 20 20 20 20 20 4c 44 41 20 26 36 34 38 | LDA &648| 000005c0 36 20 3a 53 54 41 20 26 36 34 38 34 20 3a 20 2e |6 :STA &6484 : .| 000005d0 2e 2e 2e 0d 20 20 20 20 20 20 20 20 20 20 4c 44 |.... LD| 000005e0 41 20 26 36 35 43 30 20 3a 53 54 41 20 26 36 34 |A &65C0 :STA &64| 000005f0 38 36 20 3a 20 2e 2e 2e 2e 0d 20 20 20 20 20 20 |86 : ..... | 00000600 20 20 20 20 4c 44 41 20 26 36 35 43 32 20 3a 53 | LDA &65C2 :S| 00000610 54 41 20 26 36 35 43 30 20 3a 20 2e 2e 2e 2e 0d |TA &65C0 : .....| 00000620 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000630 20 65 74 63 0d 0d 49 1a 20 6d 61 64 65 20 75 70 | etc..I. made up| 00000640 20 74 68 65 20 42 41 53 49 43 20 70 72 6f 67 72 | the BASIC progr| 00000650 61 6d 20 42 53 43 52 4f 4c 4c 20 74 6f 20 64 6f |am BSCROLL to do| 00000660 20 74 68 69 73 2e 20 20 54 68 69 73 20 77 6f 72 | this. This wor| 00000670 6b 73 20 70 72 6f 76 69 64 65 64 20 74 68 61 74 |ks provided that| 00000680 0d 74 68 65 20 6f 64 64 1a 20 62 79 74 65 73 1a |.the odd. bytes.| 00000690 20 6f 66 20 65 61 63 68 20 63 68 61 72 61 63 74 | of each charact| 000006a0 65 72 20 77 65 72 65 20 7a 65 72 6f 20 61 6e 64 |er were zero and| 000006b0 20 61 6c 73 6f 20 77 61 73 20 76 65 72 79 20 73 | also was very s| 000006c0 6c 6f 77 2e 20 20 41 66 74 65 72 0d 63 6f 64 69 |low. After.codi| 000006d0 6e 67 20 74 68 69 73 2c 20 69 74 20 72 61 6e 1a |ng this, it ran.| 000006e0 20 6d 75 63 68 20 71 75 69 63 6b 65 72 20 61 6e | much quicker an| 000006f0 64 20 73 6d 6f 6f 74 68 65 72 20 62 75 74 20 77 |d smoother but w| 00000700 61 73 20 6e 6f 74 20 61 73 20 71 75 69 63 6b 20 |as not as quick | 00000710 61 73 20 74 68 65 0d 54 68 72 75 73 74 20 72 6f |as the.Thrust ro| 00000720 75 74 69 6e 65 2e 0d 0d 54 6f 20 73 70 65 65 64 |utine...To speed| 00000730 20 69 74 20 75 70 20 49 1a 20 68 61 76 65 1a 20 | it up I. have. | 00000740 6d 61 64 65 20 69 74 20 73 63 72 6f 6c 6c 20 34 |made it scroll 4| 00000750 20 62 79 74 65 73 20 61 74 20 61 20 74 69 6d 65 | bytes at a time| 00000760 20 72 61 74 68 65 72 20 74 68 61 6e 20 32 20 61 | rather than 2 a| 00000770 6e 64 0d 61 6c 73 6f 20 68 61 64 20 74 6f 20 69 |nd.also had to i| 00000780 6e 63 6c 75 64 65 20 61 6c 6c 20 34 20 62 79 74 |nclude all 4 byt| 00000790 65 73 1a 20 74 68 6f 75 67 68 1a 20 74 68 69 73 |es. though. this| 000007a0 1a 20 64 6f 65 73 1a 20 6e 6f 74 1a 20 67 69 76 |. does. not. giv| 000007b0 65 20 61 73 20 73 6d 6f 6f 74 68 20 61 0d 73 63 |e as smooth a.sc| 000007c0 72 6f 6c 6c 2e 0d 0d 54 6f 20 64 6f 20 74 68 69 |roll...To do thi| 000007d0 73 20 49 20 68 61 76 65 20 75 73 65 64 20 74 68 |s I have used th| 000007e0 65 20 72 6f 75 74 69 6e 65 20 2d 0d 0d 20 20 20 |e routine -.. | 000007f0 20 20 20 20 20 20 20 20 20 20 20 20 4c 44 59 23 | LDY#| 00000800 30 0d 20 20 20 20 20 20 20 20 2e 6c 6f 6f 70 33 |0. .loop3| 00000810 20 4c 44 41 28 61 29 2c 59 20 3a 20 53 54 41 28 | LDA(a),Y : STA(| 00000820 62 29 2c 59 0d 20 20 20 20 20 20 20 20 20 20 20 |b),Y. | 00000830 20 20 20 20 49 4e 59 0d 20 20 20 20 20 20 20 20 | INY. | 00000840 20 20 20 20 20 20 20 43 50 59 23 34 3a 42 4e 45 | CPY#4:BNE| 00000850 6c 6f 6f 70 33 0d 0d 77 68 65 72 65 1a 20 20 61 |loop3..where. a| 00000860 1a 20 61 6e 64 20 62 20 61 72 65 20 7a 65 72 6f |. and b are zero| 00000870 20 70 61 67 65 20 61 64 64 72 65 73 73 65 73 20 | page addresses | 00000880 70 6f 69 6e 74 69 6e 67 20 74 6f 20 73 63 72 65 |pointing to scre| 00000890 65 6e 20 61 64 64 72 65 73 73 65 73 20 77 69 74 |en addresses wit| 000008a0 68 0d 61 20 69 6e 69 74 69 61 6c 6c 79 20 3d 20 |h.a initially = | 000008b0 62 2b 34 2e 0d 0d 54 68 65 20 61 64 64 72 65 73 |b+4...The addres| 000008c0 73 65 73 20 61 72 65 20 74 68 65 6e 20 69 6e 63 |ses are then inc| 000008d0 72 61 73 65 64 20 62 79 20 38 20 66 6f 72 1a 20 |rased by 8 for. | 000008e0 74 68 65 1a 20 6e 65 78 74 20 63 68 61 72 61 63 |the. next charac| 000008f0 74 65 72 20 61 6e 64 20 72 65 70 65 61 74 65 64 |ter and repeated| 00000900 0d 34 30 20 74 69 6d 65 73 20 74 6f 20 63 6f 6d |.40 times to com| 00000910 70 6c 65 74 65 20 74 68 65 20 6c 69 6e 65 2e 20 |plete the line. | 00000920 20 54 68 69 73 20 68 61 73 20 74 68 65 6e 1a 20 | This has then. | 00000930 73 63 72 6f 6c 6c 65 64 1a 20 6c 6f 77 65 72 20 |scrolled. lower | 00000940 68 61 6c 66 20 6f 66 20 74 68 65 0d 63 68 61 72 |half of the.char| 00000950 61 63 74 65 72 73 20 69 6e 74 6f 20 74 68 65 20 |acters into the | 00000960 74 6f 70 20 68 61 6c 66 2e 0d 0d 4e 65 78 74 20 |top half...Next | 00000970 74 68 65 20 75 70 70 65 72 20 68 61 6c 66 20 6f |the upper half o| 00000980 66 20 74 68 65 20 63 68 61 72 61 63 74 65 72 73 |f the characters| 00000990 20 69 6e 20 74 68 65 20 6e 65 78 74 20 6c 69 6e | in the next lin| 000009a0 65 1a 20 6d 75 73 74 1a 20 62 65 1a 20 73 63 72 |e. must. be. scr| 000009b0 6f 6c 6c 65 64 0d 69 6e 74 6f 1a 20 74 68 65 1a |olled.into. the.| 000009c0 20 6c 6f 77 65 72 1a 20 68 61 6c 66 20 6f 66 20 | lower. half of | 000009d0 74 68 65 20 6c 69 6e 65 20 61 62 6f 76 65 2e 20 |the line above. | 000009e0 20 54 6f 20 64 6f 20 74 68 69 73 20 61 20 6d 75 | To do this a mu| 000009f0 73 74 20 62 65 20 73 65 74 20 74 6f 20 74 68 65 |st be set to the| 00000a00 0d 61 64 64 72 65 73 73 20 6f 66 20 74 68 65 20 |.address of the | 00000a10 73 74 61 72 74 20 6f 66 20 74 68 65 20 6e 65 78 |start of the nex| 00000a20 74 20 6c 69 6e 65 20 61 6e 64 20 74 68 65 20 69 |t line and the i| 00000a30 6e 69 74 69 61 6c 20 76 61 6c 75 65 20 6f 66 20 |nitial value of | 00000a40 62 20 69 6e 63 72 65 61 73 65 64 0d 62 79 20 34 |b increased.by 4| 00000a50 2e 20 20 54 68 69 73 20 69 73 20 64 6f 6e 65 1a |. This is done.| 00000a60 20 62 79 1a 20 73 75 62 74 72 61 63 74 69 6e 67 | by. subtracting| 00000a70 1a 20 66 72 6f 6d 1a 20 74 68 65 69 72 20 76 61 |. from. their va| 00000a80 6c 75 65 73 20 61 74 20 74 68 65 20 65 6e 64 20 |lues at the end | 00000a90 6f 66 20 74 68 65 0d 6c 69 6e 65 20 61 74 20 73 |of the.line at s| 00000aa0 75 62 61 2e 0d 0d 41 20 73 69 6d 69 6c 61 72 20 |uba...A similar | 00000ab0 73 75 62 74 72 61 63 74 69 6f 6e 20 69 73 20 74 |subtraction is t| 00000ac0 68 65 6e 1a 20 6d 61 64 65 1a 20 61 74 1a 20 74 |hen. made. at. t| 00000ad0 68 65 1a 20 65 6e 64 1a 20 6f 66 20 74 68 69 73 |he. end. of this| 00000ae0 20 6c 69 6e 65 20 61 74 20 73 75 62 62 20 74 6f | line at subb to| 00000af0 0d 62 72 69 6e 67 20 74 68 65 20 76 61 6c 75 65 |.bring the value| 00000b00 73 20 62 61 63 6b 20 74 6f 20 61 20 3d 20 62 2b |s back to a = b+| 00000b10 34 20 66 6f 72 20 73 63 72 6f 6c 6c 69 6e 67 1a |4 for scrolling.| 00000b20 20 74 68 65 1a 20 6c 6f 77 65 72 1a 20 68 61 6c | the. lower. hal| 00000b30 66 1a 20 6f 66 1a 20 74 68 69 73 0d 6c 69 6e 65 |f. of. this.line| 00000b40 2e 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |.. | 00000b50 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00000b70 20 20 20 20 20 20 20 20 20 20 0d 54 68 65 20 76 | .The v| 00000b80 61 6c 75 65 20 69 6e 20 72 65 67 69 73 74 65 72 |alue in register| 00000b90 20 58 20 69 73 20 63 6f 6d 70 61 72 65 64 20 74 | X is compared t| 00000ba0 6f 20 61 6c 74 65 72 6e 61 74 65 20 62 65 74 77 |o alternate betw| 00000bb0 65 65 6e 20 74 68 65 20 74 77 6f 20 73 75 62 73 |een the two subs| 00000bc0 2e 0d 0d 54 68 65 20 73 63 72 6f 6c 6c 69 6e 67 |...The scrolling| 00000bd0 20 74 68 65 6e 20 63 6f 6e 74 69 6e 75 65 73 20 | then continues | 00000be0 74 68 65 6e 20 75 6e 74 69 6c 20 74 68 65 20 63 |then until the c| 00000bf0 6f 6d 70 61 72 69 73 6f 6d 20 6f 66 1a 20 61 2b |omparisom of. a+| 00000c00 31 1a 20 61 74 1a 20 63 68 6b 20 69 6e 0d 6c 69 |1. at. chk in.li| 00000c10 6e 65 20 34 38 30 2e 20 20 57 68 65 6e 20 74 68 |ne 480. When th| 00000c20 69 73 20 69 73 20 65 71 75 61 6c 2c 20 74 68 65 |is is equal, the| 00000c30 20 63 6f 6d 70 61 72 69 73 6f 6e 20 69 6e 20 6c | comparison in l| 00000c40 69 6e 65 20 35 30 30 20 69 73 1a 20 6d 61 64 65 |ine 500 is. made| 00000c50 1a 20 61 6e 64 20 69 66 0d 6e 6f 74 1a 20 65 71 |. and if.not. eq| 00000c60 75 61 6c 2c 1a 20 74 68 65 1a 20 73 63 72 6f 6c |ual,. the. scrol| 00000c70 6c 69 6e 67 1a 20 63 6f 6e 74 69 6e 75 65 73 20 |ling. continues | 00000c80 68 61 6c 66 20 61 20 6c 69 6e 65 20 65 61 63 68 |half a line each| 00000c90 20 74 69 6d 65 20 75 6e 74 69 6c 20 74 68 69 73 | time until this| 00000ca0 20 69 73 0d 65 71 75 61 6c 2e 0d 20 20 20 20 20 | is.equal.. | 00000cb0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00000cf0 20 20 20 20 20 20 20 20 20 20 20 20 20 0d 54 68 | .Th| 00000d00 65 20 63 6f 64 69 6e 67 20 63 61 6e 20 65 61 73 |e coding can eas| 00000d10 69 6c 79 20 62 65 1a 20 61 6c 74 65 72 65 64 1a |ily be. altered.| 00000d20 20 74 6f 20 63 6f 76 65 72 20 61 20 64 69 66 66 | to cover a diff| 00000d30 65 72 65 6e 74 20 61 72 65 61 20 6f 66 20 74 68 |erent area of th| 00000d40 65 20 73 63 72 65 65 6e 0d 62 79 20 61 6c 74 65 |e screen.by alte| 00000d50 72 69 6e 67 20 66 6f 75 72 20 76 61 6c 75 65 73 |ring four values| 00000d60 20 2d 20 0d 0d 20 20 20 20 20 20 20 20 20 62 20 | - .. b | 00000d70 63 61 6e 20 62 65 20 74 68 65 20 76 61 6c 75 65 |can be the value| 00000d80 20 6f 66 20 74 68 65 20 73 74 61 72 74 20 6f 66 | of the start of| 00000d90 20 61 6e 79 20 6c 69 6e 65 0d 20 20 20 20 20 20 | any line. | 00000da0 20 20 20 20 20 20 20 20 20 20 20 69 65 20 26 35 | ie &5| 00000db0 38 30 30 20 70 6c 75 73 20 61 6e 79 20 6d 75 6c |800 plus any mul| 00000dc0 74 69 70 6c 65 20 6f 66 20 26 31 34 30 0d 0d 20 |tiple of &140.. | 00000dd0 20 20 20 20 20 20 20 20 61 20 6d 75 73 74 20 69 | a must i| 00000de0 6e 69 74 69 61 6c 6c 79 20 62 65 20 65 71 75 61 |nitially be equa| 00000df0 6c 20 74 6f 20 62 2b 34 0d 0d 20 20 20 20 20 20 |l to b+4.. | 00000e00 20 20 20 74 68 65 20 63 6f 6d 70 61 72 69 73 6f | the compariso| 00000e10 6e 20 76 61 6c 75 65 20 69 6e 20 6c 69 6e 65 20 |n value in line | 00000e20 34 38 30 20 63 61 6e 20 62 65 20 61 6e 79 20 76 |480 can be any v| 00000e30 61 6c 75 65 20 67 72 65 61 74 65 72 0d 20 20 20 |alue greater. | 00000e40 20 20 20 20 20 20 20 20 20 20 20 20 74 68 61 6e | than| 00000e50 20 74 68 65 20 68 69 67 68 20 62 79 74 65 20 6f | the high byte o| 00000e60 66 20 74 68 65 20 61 64 64 72 65 73 73 65 73 20 |f the addresses | 00000e70 75 70 20 74 6f 20 26 37 46 0d 0d 20 20 20 20 20 |up to &7F.. | 00000e80 20 20 20 20 74 68 65 20 61 64 64 72 65 73 73 20 | the address | 00000e90 69 6e 20 6c 69 6e 65 20 35 30 30 20 73 68 6f 75 |in line 500 shou| 00000ea0 6c 64 20 65 71 75 61 6c 20 62 0d 0d 48 61 76 69 |ld equal b..Havi| 00000eb0 6e 67 1a 20 67 6f 74 1a 20 74 68 69 73 1a 20 73 |ng. got. this. s| 00000ec0 63 72 6f 6c 6c 69 6e 67 1a 20 77 6f 72 6b 69 6e |crolling. workin| 00000ed0 67 1a 20 77 65 6c 6c 2c 1a 20 49 20 66 6f 75 6e |g. well,. I foun| 00000ee0 64 20 74 68 61 74 20 54 68 72 75 73 74 20 61 6c |d that Thrust al| 00000ef0 73 6f 20 68 61 64 0d 72 6f 75 74 69 6e 65 73 20 |so had.routines | 00000f00 66 6f 72 20 73 63 72 6f 6c 6c 69 6e 67 20 64 6f |for scrolling do| 00000f10 77 6e 20 61 6e 64 20 6c 65 66 74 20 73 6f 1a 20 |wn and left so. | 00000f20 49 1a 20 74 72 69 65 64 20 6d 6f 64 69 66 79 69 |I. tried modifyi| 00000f30 6e 67 20 74 68 65 20 70 72 6f 67 72 61 6d 20 74 |ng the program t| 00000f40 6f 0d 64 6f 20 74 68 65 73 65 20 73 63 72 6f 6c |o.do these scrol| 00000f50 6c 69 6e 67 73 20 61 73 20 77 65 6c 6c 2e 0d 0d |lings as well...| 00000f60 54 6f 20 73 63 72 6f 6c 6c 20 64 6f 77 6e 20 69 |To scroll down i| 00000f70 73 20 76 65 72 79 20 73 69 6d 69 6c 61 72 2e 20 |s very similar. | 00000f80 65 78 63 65 70 74 20 74 68 61 74 20 74 68 65 1a |except that the.| 00000f90 20 69 6e 69 74 69 61 6c 20 76 61 6c 75 65 73 20 | initial values | 00000fa0 6f 66 20 61 20 61 6e 64 20 62 0d 6d 75 73 74 20 |of a and b.must | 00000fb0 70 6f 69 6e 74 20 74 6f 20 74 68 65 20 6c 61 73 |point to the las| 00000fc0 74 20 6c 69 6e 65 20 61 6e 64 20 74 68 65 20 63 |t line and the c| 00000fd0 6f 6d 70 61 72 69 73 6f 6e 20 69 6e 1a 20 6c 69 |omparison in. li| 00000fe0 6e 65 1a 20 34 30 30 1a 20 74 6f 20 74 68 65 20 |ne. 400. to the | 00000ff0 75 70 70 65 72 0d 6c 69 6d 69 74 2e 20 20 54 68 |upper.limit. Th| 00001000 65 20 61 64 64 72 65 73 73 20 69 6e 20 6c 69 6e |e address in lin| 00001010 65 20 34 32 30 20 6d 75 73 74 20 61 6c 73 6f 20 |e 420 must also | 00001020 62 65 20 74 68 65 20 6c 61 73 74 20 6e 6f 6e 20 |be the last non | 00001030 7a 65 72 6f 20 62 79 74 65 20 6f 66 20 74 68 65 |zero byte of the| 00001040 0d 73 63 72 65 65 6e 2e 0d 0d 54 68 65 1a 20 6c |.screen...The. l| 00001050 65 66 74 1a 20 73 63 72 6f 6c 6c 1a 20 69 73 20 |eft. scroll. is | 00001060 72 61 74 68 65 72 20 64 69 66 66 65 72 65 6e 74 |rather different| 00001070 2e 20 20 54 68 65 20 62 69 74 73 20 6f 66 20 74 |. The bits of t| 00001080 68 65 20 73 63 72 65 65 6e 20 68 61 76 65 20 74 |he screen have t| 00001090 6f 20 62 65 0d 73 68 69 66 74 65 64 20 6c 65 66 |o be.shifted lef| 000010a0 74 20 66 6f 75 72 20 74 69 6d 65 73 1a 20 65 61 |t four times. ea| 000010b0 63 68 1a 20 74 69 6d 65 2e 1a 20 20 54 68 69 73 |ch. time.. This| 000010c0 20 64 6f 6e 65 20 77 69 74 68 20 74 68 65 20 72 | done with the r| 000010d0 6f 75 74 69 6e 65 20 69 6e 20 6c 6f 6f 70 33 0d |outine in loop3.| 000010e0 6c 69 6e 65 73 20 32 34 30 20 2d 20 32 39 30 2e |lines 240 - 290.| 000010f0 0d 0d 54 68 65 20 74 77 6f 20 62 79 74 65 73 20 |..The two bytes | 00001100 74 6f 20 62 65 20 73 68 69 66 74 65 64 20 65 61 |to be shifted ea| 00001110 63 68 1a 20 74 69 6d 65 1a 20 6e 65 65 64 65 64 |ch. time. needed| 00001120 1a 20 74 6f 20 73 74 6f 72 65 64 20 69 6e 20 74 |. to stored in t| 00001130 65 6d 70 2c 20 73 68 69 66 74 65 64 0d 61 6e 64 |emp, shifted.and| 00001140 1a 20 6c 6f 61 64 65 64 1a 20 62 61 63 6b 20 65 |. loaded. back e| 00001150 61 63 68 20 74 69 6d 65 2e 20 20 41 6c 73 6f 20 |ach time. Also | 00001160 74 68 65 20 63 68 61 72 61 63 74 65 72 73 20 61 |the characters a| 00001170 72 65 20 73 68 69 66 74 65 64 1a 20 69 6e 1a 20 |re shifted. in. | 00001180 63 6f 6c 75 6d 6e 73 0d 72 61 74 68 65 72 20 74 |columns.rather t| 00001190 68 61 6e 20 6c 69 6e 65 73 2e 1a 20 20 54 6f 1a |han lines.. To.| 000011a0 20 64 6f 1a 20 74 68 69 73 2c 20 49 20 73 61 76 | do. this, I sav| 000011b0 65 64 20 74 68 65 20 61 64 64 72 65 73 73 65 73 |ed the addresses| 000011c0 20 6f 66 20 74 68 65 20 74 6f 70 20 6f 66 20 74 | of the top of t| 000011d0 68 65 0d 63 6f 6c 75 6d 6e 20 69 6e 20 61 61 20 |he.column in aa | 000011e0 61 6e 64 20 62 62 20 61 6e 64 1a 20 69 6e 63 72 |and bb and. incr| 000011f0 65 61 73 65 64 1a 20 74 68 65 73 65 1a 20 62 79 |eased. these. by| 00001200 20 38 20 61 66 74 65 72 20 65 61 63 68 20 63 6f | 8 after each co| 00001210 6c 75 6d 6e 20 68 61 64 20 62 65 65 6e 0d 73 68 |lumn had been.sh| 00001220 69 66 74 65 64 2e 0d 0d 54 68 65 20 72 6f 75 74 |ifted...The rout| 00001230 69 6e 65 20 69 73 20 73 74 6f 70 70 65 64 20 61 |ine is stopped a| 00001240 74 1a 20 6c 69 6e 65 1a 20 34 33 30 1a 20 61 73 |t. line. 430. as| 00001250 20 62 65 66 6f 72 65 20 62 75 74 20 74 68 65 20 | before but the | 00001260 61 64 64 72 65 73 73 20 63 61 6e 20 62 65 20 61 |address can be a| 00001270 6e 79 0d 73 75 69 74 61 62 6c 65 20 6e 6f 6e 20 |ny.suitable non | 00001280 7a 65 72 6f 20 70 6f 69 6e 74 20 69 6e 20 6d 69 |zero point in mi| 00001290 64 20 73 63 72 65 65 6e 2e 0d 0d 2a 2a 2a 2a 2a |d screen...*****| 000012a0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 000012e0 2a 2a 2a 2a 2a 0d 0d |*****..| 000012e7