home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dream 52
/
Amiga_Dream_52.iso
/
RiscOS
/
APP
/
DEVS
/
LIB
/
GSTOBJ.ZIP
/
GstObjects
/
message
/
Example
/
Adhesive
(
.txt
)
next >
Wrap
RISC OS BBC BASIC V Source
|
1994-09-10
|
1KB
|
50 lines
Adhesive from BASIC
Author: George Taylor, george@tardis.ed.ac.uk
_AdhesivePreInit
_AssembleAdhesiveHandlers
AdhesiveInitHandlers,A%
_AdhesiveInit(n$)
!AdhesiveHandle<>0
a 64
a!0=0
a!4=a+8
$(a+8)=
n$,52)
($(a+8))+8)=0
"Adhesive_Register",a
!AdhesiveHandle
_AdhesiveRequest(r)
!AdhesiveHandle=0
"Adhesive_Request",!AdhesiveHandle,r
_AdhesiveClose
!AdhesiveHandle<>0
"Adhesive_Deregister",!AdhesiveHandle
!AdhesiveHandle=0
_AssembleAdhesiveHandlers
p,b,P%,exit,restore,oldExit,stack
b 256
p=0
[ OPT p
.AdhesiveHandle
EQUD 0
.AdhesiveInitHandlers
MOV R0,#11
ADR R1,exit
*" SWI "OS_ChangeEnvironment"
ADR R0,oldExit
STMIA R0,{R1,R2,R3}
MOVS pc,R14
. .exit
ADR R0,oldExit
LDMIA R0,{R1,R2,R3}
MOV R0,#11
2" SWI "OS_ChangeEnvironment"
LDR R0,AdhesiveHandle
CMP R0,#0
5" SWINE "XAdhesive_Deregister"
SWI "OS_Exit"
.oldExit
EQUD 0
EQUD 0
EQUD 0