Home » Archimedes archive » Acorn User » AU 1993-10.adf » !StarInfo_StarInfo » SharedCLib/SCL/SWI03
SharedCLib/SCL/SWI03
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 1993-10.adf » !StarInfo_StarInfo |
Filename: | SharedCLib/SCL/SWI03 |
Read OK: | ✔ |
File size: | 0316 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM >SCL.SWI03 (bsearch) 20REM By DCA 30REM For 32-bit machines 40REM (c) BAU September 1993 50: 60DEF FNswi03_name 70="bsearch" 80: 90DEF FNswi03_init 100=0 110: 120DEF FNswi03_vars 130bsearch=75*4 140=0 150: 160DEF FNswi03_code 170[OPT pass% 180.scl_bsearch 190 STMDB (sp)!,{r4,r9,lr} 200 MOV r9,r1 210 LDR r4,[r9,#8] 220 CMP r4,#6 230 ADRLO r1,compare_table 240 LDRLO r4,[r1,r4,LSL #2] 250 ADDLO r4,r4,r1 260 STMDB (sp)!,{r4} 270 ADD r0,r9,#12 280 LDR r1,[r9,#4] 290 LDR r2,[r9,#0] 300 MOV r3,#4 310 BL clib_vectors+bsearch 320 ADD sp,sp,#4 330 STR r0,[r9,#0] 340 MOV r0,#0 350 LDMIA (sp)!,{r4,r9,pc}^ 360] 370=0
� >SCL.SWI03 (bsearch) � By DCA � For 32-bit machines (� (c) BAU September 1993 2: <� �swi03_name F="bsearch" P: Z� �swi03_init d=0 n: x� �swi03_vars �bsearch=75*4 �=0 �: �� �swi03_code �[OPT pass% �.scl_bsearch �$ STMDB (sp)!,{r4,r9,lr} � MOV r9,r1 � LDR r4,[r9,#8] � CMP r4,#6 �$ ADRLO r1,compare_table �% LDRLO r4,[r1,r4,LSL #2] � ADDLO r4,r4,r1 STMDB (sp)!,{r4} ADD r0,r9,#12 LDR r1,[r9,#4] " LDR r2,[r9,#0] , MOV r3,#4 6( BL clib_vectors+bsearch @ ADD sp,sp,#4 J STR r0,[r9,#0] T MOV r0,#0 ^% LDMIA (sp)!,{r4,r9,pc}^ h] r=0 �
00000000 0d 00 0a 1e f4 20 20 20 20 20 3e 53 43 4c 2e 53 |..... >SCL.S| 00000010 57 49 30 33 20 28 62 73 65 61 72 63 68 29 0d 00 |WI03 (bsearch)..| 00000020 14 0d f4 20 42 79 20 20 44 43 41 0d 00 1e 19 f4 |... By DCA.....| 00000030 20 46 6f 72 20 33 32 2d 62 69 74 20 6d 61 63 68 | For 32-bit mach| 00000040 69 6e 65 73 0d 00 28 1c f4 20 28 63 29 20 42 41 |ines..(.. (c) BA| 00000050 55 20 53 65 70 74 65 6d 62 65 72 20 31 39 39 33 |U September 1993| 00000060 0d 00 32 05 3a 0d 00 3c 11 dd 20 a4 73 77 69 30 |..2.:..<.. .swi0| 00000070 33 5f 6e 61 6d 65 0d 00 46 0e 3d 22 62 73 65 61 |3_name..F.="bsea| 00000080 72 63 68 22 0d 00 50 05 3a 0d 00 5a 11 dd 20 a4 |rch"..P.:..Z.. .| 00000090 73 77 69 30 33 5f 69 6e 69 74 0d 00 64 06 3d 30 |swi03_init..d.=0| 000000a0 0d 00 6e 05 3a 0d 00 78 11 dd 20 a4 73 77 69 30 |..n.:..x.. .swi0| 000000b0 33 5f 76 61 72 73 0d 00 82 10 62 73 65 61 72 63 |3_vars....bsearc| 000000c0 68 3d 37 35 2a 34 0d 00 8c 06 3d 30 0d 00 96 05 |h=75*4....=0....| 000000d0 3a 0d 00 a0 11 dd 20 a4 73 77 69 30 33 5f 63 6f |:..... .swi03_co| 000000e0 64 65 0d 00 aa 0e 5b 4f 50 54 20 70 61 73 73 25 |de....[OPT pass%| 000000f0 0d 00 b4 10 2e 73 63 6c 5f 62 73 65 61 72 63 68 |.....scl_bsearch| 00000100 0d 00 be 24 20 20 20 20 20 20 20 20 53 54 4d 44 |...$ STMD| 00000110 42 20 20 20 28 73 70 29 21 2c 7b 72 34 2c 72 39 |B (sp)!,{r4,r9| 00000120 2c 6c 72 7d 0d 00 c8 19 20 20 20 20 20 20 20 20 |,lr}.... | 00000130 4d 4f 56 20 20 20 20 20 72 39 2c 72 31 0d 00 d2 |MOV r9,r1...| 00000140 1e 20 20 20 20 20 20 20 20 4c 44 52 20 20 20 20 |. LDR | 00000150 20 72 34 2c 5b 72 39 2c 23 38 5d 0d 00 dc 19 20 | r4,[r9,#8].... | 00000160 20 20 20 20 20 20 20 43 4d 50 20 20 20 20 20 72 | CMP r| 00000170 34 2c 23 36 0d 00 e6 24 20 20 20 20 20 20 20 20 |4,#6...$ | 00000180 41 44 52 4c 4f 20 20 20 72 31 2c 63 6f 6d 70 61 |ADRLO r1,compa| 00000190 72 65 5f 74 61 62 6c 65 0d 00 f0 25 20 20 20 20 |re_table...% | 000001a0 20 20 20 20 4c 44 52 4c 4f 20 20 20 72 34 2c 5b | LDRLO r4,[| 000001b0 72 31 2c 72 34 2c 4c 53 4c 20 23 32 5d 0d 00 fa |r1,r4,LSL #2]...| 000001c0 1c 20 20 20 20 20 20 20 20 41 44 44 4c 4f 20 20 |. ADDLO | 000001d0 20 72 34 2c 72 34 2c 72 31 0d 01 04 1e 20 20 20 | r4,r4,r1.... | 000001e0 20 20 20 20 20 53 54 4d 44 42 20 20 20 28 73 70 | STMDB (sp| 000001f0 29 21 2c 7b 72 34 7d 0d 01 0e 1d 20 20 20 20 20 |)!,{r4}.... | 00000200 20 20 20 41 44 44 20 20 20 20 20 72 30 2c 72 39 | ADD r0,r9| 00000210 2c 23 31 32 0d 01 18 1e 20 20 20 20 20 20 20 20 |,#12.... | 00000220 4c 44 52 20 20 20 20 20 72 31 2c 5b 72 39 2c 23 |LDR r1,[r9,#| 00000230 34 5d 0d 01 22 1e 20 20 20 20 20 20 20 20 4c 44 |4]..". LD| 00000240 52 20 20 20 20 20 72 32 2c 5b 72 39 2c 23 30 5d |R r2,[r9,#0]| 00000250 0d 01 2c 19 20 20 20 20 20 20 20 20 4d 4f 56 20 |..,. MOV | 00000260 20 20 20 20 72 33 2c 23 34 0d 01 36 28 20 20 20 | r3,#4..6( | 00000270 20 20 20 20 20 42 4c 20 20 20 20 20 20 63 6c 69 | BL cli| 00000280 62 5f 76 65 63 74 6f 72 73 2b 62 73 65 61 72 63 |b_vectors+bsearc| 00000290 68 0d 01 40 1c 20 20 20 20 20 20 20 20 41 44 44 |h..@. ADD| 000002a0 20 20 20 20 20 73 70 2c 73 70 2c 23 34 0d 01 4a | sp,sp,#4..J| 000002b0 1e 20 20 20 20 20 20 20 20 53 54 52 20 20 20 20 |. STR | 000002c0 20 72 30 2c 5b 72 39 2c 23 30 5d 0d 01 54 19 20 | r0,[r9,#0]..T. | 000002d0 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 72 | MOV r| 000002e0 30 2c 23 30 0d 01 5e 25 20 20 20 20 20 20 20 20 |0,#0..^% | 000002f0 4c 44 4d 49 41 20 20 20 28 73 70 29 21 2c 7b 72 |LDMIA (sp)!,{r| 00000300 34 2c 72 39 2c 70 63 7d 5e 0d 01 68 05 5d 0d 01 |4,r9,pc}^..h.]..| 00000310 72 06 3d 30 0d ff |r.=0..| 00000316