Home » Archimedes archive » Acorn Computing » 1994 06 subscription disc.adf » 9406s » BeebDisk/BarMenu
BeebDisk/BarMenu
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 » Archimedes archive » Acorn Computing » 1994 06 subscription disc.adf » 9406s |
Filename: | BeebDisk/BarMenu |
Read OK: | ✔ |
File size: | 0545 bytes |
Load address: | 0000 |
Exec address: | 0000 |
Duplicates
There is 1 duplicate copy of this file in the archive:
- Archimedes archive » Acorn Computing » 1994 06 subscription disc.adf » 9406s » BeebDisk/BarMenu
- AEW website » mu » mu_5_25_discs_Micro_User_12_04_D-MU12_04.ssd » BarMenu
File contents
10REM Mode 7 bar menu system 20REM by Stephen Wade 30REM (c) Acorn Computing 40MODE 7 50VDU 23,1,0;0;0;0; 60PROCmenu 70PROCbar 80PRINT TAB(0,22)"Item number ";Y%;" selected." 90VDU 23,1,1;0;0;0; 100END 110: 120DEFPROCmenu 130READ text$,items%,bcol%,tcol%,notsel%,selcol%,left%,right%,top% 140bcol%=bcol%+144 150tcol%=tcol%+128 160notsel%=notsel%+128 170selcol%=selcol%+128 180VDU 31,left%-1,top%,bcol%,60 190FOR X%=left%+1 TO right%-1 200VDU 44 210NEXT 220VDU 108 230FOR Y%=top%+1 TO top%+items%+2 240VDU 31,left%-1,Y%,bcol%,53,notsel%,31,right%-1,Y%,bcol%,106 250NEXT 260VDU 31,left%-1,top%+items%+3,bcol%,45 270FOR X%=left%+1 TO right%-1:VDU 44 280NEXT 290VDU 46 300VDU 31,left%+1,top%,tcol% 310PRINT text$;CHR$(bcol%) 320X%=left%+2 330Y%=top%+2 340FOR loop%=1 TO items% 350READ text$ 360PRINT TAB(X%,Y%);LEFT$(text$,right%-left%-3) 370Y%=Y%+1 380NEXT 390ENDPROC 400: 410DEF PROCbar 420*FX 4,1 430X%=left%+1 440Y%=top%+2 450REPEAT 460VDU 31,X%,Y%,selcol% 470key%=GET 480IF key%=138 VDU 31,X%,Y%,notsel%:Y%=Y%+1 490IF Y%>top%+items%+1 Y%=top%+2 500IF key%=139 VDU 31,X%,Y%,notsel%:Y%=Y%-1 510IF Y%<top%+2 Y%=top%+items%+1 520UNTIL key%=13 530Y%=Y%-top%-1 540*FX 4,0 550ENDPROC 560: 570DATA Example,15,4,7,1,3,10,30,2 580DATA ABCDEFGHIJKLMNOPQRSTU 590DATA We are some 600DATA sample items 610DATA using the 620DATA bar-menu 630DATA routines. 640DATA Why don't 650DATA you use the 660DATA up and down 670DATA cursor keys 680DATA followed by 690DATA return to 700DATA select one 710DATA of us? 720DATA ABCDEFGHIJKLMNOPQRSTU
� Mode 7 bar menu system � by Stephen Wade � (c) Acorn Computing (� 7 2� 23,1,0;0;0;0; < �menu F�bar P*� �0,22)"Item number ";Y%;" selected." Z� 23,1,1;0;0;0; d� n: x ��menu �@� text$,items%,bcol%,tcol%,notsel%,selcol%,left%,right%,top% �bcol%=bcol%+144 �tcol%=tcol%+128 �notsel%=notsel%+128 �selcol%=selcol%+128 �� 31,left%-1,top%,bcol%,60 �� X%=left%+1 � right%-1 �� 44 �� � � 108 �� Y%=top%+1 � top%+items%+2 �=� 31,left%-1,Y%,bcol%,53,notsel%,31,right%-1,Y%,bcol%,106 �� '� 31,left%-1,top%+items%+3,bcol%,45 � X%=left%+1 � right%-1:� 44 � "� 46 ,� 31,left%+1,top%,tcol% 6� text$;�(bcol%) @X%=left%+2 J Y%=top%+2 T� loop%=1 � items% ^� text$ h$� �X%,Y%);�text$,right%-left%-3) rY%=Y%+1 |� �� �: � � �bar �*FX 4,1 �X%=left%+1 � Y%=top%+2 �� �� 31,X%,Y%,selcol% � key%=� �)� key%=138 � 31,X%,Y%,notsel%:Y%=Y%+1 � � Y%>top%+items%+1 Y%=top%+2 �)� key%=139 � 31,X%,Y%,notsel%:Y%=Y%-1 � � Y%<top%+2 Y%=top%+items%+1 � key%=13 Y%=Y%-top%-1 *FX 4,0 &� 0: : � Example,15,4,7,1,3,10,30,2 D� ABCDEFGHIJKLMNOPQRSTU N� We are some X� sample items b� using the l� bar-menu v� routines. �� Why don't �� you use the �� up and down �� cursor keys �� followed by �� return to �� select one �� of us? �� ABCDEFGHIJKLMNOPQRSTU �
00000000 0d 00 0a 1c f4 20 4d 6f 64 65 20 37 20 62 61 72 |..... Mode 7 bar| 00000010 20 6d 65 6e 75 20 73 79 73 74 65 6d 0d 00 14 15 | menu system....| 00000020 f4 20 62 79 20 53 74 65 70 68 65 6e 20 57 61 64 |. by Stephen Wad| 00000030 65 0d 00 1e 19 f4 20 28 63 29 20 41 63 6f 72 6e |e..... (c) Acorn| 00000040 20 43 6f 6d 70 75 74 69 6e 67 0d 00 28 07 eb 20 | Computing..(.. | 00000050 37 0d 00 32 13 ef 20 32 33 2c 31 2c 30 3b 30 3b |7..2.. 23,1,0;0;| 00000060 30 3b 30 3b 0d 00 3c 09 f2 6d 65 6e 75 0d 00 46 |0;0;..<..menu..F| 00000070 08 f2 62 61 72 0d 00 50 2a f1 20 8a 30 2c 32 32 |..bar..P*. .0,22| 00000080 29 22 49 74 65 6d 20 6e 75 6d 62 65 72 20 22 3b |)"Item number ";| 00000090 59 25 3b 22 20 73 65 6c 65 63 74 65 64 2e 22 0d |Y%;" selected.".| 000000a0 00 5a 13 ef 20 32 33 2c 31 2c 31 3b 30 3b 30 3b |.Z.. 23,1,1;0;0;| 000000b0 30 3b 0d 00 64 05 e0 0d 00 6e 05 3a 0d 00 78 0a |0;..d....n.:..x.| 000000c0 dd f2 6d 65 6e 75 0d 00 82 40 f3 20 74 65 78 74 |..menu...@. text| 000000d0 24 2c 69 74 65 6d 73 25 2c 62 63 6f 6c 25 2c 74 |$,items%,bcol%,t| 000000e0 63 6f 6c 25 2c 6e 6f 74 73 65 6c 25 2c 73 65 6c |col%,notsel%,sel| 000000f0 63 6f 6c 25 2c 6c 65 66 74 25 2c 72 69 67 68 74 |col%,left%,right| 00000100 25 2c 74 6f 70 25 0d 00 8c 13 62 63 6f 6c 25 3d |%,top%....bcol%=| 00000110 62 63 6f 6c 25 2b 31 34 34 0d 00 96 13 74 63 6f |bcol%+144....tco| 00000120 6c 25 3d 74 63 6f 6c 25 2b 31 32 38 0d 00 a0 17 |l%=tcol%+128....| 00000130 6e 6f 74 73 65 6c 25 3d 6e 6f 74 73 65 6c 25 2b |notsel%=notsel%+| 00000140 31 32 38 0d 00 aa 17 73 65 6c 63 6f 6c 25 3d 73 |128....selcol%=s| 00000150 65 6c 63 6f 6c 25 2b 31 32 38 0d 00 b4 1e ef 20 |elcol%+128..... | 00000160 33 31 2c 6c 65 66 74 25 2d 31 2c 74 6f 70 25 2c |31,left%-1,top%,| 00000170 62 63 6f 6c 25 2c 36 30 0d 00 be 1b e3 20 58 25 |bcol%,60..... X%| 00000180 3d 6c 65 66 74 25 2b 31 20 b8 20 72 69 67 68 74 |=left%+1 . right| 00000190 25 2d 31 0d 00 c8 08 ef 20 34 34 0d 00 d2 05 ed |%-1..... 44.....| 000001a0 0d 00 dc 09 ef 20 31 30 38 0d 00 e6 1f e3 20 59 |..... 108..... Y| 000001b0 25 3d 74 6f 70 25 2b 31 20 b8 20 74 6f 70 25 2b |%=top%+1 . top%+| 000001c0 69 74 65 6d 73 25 2b 32 0d 00 f0 3d ef 20 33 31 |items%+2...=. 31| 000001d0 2c 6c 65 66 74 25 2d 31 2c 59 25 2c 62 63 6f 6c |,left%-1,Y%,bcol| 000001e0 25 2c 35 33 2c 6e 6f 74 73 65 6c 25 2c 33 31 2c |%,53,notsel%,31,| 000001f0 72 69 67 68 74 25 2d 31 2c 59 25 2c 62 63 6f 6c |right%-1,Y%,bcol| 00000200 25 2c 31 30 36 0d 00 fa 05 ed 0d 01 04 27 ef 20 |%,106........'. | 00000210 33 31 2c 6c 65 66 74 25 2d 31 2c 74 6f 70 25 2b |31,left%-1,top%+| 00000220 69 74 65 6d 73 25 2b 33 2c 62 63 6f 6c 25 2c 34 |items%+3,bcol%,4| 00000230 35 0d 01 0e 20 e3 20 58 25 3d 6c 65 66 74 25 2b |5... . X%=left%+| 00000240 31 20 b8 20 72 69 67 68 74 25 2d 31 3a ef 20 34 |1 . right%-1:. 4| 00000250 34 0d 01 18 05 ed 0d 01 22 08 ef 20 34 36 0d 01 |4.......".. 46..| 00000260 2c 1b ef 20 33 31 2c 6c 65 66 74 25 2b 31 2c 74 |,.. 31,left%+1,t| 00000270 6f 70 25 2c 74 63 6f 6c 25 0d 01 36 14 f1 20 74 |op%,tcol%..6.. t| 00000280 65 78 74 24 3b bd 28 62 63 6f 6c 25 29 0d 01 40 |ext$;.(bcol%)..@| 00000290 0e 58 25 3d 6c 65 66 74 25 2b 32 0d 01 4a 0d 59 |.X%=left%+2..J.Y| 000002a0 25 3d 74 6f 70 25 2b 32 0d 01 54 16 e3 20 6c 6f |%=top%+2..T.. lo| 000002b0 6f 70 25 3d 31 20 b8 20 69 74 65 6d 73 25 0d 01 |op%=1 . items%..| 000002c0 5e 0b f3 20 74 65 78 74 24 0d 01 68 24 f1 20 8a |^.. text$..h$. .| 000002d0 58 25 2c 59 25 29 3b c0 74 65 78 74 24 2c 72 69 |X%,Y%);.text$,ri| 000002e0 67 68 74 25 2d 6c 65 66 74 25 2d 33 29 0d 01 72 |ght%-left%-3)..r| 000002f0 0b 59 25 3d 59 25 2b 31 0d 01 7c 05 ed 0d 01 86 |.Y%=Y%+1..|.....| 00000300 05 e1 0d 01 90 05 3a 0d 01 9a 0a dd 20 f2 62 61 |......:..... .ba| 00000310 72 0d 01 a4 0b 2a 46 58 20 34 2c 31 0d 01 ae 0e |r....*FX 4,1....| 00000320 58 25 3d 6c 65 66 74 25 2b 31 0d 01 b8 0d 59 25 |X%=left%+1....Y%| 00000330 3d 74 6f 70 25 2b 32 0d 01 c2 05 f5 0d 01 cc 16 |=top%+2.........| 00000340 ef 20 33 31 2c 58 25 2c 59 25 2c 73 65 6c 63 6f |. 31,X%,Y%,selco| 00000350 6c 25 0d 01 d6 0a 6b 65 79 25 3d a5 0d 01 e0 29 |l%....key%=....)| 00000360 e7 20 6b 65 79 25 3d 31 33 38 20 ef 20 33 31 2c |. key%=138 . 31,| 00000370 58 25 2c 59 25 2c 6e 6f 74 73 65 6c 25 3a 59 25 |X%,Y%,notsel%:Y%| 00000380 3d 59 25 2b 31 0d 01 ea 20 e7 20 59 25 3e 74 6f |=Y%+1... . Y%>to| 00000390 70 25 2b 69 74 65 6d 73 25 2b 31 20 59 25 3d 74 |p%+items%+1 Y%=t| 000003a0 6f 70 25 2b 32 0d 01 f4 29 e7 20 6b 65 79 25 3d |op%+2...). key%=| 000003b0 31 33 39 20 ef 20 33 31 2c 58 25 2c 59 25 2c 6e |139 . 31,X%,Y%,n| 000003c0 6f 74 73 65 6c 25 3a 59 25 3d 59 25 2d 31 0d 01 |otsel%:Y%=Y%-1..| 000003d0 fe 20 e7 20 59 25 3c 74 6f 70 25 2b 32 20 59 25 |. . Y%<top%+2 Y%| 000003e0 3d 74 6f 70 25 2b 69 74 65 6d 73 25 2b 31 0d 02 |=top%+items%+1..| 000003f0 08 0d fd 20 6b 65 79 25 3d 31 33 0d 02 12 10 59 |... key%=13....Y| 00000400 25 3d 59 25 2d 74 6f 70 25 2d 31 0d 02 1c 0b 2a |%=Y%-top%-1....*| 00000410 46 58 20 34 2c 30 0d 02 26 05 e1 0d 02 30 05 3a |FX 4,0..&....0.:| 00000420 0d 02 3a 20 dc 20 45 78 61 6d 70 6c 65 2c 31 35 |..: . Example,15| 00000430 2c 34 2c 37 2c 31 2c 33 2c 31 30 2c 33 30 2c 32 |,4,7,1,3,10,30,2| 00000440 0d 02 44 1b dc 20 41 42 43 44 45 46 47 48 49 4a |..D.. ABCDEFGHIJ| 00000450 4b 4c 4d 4e 4f 50 51 52 53 54 55 0d 02 4e 11 dc |KLMNOPQRSTU..N..| 00000460 20 57 65 20 61 72 65 20 73 6f 6d 65 0d 02 58 12 | We are some..X.| 00000470 dc 20 73 61 6d 70 6c 65 20 69 74 65 6d 73 0d 02 |. sample items..| 00000480 62 0f dc 20 75 73 69 6e 67 20 74 68 65 0d 02 6c |b.. using the..l| 00000490 0e dc 20 62 61 72 2d 6d 65 6e 75 0d 02 76 0f dc |.. bar-menu..v..| 000004a0 20 72 6f 75 74 69 6e 65 73 2e 0d 02 80 0f dc 20 | routines...... | 000004b0 57 68 79 20 64 6f 6e 27 74 0d 02 8a 11 dc 20 79 |Why don't..... y| 000004c0 6f 75 20 75 73 65 20 74 68 65 0d 02 94 11 dc 20 |ou use the..... | 000004d0 75 70 20 61 6e 64 20 64 6f 77 6e 0d 02 9e 11 dc |up and down.....| 000004e0 20 63 75 72 73 6f 72 20 6b 65 79 73 0d 02 a8 11 | cursor keys....| 000004f0 dc 20 66 6f 6c 6c 6f 77 65 64 20 62 79 0d 02 b2 |. followed by...| 00000500 0f dc 20 72 65 74 75 72 6e 20 74 6f 0d 02 bc 10 |.. return to....| 00000510 dc 20 73 65 6c 65 63 74 20 6f 6e 65 0d 02 c6 0c |. select one....| 00000520 dc 20 6f 66 20 75 73 3f 0d 02 d0 1b dc 20 41 42 |. of us?..... AB| 00000530 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 51 52 |CDEFGHIJKLMNOPQR| 00000540 53 54 55 0d ff |STU..| 00000545