Home » Archimedes archive » Micro User » MU 1992-02.adf » PD » Twilight/c/base

Twilight/c/base

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 » Micro User » MU 1992-02.adf » PD
Filename: Twilight/c/base
Read OK:
File size: 03CC bytes
Load address: 0000
Exec address: 0000
File contents
   ; Project name    Twilight
   ; Part            
   ; Purpose         
   ; Filename        !Twilight.Effects.
   ; Author          
   ; Last modified   //92

 GET h.swis
 GET h.effectdefs

 DCB "TwEffect"
 DCD message
 DCD 0     ; control description
 DCD 0     ; default control data
 DCD init
 DCD poll
 DCD finalise
 DCD 2_110  ; flags
 DCD text

message
 DCB "",0
 ALIGN

text
    ; *******************************************
 DCB "",0
 DCB 0
 ALIGN

init
 STMFD R13!,{R14}
 MOV   R0,#6  ; claim
 MOV   R3,#work_end - work_start
 SWI   XOS_Module
 BVS   init_error
 STR   R2,[R11]
 MOV   R11,R2
 LDMFD R13!,{PC}
init_error
 LDMFD R13!,{R14}
 ORRS  PC,R14,#v_flag

poll
 STMFD R13!,{R14}
 LDR   R11,[R11]
 LDMFD R13!,{PC}

finalise
 STMFD R13!,{R14}
 LDR   R11,[R11]
 MOV   R0,#7  ; free block in RMA
 MOV   R2,R11
 SWI   XOS_Module    ; free block
 LDMFD R13!,{PC}

  ; *************** workspace definitions

 LTORG

 ^ 0,R11

work_start # 0

work_end # 0

 END
