Home » Archimedes archive » Acorn User » AU 1994-11.adf » !AltBoot_AltBoot » MakeCheck
MakeCheck
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 User » AU 1994-11.adf » !AltBoot_AltBoot |
Filename: | MakeCheck |
Read OK: | ✔ |
File size: | 0772 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM Makes the CheckAlt module 20REM Needs the system variable Boot$Path to be set up, as 30REM it should be on a Risc PC 40REM The value given to OS_Byte &79 is the 'internal key 50REM number'. Full details of these are in the PRMs, but 60REM some useful ones are: 70REM Shift (either or both): 0, Ctrl (either or both): 1 80REM Alt (either or both): 2, L H shift: 3, L H Ctrl: 4 90REM L H Alt: 5, R H Shift: 6, R H Ctrl: 7, R H Alt: 8 100REM These values must be ORed with &80 to read just 110REM the value of the key being pressed. 120REM 130REM Copyright David Matthewman 1994 140DIM code% 200 150stack = 13 : link = 14 : pc = 15 160code = 0 : data = 1 : len = 2 : point = 3 : type = 4 170FOR opt% = 1 TO 3 STEP 2 180P% = code% 190[ 200 OPT opt% 210 STMFD stack !, {code,data,len,point,type,link} 220 MOV data,#&85 ; LH Alt key 230 MOV code,#&79 ; OS_Byte for keyboard scan 240 SWI "XOS_Byte" 250 LDMVSFD stack !, {code,data,len,point,type,pc}^ 260 TEQ data,#&FF 270 MVNEQ data,#0 ; 'True' value 280 MOVNE data,#0 ; 'False' value 290 STR data,laltvalue 300 ADR data,laltvalue 310 ADR code,laltstring 320 MOV len,#4 330 MOV point,#0 340 MOV type,#1 350 SWI "XOS_SetVarVal" 360 MOV data,#&88 ; RH Alt key 370 MOV code,#&79 ; OS_Byte for keyboard scan 380 SWI "XOS_Byte" 390 LDMVSFD stack !, {code,data,len,point,type,pc}^ 400 TEQ data,#&FF 410 MVNEQ data,#0 ; 'True' value 420 MOVNE data,#0 ; 'False' value 430 STR data,raltvalue 440 ADR data,raltvalue 450 ADR code,raltstring 460 MOV len,#4 470 MOV point,#0 480 MOV type,#1 490 SWI "XOS_SetVarVal" 500 LDMFD stack !, {code,data,len,point,type,pc}^ 510.laltvalue 520 EQUD 0 530.laltstring 540 EQUS "LHAlt$Pressed" 550 EQUB 0 560 ALIGN 570.raltvalue 580 EQUD 0 590.raltstring 600 EQUS "RHAlt$Pressed" 610 EQUB 0 620 ALIGN 630] 640NEXT 650OSCLI ("SAVE Boot:CheckAlt "+STR$~(code%)+" "+STR$~(P%)) 660OSCLI ("SETTYPE Boot:CheckAlt Utility") 670END 680
� Makes the CheckAlt module :� Needs the system variable Boot$Path to be set up, as � it should be on a Risc PC (9� The value given to OS_Byte &79 is the 'internal key 29� number'. Full details of these are in the PRMs, but <� some useful ones are: F9� Shift (either or both): 0, Ctrl (either or both): 1 P8� Alt (either or both): 2, L H shift: 3, L H Ctrl: 4 Z7� L H Alt: 5, R H Shift: 6, R H Ctrl: 7, R H Alt: 8 d5� These values must be ORed with &80 to read just n)� the value of the key being pressed. x� �%� Copyright David Matthewman 1994 �� code% 200 �$stack = 13 : link = 14 : pc = 15 �8code = 0 : data = 1 : len = 2 : point = 3 : type = 4 �� opt% = 1 � 3 � 2 �P% = code% �[ � OPT opt% �4 STMFD stack !, {code,data,len,point,type,link} �! MOV data,#&85 ; LH Alt key �0 MOV code,#&79 ; OS_Byte for keyboard scan � SWI "XOS_Byte" �5 LDMVSFD stack !, {code,data,len,point,type,pc}^ TEQ data,#&FF # MVNEQ data,#0 ; 'True' value $ MOVNE data,#0 ; 'False' value " STR data,laltvalue , ADR data,laltvalue 6 ADR code,laltstring @ MOV len,#4 J MOV point,#0 T MOV type,#1 ^ SWI "XOS_SetVarVal" h! MOV data,#&88 ; RH Alt key r0 MOV code,#&79 ; OS_Byte for keyboard scan | SWI "XOS_Byte" �5 LDMVSFD stack !, {code,data,len,point,type,pc}^ � TEQ data,#&FF �# MVNEQ data,#0 ; 'True' value �$ MOVNE data,#0 ; 'False' value � STR data,raltvalue � ADR data,raltvalue � ADR code,raltstring � MOV len,#4 � MOV point,#0 � MOV type,#1 � SWI "XOS_SetVarVal" �3 LDMFD stack !, {code,data,len,point,type,pc}^ �.laltvalue EQUD 0 .laltstring EQUS "LHAlt$Pressed" & EQUB 0 0 ALIGN :.raltvalue D EQUD 0 N.raltstring X EQUS "RHAlt$Pressed" b EQUB 0 l ALIGN v] �� �2� ("SAVE Boot:CheckAlt "+�~(code%)+" "+�~(P%)) �'� ("SETTYPE Boot:CheckAlt Utility") �� � �
00000000 0d 00 0a 1f f4 20 4d 61 6b 65 73 20 74 68 65 20 |..... Makes the | 00000010 43 68 65 63 6b 41 6c 74 20 6d 6f 64 75 6c 65 0d |CheckAlt module.| 00000020 00 14 3a f4 20 4e 65 65 64 73 20 74 68 65 20 73 |..:. Needs the s| 00000030 79 73 74 65 6d 20 76 61 72 69 61 62 6c 65 20 42 |ystem variable B| 00000040 6f 6f 74 24 50 61 74 68 20 74 6f 20 62 65 20 73 |oot$Path to be s| 00000050 65 74 20 75 70 2c 20 61 73 0d 00 1e 1f f4 20 69 |et up, as..... i| 00000060 74 20 73 68 6f 75 6c 64 20 62 65 20 6f 6e 20 61 |t should be on a| 00000070 20 52 69 73 63 20 50 43 0d 00 28 39 f4 20 54 68 | Risc PC..(9. Th| 00000080 65 20 76 61 6c 75 65 20 67 69 76 65 6e 20 74 6f |e value given to| 00000090 20 4f 53 5f 42 79 74 65 20 26 37 39 20 69 73 20 | OS_Byte &79 is | 000000a0 74 68 65 20 27 69 6e 74 65 72 6e 61 6c 20 6b 65 |the 'internal ke| 000000b0 79 0d 00 32 39 f4 20 6e 75 6d 62 65 72 27 2e 20 |y..29. number'. | 000000c0 46 75 6c 6c 20 64 65 74 61 69 6c 73 20 6f 66 20 |Full details of | 000000d0 74 68 65 73 65 20 61 72 65 20 69 6e 20 74 68 65 |these are in the| 000000e0 20 50 52 4d 73 2c 20 62 75 74 0d 00 3c 1b f4 20 | PRMs, but..<.. | 000000f0 73 6f 6d 65 20 75 73 65 66 75 6c 20 6f 6e 65 73 |some useful ones| 00000100 20 61 72 65 3a 0d 00 46 39 f4 20 53 68 69 66 74 | are:..F9. Shift| 00000110 20 28 65 69 74 68 65 72 20 6f 72 20 62 6f 74 68 | (either or both| 00000120 29 3a 20 30 2c 20 43 74 72 6c 20 28 65 69 74 68 |): 0, Ctrl (eith| 00000130 65 72 20 6f 72 20 62 6f 74 68 29 3a 20 31 0d 00 |er or both): 1..| 00000140 50 38 f4 20 41 6c 74 20 28 65 69 74 68 65 72 20 |P8. Alt (either | 00000150 6f 72 20 62 6f 74 68 29 3a 20 32 2c 20 4c 20 48 |or both): 2, L H| 00000160 20 73 68 69 66 74 3a 20 33 2c 20 4c 20 48 20 43 | shift: 3, L H C| 00000170 74 72 6c 3a 20 34 0d 00 5a 37 f4 20 4c 20 48 20 |trl: 4..Z7. L H | 00000180 41 6c 74 3a 20 35 2c 20 52 20 48 20 53 68 69 66 |Alt: 5, R H Shif| 00000190 74 3a 20 36 2c 20 52 20 48 20 43 74 72 6c 3a 20 |t: 6, R H Ctrl: | 000001a0 37 2c 20 52 20 48 20 41 6c 74 3a 20 38 0d 00 64 |7, R H Alt: 8..d| 000001b0 35 f4 20 54 68 65 73 65 20 76 61 6c 75 65 73 20 |5. These values | 000001c0 6d 75 73 74 20 62 65 20 4f 52 65 64 20 77 69 74 |must be ORed wit| 000001d0 68 20 26 38 30 20 74 6f 20 72 65 61 64 20 6a 75 |h &80 to read ju| 000001e0 73 74 0d 00 6e 29 f4 20 74 68 65 20 76 61 6c 75 |st..n). the valu| 000001f0 65 20 6f 66 20 74 68 65 20 6b 65 79 20 62 65 69 |e of the key bei| 00000200 6e 67 20 70 72 65 73 73 65 64 2e 0d 00 78 05 f4 |ng pressed...x..| 00000210 0d 00 82 25 f4 20 43 6f 70 79 72 69 67 68 74 20 |...%. Copyright | 00000220 44 61 76 69 64 20 4d 61 74 74 68 65 77 6d 61 6e |David Matthewman| 00000230 20 31 39 39 34 0d 00 8c 0f de 20 63 6f 64 65 25 | 1994..... code%| 00000240 20 32 30 30 0d 00 96 24 73 74 61 63 6b 20 3d 20 | 200...$stack = | 00000250 31 33 20 3a 20 6c 69 6e 6b 20 3d 20 31 34 20 3a |13 : link = 14 :| 00000260 20 70 63 20 3d 20 31 35 0d 00 a0 38 63 6f 64 65 | pc = 15...8code| 00000270 20 3d 20 30 20 3a 20 64 61 74 61 20 3d 20 31 20 | = 0 : data = 1 | 00000280 3a 20 6c 65 6e 20 3d 20 32 20 3a 20 70 6f 69 6e |: len = 2 : poin| 00000290 74 20 3d 20 33 20 3a 20 74 79 70 65 20 3d 20 34 |t = 3 : type = 4| 000002a0 0d 00 aa 16 e3 20 6f 70 74 25 20 3d 20 31 20 b8 |..... opt% = 1 .| 000002b0 20 33 20 88 20 32 0d 00 b4 0e 50 25 20 3d 20 63 | 3 . 2....P% = c| 000002c0 6f 64 65 25 0d 00 be 05 5b 0d 00 c8 0e 20 20 4f |ode%....[.... O| 000002d0 50 54 20 6f 70 74 25 0d 00 d2 34 20 20 53 54 4d |PT opt%...4 STM| 000002e0 46 44 20 73 74 61 63 6b 20 21 2c 20 7b 63 6f 64 |FD stack !, {cod| 000002f0 65 2c 64 61 74 61 2c 6c 65 6e 2c 70 6f 69 6e 74 |e,data,len,point| 00000300 2c 74 79 70 65 2c 6c 69 6e 6b 7d 0d 00 dc 21 20 |,type,link}...! | 00000310 20 4d 4f 56 20 64 61 74 61 2c 23 26 38 35 20 20 | MOV data,#&85 | 00000320 3b 20 4c 48 20 41 6c 74 20 6b 65 79 0d 00 e6 30 |; LH Alt key...0| 00000330 20 20 4d 4f 56 20 63 6f 64 65 2c 23 26 37 39 20 | MOV code,#&79 | 00000340 20 3b 20 4f 53 5f 42 79 74 65 20 66 6f 72 20 6b | ; OS_Byte for k| 00000350 65 79 62 6f 61 72 64 20 73 63 61 6e 0d 00 f0 14 |eyboard scan....| 00000360 20 20 53 57 49 20 22 58 4f 53 5f 42 79 74 65 22 | SWI "XOS_Byte"| 00000370 0d 00 fa 35 20 20 4c 44 4d 56 53 46 44 20 73 74 |...5 LDMVSFD st| 00000380 61 63 6b 20 21 2c 20 7b 63 6f 64 65 2c 64 61 74 |ack !, {code,dat| 00000390 61 2c 6c 65 6e 2c 70 6f 69 6e 74 2c 74 79 70 65 |a,len,point,type| 000003a0 2c 70 63 7d 5e 0d 01 04 13 20 20 54 45 51 20 64 |,pc}^.... TEQ d| 000003b0 61 74 61 2c 23 26 46 46 0d 01 0e 23 20 20 4d 56 |ata,#&FF...# MV| 000003c0 4e 45 51 20 64 61 74 61 2c 23 30 20 20 3b 20 27 |NEQ data,#0 ; '| 000003d0 54 72 75 65 27 20 76 61 6c 75 65 0d 01 18 24 20 |True' value...$ | 000003e0 20 4d 4f 56 4e 45 20 64 61 74 61 2c 23 30 20 20 | MOVNE data,#0 | 000003f0 3b 20 27 46 61 6c 73 65 27 20 76 61 6c 75 65 0d |; 'False' value.| 00000400 01 22 18 20 20 53 54 52 20 64 61 74 61 2c 6c 61 |.". STR data,la| 00000410 6c 74 76 61 6c 75 65 0d 01 2c 18 20 20 41 44 52 |ltvalue..,. ADR| 00000420 20 64 61 74 61 2c 6c 61 6c 74 76 61 6c 75 65 0d | data,laltvalue.| 00000430 01 36 19 20 20 41 44 52 20 63 6f 64 65 2c 6c 61 |.6. ADR code,la| 00000440 6c 74 73 74 72 69 6e 67 0d 01 40 10 20 20 4d 4f |ltstring..@. MO| 00000450 56 20 6c 65 6e 2c 23 34 0d 01 4a 12 20 20 4d 4f |V len,#4..J. MO| 00000460 56 20 70 6f 69 6e 74 2c 23 30 0d 01 54 11 20 20 |V point,#0..T. | 00000470 4d 4f 56 20 74 79 70 65 2c 23 31 0d 01 5e 19 20 |MOV type,#1..^. | 00000480 20 53 57 49 20 22 58 4f 53 5f 53 65 74 56 61 72 | SWI "XOS_SetVar| 00000490 56 61 6c 22 0d 01 68 21 20 20 4d 4f 56 20 64 61 |Val"..h! MOV da| 000004a0 74 61 2c 23 26 38 38 20 20 3b 20 52 48 20 41 6c |ta,#&88 ; RH Al| 000004b0 74 20 6b 65 79 0d 01 72 30 20 20 4d 4f 56 20 63 |t key..r0 MOV c| 000004c0 6f 64 65 2c 23 26 37 39 20 20 3b 20 4f 53 5f 42 |ode,#&79 ; OS_B| 000004d0 79 74 65 20 66 6f 72 20 6b 65 79 62 6f 61 72 64 |yte for keyboard| 000004e0 20 73 63 61 6e 0d 01 7c 14 20 20 53 57 49 20 22 | scan..|. SWI "| 000004f0 58 4f 53 5f 42 79 74 65 22 0d 01 86 35 20 20 4c |XOS_Byte"...5 L| 00000500 44 4d 56 53 46 44 20 73 74 61 63 6b 20 21 2c 20 |DMVSFD stack !, | 00000510 7b 63 6f 64 65 2c 64 61 74 61 2c 6c 65 6e 2c 70 |{code,data,len,p| 00000520 6f 69 6e 74 2c 74 79 70 65 2c 70 63 7d 5e 0d 01 |oint,type,pc}^..| 00000530 90 13 20 20 54 45 51 20 64 61 74 61 2c 23 26 46 |.. TEQ data,#&F| 00000540 46 0d 01 9a 23 20 20 4d 56 4e 45 51 20 64 61 74 |F...# MVNEQ dat| 00000550 61 2c 23 30 20 20 3b 20 27 54 72 75 65 27 20 76 |a,#0 ; 'True' v| 00000560 61 6c 75 65 0d 01 a4 24 20 20 4d 4f 56 4e 45 20 |alue...$ MOVNE | 00000570 64 61 74 61 2c 23 30 20 20 3b 20 27 46 61 6c 73 |data,#0 ; 'Fals| 00000580 65 27 20 76 61 6c 75 65 0d 01 ae 18 20 20 53 54 |e' value.... ST| 00000590 52 20 64 61 74 61 2c 72 61 6c 74 76 61 6c 75 65 |R data,raltvalue| 000005a0 0d 01 b8 18 20 20 41 44 52 20 64 61 74 61 2c 72 |.... ADR data,r| 000005b0 61 6c 74 76 61 6c 75 65 0d 01 c2 19 20 20 41 44 |altvalue.... AD| 000005c0 52 20 63 6f 64 65 2c 72 61 6c 74 73 74 72 69 6e |R code,raltstrin| 000005d0 67 0d 01 cc 10 20 20 4d 4f 56 20 6c 65 6e 2c 23 |g.... MOV len,#| 000005e0 34 0d 01 d6 12 20 20 4d 4f 56 20 70 6f 69 6e 74 |4.... MOV point| 000005f0 2c 23 30 0d 01 e0 11 20 20 4d 4f 56 20 74 79 70 |,#0.... MOV typ| 00000600 65 2c 23 31 0d 01 ea 19 20 20 53 57 49 20 22 58 |e,#1.... SWI "X| 00000610 4f 53 5f 53 65 74 56 61 72 56 61 6c 22 0d 01 f4 |OS_SetVarVal"...| 00000620 33 20 20 4c 44 4d 46 44 20 73 74 61 63 6b 20 21 |3 LDMFD stack !| 00000630 2c 20 7b 63 6f 64 65 2c 64 61 74 61 2c 6c 65 6e |, {code,data,len| 00000640 2c 70 6f 69 6e 74 2c 74 79 70 65 2c 70 63 7d 5e |,point,type,pc}^| 00000650 0d 01 fe 0e 2e 6c 61 6c 74 76 61 6c 75 65 0d 02 |.....laltvalue..| 00000660 08 0c 20 20 45 51 55 44 20 30 0d 02 12 0f 2e 6c |.. EQUD 0.....l| 00000670 61 6c 74 73 74 72 69 6e 67 0d 02 1c 1a 20 20 45 |altstring.... E| 00000680 51 55 53 20 22 4c 48 41 6c 74 24 50 72 65 73 73 |QUS "LHAlt$Press| 00000690 65 64 22 0d 02 26 0c 20 20 45 51 55 42 20 30 0d |ed"..&. EQUB 0.| 000006a0 02 30 0b 20 20 41 4c 49 47 4e 0d 02 3a 0e 2e 72 |.0. ALIGN..:..r| 000006b0 61 6c 74 76 61 6c 75 65 0d 02 44 0c 20 20 45 51 |altvalue..D. EQ| 000006c0 55 44 20 30 0d 02 4e 0f 2e 72 61 6c 74 73 74 72 |UD 0..N..raltstr| 000006d0 69 6e 67 0d 02 58 1a 20 20 45 51 55 53 20 22 52 |ing..X. EQUS "R| 000006e0 48 41 6c 74 24 50 72 65 73 73 65 64 22 0d 02 62 |HAlt$Pressed"..b| 000006f0 0c 20 20 45 51 55 42 20 30 0d 02 6c 0b 20 20 41 |. EQUB 0..l. A| 00000700 4c 49 47 4e 0d 02 76 05 5d 0d 02 80 05 ed 0d 02 |LIGN..v.].......| 00000710 8a 32 ff 20 28 22 53 41 56 45 20 42 6f 6f 74 3a |.2. ("SAVE Boot:| 00000720 43 68 65 63 6b 41 6c 74 20 22 2b c3 7e 28 63 6f |CheckAlt "+.~(co| 00000730 64 65 25 29 2b 22 20 22 2b c3 7e 28 50 25 29 29 |de%)+" "+.~(P%))| 00000740 0d 02 94 27 ff 20 28 22 53 45 54 54 59 50 45 20 |...'. ("SETTYPE | 00000750 42 6f 6f 74 3a 43 68 65 63 6b 41 6c 74 20 55 74 |Boot:CheckAlt Ut| 00000760 69 6c 69 74 79 22 29 0d 02 9e 05 e0 0d 02 a8 04 |ility").........| 00000770 0d ff |..| 00000772