Home » Archimedes archive » Archimedes World » archimedes_world_volume_15_issue_2_scp.adf » !ARMwrest_ARMwrest » DecodeID
DecodeID
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 » Archimedes World » archimedes_world_volume_15_issue_2_scp.adf » !ARMwrest_ARMwrest |
Filename: | DecodeID |
Read OK: | ✔ |
File size: | 05F8 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10ERROR 0,"The DecodeID function library cannot be run. Use the LIBRARY command to include it in your code." 20 30DEFPROCdecode_processor_id(id%) 40 REM Given an ARM proessor ID (as returned by mrc), print out a description of the processor 50 LOCAL designer%,manufacturer%,part_type%,revision% 60 designer%=(proc_version%>>24) AND &FF 70 manufacturer%=(proc_version%>>16) AND &FF 80 part_type%=(proc_version%>>4) AND &FFF 90 revision%=proc_version% AND &F 100 110 CASE part_type% OF 120 WHEN &030: PRINT "Arm 3 processor" 130 PROCprintinfo(designer%,manufacturer%,revision% OR ((part_type% AND 7)<<4)) 140 150 WHEN &060: PRINT "Arm 600 processor" 160 PROCprintinfo(designer%,manufacturer%,revision%) 170 180 WHEN &061: PRINT "Arm 610 processor" 190 PROCprintinfo(designer%,manufacturer%,revision%) 200 210 WHEN &710: PRINT "Arm 710 processor" 220 PROCprintinfo(designer%,manufacturer%,revision%) 230 240 WHEN &A10: PRINT "StrongArm 110 processor" 250 PROCprintinfo(designer%,manufacturer%,revision%) 260 270 OTHERWISE: PRINT "Unknown processor version (&"+(STR$~part_type%)+")" 280 PROCprintinfo(designer%,manufacturer%,revision%) 290 ENDCASE 300ENDPROC 310 320DEFPROCprintinfo(des%,manu%,rev%) 330 PRINT "Designed by ";FNdesigner_string(des%) 340 PRINT "Manufacturer code: &";~manu% 350 PRINT "Revision number : ";rev% 360ENDPROC 370 380DEFFNdesigner_string(des%) 390 CASE des% OF 400 WHEN &41: ="Acorn/ARM" 410 WHEN &44: ="Digital" 420 OTHERWISE: ="Unknown designer (&"+(STR$~des%)+")" 430 ENDCASE 440=""
j� 0,"The DecodeID function library cannot be run. Use the LIBRARY command to include it in your code." ��decode_processor_id(id%) (_ � Given an ARM proessor ID (as returned by mrc), print out a description of the processor 24 � designer%,manufacturer%,part_type%,revision% <) designer%=(proc_version%>>24) � &FF F- manufacturer%=(proc_version%>>16) � &FF P* part_type%=(proc_version%>>4) � &FFF Z" revision%=proc_version% � &F d n Ȏ part_type% � x# � &030: � "Arm 3 processor" �X �printinfo(designer%,manufacturer%,revision% � ((part_type% � 7)<<4)) � �% � &060: � "Arm 600 processor" �@ �printinfo(designer%,manufacturer%,revision%) � �% � &061: � "Arm 610 processor" �@ �printinfo(designer%,manufacturer%,revision%) � �% � &710: � "Arm 710 processor" �@ �printinfo(designer%,manufacturer%,revision%) � �+ � &A10: � "StrongArm 110 processor" �@ �printinfo(designer%,manufacturer%,revision%) > : � "Unknown processor version (&"+(�~part_type%)+")" @ �printinfo(designer%,manufacturer%,revision%) " � ,� 6 @ ��printinfo(des%,manu%,rev%) J- � "Designed by ";�designer_string(des%) T% � "Manufacturer code: &";~manu% ^! � "Revision number : ";rev% h� r |ݤdesigner_string(des%) � Ȏ des% � � � &41: ="Acorn/ARM" � � &44: ="Digital" �. : ="Unknown designer (&"+(�~des%)+")" � � �="" �
00000000 0d 00 0a 6a 85 20 30 2c 22 54 68 65 20 44 65 63 |...j. 0,"The Dec| 00000010 6f 64 65 49 44 20 66 75 6e 63 74 69 6f 6e 20 6c |odeID function l| 00000020 69 62 72 61 72 79 20 63 61 6e 6e 6f 74 20 62 65 |ibrary cannot be| 00000030 20 72 75 6e 2e 20 55 73 65 20 74 68 65 20 4c 49 | run. Use the LI| 00000040 42 52 41 52 59 20 63 6f 6d 6d 61 6e 64 20 74 6f |BRARY command to| 00000050 20 69 6e 63 6c 75 64 65 20 69 74 20 69 6e 20 79 | include it in y| 00000060 6f 75 72 20 63 6f 64 65 2e 22 0d 00 14 04 0d 00 |our code."......| 00000070 1e 1e dd f2 64 65 63 6f 64 65 5f 70 72 6f 63 65 |....decode_proce| 00000080 73 73 6f 72 5f 69 64 28 69 64 25 29 0d 00 28 5f |ssor_id(id%)..(_| 00000090 20 20 f4 20 47 69 76 65 6e 20 61 6e 20 41 52 4d | . Given an ARM| 000000a0 20 70 72 6f 65 73 73 6f 72 20 49 44 20 28 61 73 | proessor ID (as| 000000b0 20 72 65 74 75 72 6e 65 64 20 62 79 20 6d 72 63 | returned by mrc| 000000c0 29 2c 20 70 72 69 6e 74 20 6f 75 74 20 61 20 64 |), print out a d| 000000d0 65 73 63 72 69 70 74 69 6f 6e 20 6f 66 20 74 68 |escription of th| 000000e0 65 20 70 72 6f 63 65 73 73 6f 72 0d 00 32 34 20 |e processor..24 | 000000f0 20 ea 20 64 65 73 69 67 6e 65 72 25 2c 6d 61 6e | . designer%,man| 00000100 75 66 61 63 74 75 72 65 72 25 2c 70 61 72 74 5f |ufacturer%,part_| 00000110 74 79 70 65 25 2c 72 65 76 69 73 69 6f 6e 25 0d |type%,revision%.| 00000120 00 3c 29 20 20 64 65 73 69 67 6e 65 72 25 3d 28 |.<) designer%=(| 00000130 70 72 6f 63 5f 76 65 72 73 69 6f 6e 25 3e 3e 32 |proc_version%>>2| 00000140 34 29 20 80 20 26 46 46 0d 00 46 2d 20 20 6d 61 |4) . &FF..F- ma| 00000150 6e 75 66 61 63 74 75 72 65 72 25 3d 28 70 72 6f |nufacturer%=(pro| 00000160 63 5f 76 65 72 73 69 6f 6e 25 3e 3e 31 36 29 20 |c_version%>>16) | 00000170 80 20 26 46 46 0d 00 50 2a 20 20 70 61 72 74 5f |. &FF..P* part_| 00000180 74 79 70 65 25 3d 28 70 72 6f 63 5f 76 65 72 73 |type%=(proc_vers| 00000190 69 6f 6e 25 3e 3e 34 29 20 80 20 26 46 46 46 0d |ion%>>4) . &FFF.| 000001a0 00 5a 22 20 20 72 65 76 69 73 69 6f 6e 25 3d 70 |.Z" revision%=p| 000001b0 72 6f 63 5f 76 65 72 73 69 6f 6e 25 20 80 20 26 |roc_version% . &| 000001c0 46 0d 00 64 06 20 20 0d 00 6e 15 20 20 c8 8e 20 |F..d. ..n. .. | 000001d0 70 61 72 74 5f 74 79 70 65 25 20 ca 0d 00 78 23 |part_type% ...x#| 000001e0 20 20 20 20 c9 20 26 30 33 30 3a 20 f1 20 22 41 | . &030: . "A| 000001f0 72 6d 20 33 20 70 72 6f 63 65 73 73 6f 72 22 0d |rm 3 processor".| 00000200 00 82 58 20 20 20 20 20 20 20 20 20 20 20 20 20 |..X | 00000210 20 20 f2 70 72 69 6e 74 69 6e 66 6f 28 64 65 73 | .printinfo(des| 00000220 69 67 6e 65 72 25 2c 6d 61 6e 75 66 61 63 74 75 |igner%,manufactu| 00000230 72 65 72 25 2c 72 65 76 69 73 69 6f 6e 25 20 84 |rer%,revision% .| 00000240 20 28 28 70 61 72 74 5f 74 79 70 65 25 20 80 20 | ((part_type% . | 00000250 37 29 3c 3c 34 29 29 0d 00 8c 13 20 20 20 20 20 |7)<<4)).... | 00000260 20 20 20 20 20 20 20 20 20 20 0d 00 96 25 20 20 | ...% | 00000270 20 20 c9 20 26 30 36 30 3a 20 f1 20 22 41 72 6d | . &060: . "Arm| 00000280 20 36 30 30 20 70 72 6f 63 65 73 73 6f 72 22 0d | 600 processor".| 00000290 00 a0 40 20 20 20 20 20 20 20 20 20 20 20 20 20 |..@ | 000002a0 20 20 f2 70 72 69 6e 74 69 6e 66 6f 28 64 65 73 | .printinfo(des| 000002b0 69 67 6e 65 72 25 2c 6d 61 6e 75 66 61 63 74 75 |igner%,manufactu| 000002c0 72 65 72 25 2c 72 65 76 69 73 69 6f 6e 25 29 0d |rer%,revision%).| 000002d0 00 aa 13 20 20 20 20 20 20 20 20 20 20 20 20 20 |... | 000002e0 20 20 0d 00 b4 25 20 20 20 20 c9 20 26 30 36 31 | ...% . &061| 000002f0 3a 20 f1 20 22 41 72 6d 20 36 31 30 20 70 72 6f |: . "Arm 610 pro| 00000300 63 65 73 73 6f 72 22 0d 00 be 40 20 20 20 20 20 |cessor"...@ | 00000310 20 20 20 20 20 20 20 20 20 20 f2 70 72 69 6e 74 | .print| 00000320 69 6e 66 6f 28 64 65 73 69 67 6e 65 72 25 2c 6d |info(designer%,m| 00000330 61 6e 75 66 61 63 74 75 72 65 72 25 2c 72 65 76 |anufacturer%,rev| 00000340 69 73 69 6f 6e 25 29 0d 00 c8 13 20 20 20 20 20 |ision%).... | 00000350 20 20 20 20 20 20 20 20 20 20 0d 00 d2 25 20 20 | ...% | 00000360 20 20 c9 20 26 37 31 30 3a 20 f1 20 22 41 72 6d | . &710: . "Arm| 00000370 20 37 31 30 20 70 72 6f 63 65 73 73 6f 72 22 0d | 710 processor".| 00000380 00 dc 40 20 20 20 20 20 20 20 20 20 20 20 20 20 |..@ | 00000390 20 20 f2 70 72 69 6e 74 69 6e 66 6f 28 64 65 73 | .printinfo(des| 000003a0 69 67 6e 65 72 25 2c 6d 61 6e 75 66 61 63 74 75 |igner%,manufactu| 000003b0 72 65 72 25 2c 72 65 76 69 73 69 6f 6e 25 29 0d |rer%,revision%).| 000003c0 00 e6 04 0d 00 f0 2b 20 20 20 20 c9 20 26 41 31 |......+ . &A1| 000003d0 30 3a 20 f1 20 22 53 74 72 6f 6e 67 41 72 6d 20 |0: . "StrongArm | 000003e0 31 31 30 20 70 72 6f 63 65 73 73 6f 72 22 0d 00 |110 processor"..| 000003f0 fa 40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |.@ | 00000400 20 f2 70 72 69 6e 74 69 6e 66 6f 28 64 65 73 69 | .printinfo(desi| 00000410 67 6e 65 72 25 2c 6d 61 6e 75 66 61 63 74 75 72 |gner%,manufactur| 00000420 65 72 25 2c 72 65 76 69 73 69 6f 6e 25 29 0d 01 |er%,revision%)..| 00000430 04 04 0d 01 0e 3e 20 20 20 20 7f 3a 20 f1 20 22 |.....> .: . "| 00000440 55 6e 6b 6e 6f 77 6e 20 70 72 6f 63 65 73 73 6f |Unknown processo| 00000450 72 20 76 65 72 73 69 6f 6e 20 28 26 22 2b 28 c3 |r version (&"+(.| 00000460 7e 70 61 72 74 5f 74 79 70 65 25 29 2b 22 29 22 |~part_type%)+")"| 00000470 0d 01 18 40 20 20 20 20 20 20 20 20 20 20 20 20 |...@ | 00000480 20 20 20 f2 70 72 69 6e 74 69 6e 66 6f 28 64 65 | .printinfo(de| 00000490 73 69 67 6e 65 72 25 2c 6d 61 6e 75 66 61 63 74 |signer%,manufact| 000004a0 75 72 65 72 25 2c 72 65 76 69 73 69 6f 6e 25 29 |urer%,revision%)| 000004b0 0d 01 22 07 20 20 cb 0d 01 2c 05 e1 0d 01 36 04 |..". ...,....6.| 000004c0 0d 01 40 20 dd f2 70 72 69 6e 74 69 6e 66 6f 28 |..@ ..printinfo(| 000004d0 64 65 73 25 2c 6d 61 6e 75 25 2c 72 65 76 25 29 |des%,manu%,rev%)| 000004e0 0d 01 4a 2d 20 20 f1 20 22 44 65 73 69 67 6e 65 |..J- . "Designe| 000004f0 64 20 62 79 20 22 3b a4 64 65 73 69 67 6e 65 72 |d by ";.designer| 00000500 5f 73 74 72 69 6e 67 28 64 65 73 25 29 0d 01 54 |_string(des%)..T| 00000510 25 20 20 f1 20 22 4d 61 6e 75 66 61 63 74 75 72 |% . "Manufactur| 00000520 65 72 20 63 6f 64 65 3a 20 26 22 3b 7e 6d 61 6e |er code: &";~man| 00000530 75 25 0d 01 5e 21 20 20 f1 20 22 52 65 76 69 73 |u%..^! . "Revis| 00000540 69 6f 6e 20 6e 75 6d 62 65 72 20 3a 20 22 3b 72 |ion number : ";r| 00000550 65 76 25 0d 01 68 05 e1 0d 01 72 04 0d 01 7c 1b |ev%..h....r...|.| 00000560 dd a4 64 65 73 69 67 6e 65 72 5f 73 74 72 69 6e |..designer_strin| 00000570 67 28 64 65 73 25 29 0d 01 86 0f 20 20 c8 8e 20 |g(des%).... .. | 00000580 64 65 73 25 20 ca 0d 01 90 1b 20 20 20 20 c9 20 |des% ..... . | 00000590 26 34 31 3a 20 3d 22 41 63 6f 72 6e 2f 41 52 4d |&41: ="Acorn/ARM| 000005a0 22 0d 01 9a 19 20 20 20 20 c9 20 26 34 34 3a 20 |".... . &44: | 000005b0 3d 22 44 69 67 69 74 61 6c 22 0d 01 a4 2e 20 20 |="Digital".... | 000005c0 20 20 7f 3a 20 3d 22 55 6e 6b 6e 6f 77 6e 20 64 | .: ="Unknown d| 000005d0 65 73 69 67 6e 65 72 20 28 26 22 2b 28 c3 7e 64 |esigner (&"+(.~d| 000005e0 65 73 25 29 2b 22 29 22 0d 01 ae 07 20 20 cb 0d |es%)+")".... ..| 000005f0 01 b8 07 3d 22 22 0d ff |...=""..| 000005f8