00000000  20 20 20 3b 20 50 72 6f  6a 65 63 74 20 6e 61 6d  |   ; Project nam|
00000010  65 20 20 20 20 54 77 69  6c 69 67 68 74 0a 20 20  |e    Twilight.  |
00000020  20 3b 20 50 61 72 74 20  20 20 20 20 20 20 20 20  | ; Part         |
00000030  20 20 20 0a 20 20 20 3b  20 50 75 72 70 6f 73 65  |   .   ; Purpose|
00000040  20 20 20 20 20 20 20 20  20 0a 20 20 20 3b 20 46  |         .   ; F|
00000050  69 6c 65 6e 61 6d 65 20  20 20 20 20 20 20 20 21  |ilename        !|
00000060  54 77 69 6c 69 67 68 74  2e 45 66 66 65 63 74 73  |Twilight.Effects|
00000070  2e 0a 20 20 20 3b 20 41  75 74 68 6f 72 20 20 20  |..   ; Author   |
00000080  20 20 20 20 20 20 20 0a  20 20 20 3b 20 4c 61 73  |       .   ; Las|
00000090  74 20 6d 6f 64 69 66 69  65 64 20 20 20 2f 2f 39  |t modified   //9|
000000a0  32 0a 0a 20 47 45 54 20  68 2e 73 77 69 73 0a 20  |2.. GET h.swis. |
000000b0  47 45 54 20 68 2e 65 66  66 65 63 74 64 65 66 73  |GET h.effectdefs|
000000c0  0a 0a 20 44 43 42 20 22  54 77 45 66 66 65 63 74  |.. DCB "TwEffect|
000000d0  22 0a 20 44 43 44 20 6d  65 73 73 61 67 65 0a 20  |". DCD message. |
000000e0  44 43 44 20 30 20 20 20  20 20 3b 20 63 6f 6e 74  |DCD 0     ; cont|
000000f0  72 6f 6c 20 64 65 73 63  72 69 70 74 69 6f 6e 0a  |rol description.|
00000100  20 44 43 44 20 30 20 20  20 20 20 3b 20 64 65 66  | DCD 0     ; def|
00000110  61 75 6c 74 20 63 6f 6e  74 72 6f 6c 20 64 61 74  |ault control dat|
00000120  61 0a 20 44 43 44 20 69  6e 69 74 0a 20 44 43 44  |a. DCD init. DCD|
00000130  20 70 6f 6c 6c 0a 20 44  43 44 20 66 69 6e 61 6c  | poll. DCD final|
00000140  69 73 65 0a 20 44 43 44  20 32 5f 31 31 30 20 20  |ise. DCD 2_110  |
00000150  3b 20 66 6c 61 67 73 0a  20 44 43 44 20 74 65 78  |; flags. DCD tex|
00000160  74 0a 0a 6d 65 73 73 61  67 65 0a 20 44 43 42 20  |t..message. DCB |
00000170  22 22 2c 30 0a 20 41 4c  49 47 4e 0a 0a 74 65 78  |"",0. ALIGN..tex|
00000180  74 0a 20 20 20 20 3b 20  2a 2a 2a 2a 2a 2a 2a 2a  |t.    ; ********|
00000190  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
*
000001b0  2a 2a 2a 0a 20 44 43 42  20 22 22 2c 30 0a 20 44  |***. DCB "",0. D|
000001c0  43 42 20 30 0a 20 41 4c  49 47 4e 0a 0a 69 6e 69  |CB 0. ALIGN..ini|
000001d0  74 0a 20 53 54 4d 46 44  20 52 31 33 21 2c 7b 52  |t. STMFD R13!,{R|
000001e0  31 34 7d 0a 20 4d 4f 56  20 20 20 52 30 2c 23 36  |14}. MOV   R0,#6|
000001f0  20 20 3b 20 63 6c 61 69  6d 0a 20 4d 4f 56 20 20  |  ; claim. MOV  |
00000200  20 52 33 2c 23 77 6f 72  6b 5f 65 6e 64 20 2d 20  | R3,#work_end - |
00000210  77 6f 72 6b 5f 73 74 61  72 74 0a 20 53 57 49 20  |work_start. SWI |
00000220  20 20 58 4f 53 5f 4d 6f  64 75 6c 65 0a 20 42 56  |  XOS_Module. BV|
00000230  53 20 20 20 69 6e 69 74  5f 65 72 72 6f 72 0a 20  |S   init_error. |
00000240  53 54 52 20 20 20 52 32  2c 5b 52 31 31 5d 0a 20  |STR   R2,[R11]. |
00000250  4d 4f 56 20 20 20 52 31  31 2c 52 32 0a 20 4c 44  |MOV   R11,R2. LD|
00000260  4d 46 44 20 52 31 33 21  2c 7b 50 43 7d 0a 69 6e  |MFD R13!,{PC}.in|
00000270  69 74 5f 65 72 72 6f 72  0a 20 4c 44 4d 46 44 20  |it_error. LDMFD |
00000280  52 31 33 21 2c 7b 52 31  34 7d 0a 20 4f 52 52 53  |R13!,{R14}. ORRS|
00000290  20 20 50 43 2c 52 31 34  2c 23 76 5f 66 6c 61 67  |  PC,R14,#v_flag|
000002a0  0a 0a 70 6f 6c 6c 0a 20  53 54 4d 46 44 20 52 31  |..poll. STMFD R1|
000002b0  33 21 2c 7b 52 31 34 7d  0a 20 4c 44 52 20 20 20  |3!,{R14}. LDR   |
000002c0  52 31 31 2c 5b 52 31 31  5d 0a 20 4c 44 4d 46 44  |R11,[R11]. LDMFD|
000002d0  20 52 31 33 21 2c 7b 50  43 7d 0a 0a 66 69 6e 61  | R13!,{PC}..fina|
000002e0  6c 69 73 65 0a 20 53 54  4d 46 44 20 52 31 33 21  |lise. STMFD R13!|
000002f0  2c 7b 52 31 34 7d 0a 20  4c 44 52 20 20 20 52 31  |,{R14}. LDR   R1|
00000300  31 2c 5b 52 31 31 5d 0a  20 4d 4f 56 20 20 20 52  |1,[R11]. MOV   R|
00000310  30 2c 23 37 20 20 3b 20  66 72 65 65 20 62 6c 6f  |0,#7  ; free blo|
00000320  63 6b 20 69 6e 20 52 4d  41 0a 20 4d 4f 56 20 20  |ck in RMA. MOV  |
00000330  20 52 32 2c 52 31 31 0a  20 53 57 49 20 20 20 58  | R2,R11. SWI   X|
00000340  4f 53 5f 4d 6f 64 75 6c  65 20 20 20 20 3b 20 66  |OS_Module    ; f|
00000350  72 65 65 20 62 6c 6f 63  6b 0a 20 4c 44 4d 46 44  |ree block. LDMFD|
00000360  20 52 31 33 21 2c 7b 50  43 7d 0a 0a 20 20 3b 20  | R13!,{PC}..  ; |
00000370  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 20  |*************** |
00000380  77 6f 72 6b 73 70 61 63  65 20 64 65 66 69 6e 69  |workspace defini|
00000390  74 69 6f 6e 73 0a 0a 20  4c 54 4f 52 47 0a 0a 20  |tions.. LTORG.. |
000003a0  5e 20 30 2c 52 31 31 0a  0a 77 6f 72 6b 5f 73 74  |^ 0,R11..work_st|
000003b0  61 72 74 20 23 20 30 0a  0a 77 6f 72 6b 5f 65 6e  |art # 0..work_en|
000003c0  64 20 23 20 30 0a 0a 20  45 4e 44 0a              |d # 0.. END.|
000003cc