home *** CD-ROM | disk | FTP | other *** search
RISC OS BBC BASIC V Source | 1990-07-27 | 2.1 KB | 84 lines |
- > <ASP$Dir>.BasicLib
- Dummy PROCs in case user does not supply!
- ASP_SetUp
- ASP_GoingDormant
- main poll routine: reason=FNASP_Poll(buffer) replaces SYS"Wimp_Poll",,buffer TO reason
- ASP_Poll(buffer)
- reason,temp
- "Wimp_Poll",,buffer
- reason
- ASP_Icon$=""
- ASP_esg=-1
- ASP_Status=0
- reason
- 17,18
- buffer!16
- ASP_SetMeUp:ASP_Active=
- ASP_SetUp:reason=0
- ASP_GoingDormant:ASP_Active=
- ASP_GoingDormant:reason=0
- ASP_IconSelected
- ASP_Icon$=$(buffer+20)
- temp=
- ASP_Icon$,".")
- & ASP_esg=
- ASP_Icon$,temp-1)
- & ASP_Icon$=
- ASP_Icon$,temp+1)
- reason=0
- ASP_SwitchPress:ASP_Status=
- $(window_buffer+20)
- =reason
- Translates an OS string into a BASIC string expanding variables
- ASP_GSTrans(a$)
- c$,ptr,len
- 255," ")
- "OS_GSTrans",a$,c$,255
- ,ptr,len
- ptr?len=13
- t =$ptr
- Sends an ASP command string and returns the response
- ASP_SendCommand(message$,buffer)
- a$,ref,reason
- ASP_Active
- ASP_DormantError,"!ASP dormant - can't send "+message$
- ASP_GSTrans("<ASP$Task_id>")
- !!buffer=((25+
- message$)
- 4)*4
- buffer!12=0
- buffer!16=ASP_Command
- $(buffer+20) = message$
- "Wimp_SendMessage",18,buffer,
- ref=buffer!8
- task_id=buffer!4
- "Wimp_Poll",,buffer
- reason
- (reason>=17
- reason<=18
- buffer!12=ref
- buffer!4<>task_id)
- (reason=19
- buffer!8=ref)
- reason=19
- ASP_NoResponseError,"No response from !ASP to "+message$
- =$(buffer+20)
- initialisation routine - must be called first
- ASP_Init
- ASP_message=&81500
- ASP_Command=ASP_message+5
- ASP_Response=ASP_message+6
- ASP_SetMeUp=ASP_message+2
- d"ASP_GoingDormant=ASP_message+3
- n"ASP_IconSelected=ASP_message+4
- !ASP_SwitchPress=ASP_message+7
- ASP_DormantError=ASP_message
- %ASP_NoResponseError=ASP_message+1
- ASP_Active=
- ASP_ActiveChanged=
- ASP_Status=0
- Returns a control character terminated string from a buffer
- ASP_GetString(address)
- ?address>31 a$=a$+
- (?address):address+=1:
-