[BBC-Micro] [BBC Micro] Coprocessor/ Tube Use
Peter Craven
cjl_craves at yahoo.com.au
Tue Jul 31 11:46:34 BST 2007
1. a) Can a program in the Coprocessor (client/ parasite) transfer data from the host to the parasite, or does the program have to reside in the host? The examples in the Acorn Support Group Application Notes and other places I have read always give the example program as existing in the host....
b) How would the example program from the ACorn Support Group Application Notes be changed to reside in the parasite and transfer H-->P??
CLAIM LDAIM &CO+&10 ; Say my ID is 16
JSR &0406 ; Claim the Tube
BCC CLAIM
LDXIM &00 ; Lo byte of &3000
LDYIM &30 ; Hi byte of &3000
LDAIM 6 ; P -> H, 256 bytes
JSR &0406
JSR ANRTS ; 6 uS delay
JSR ANRTS ; 12 uS delay
JSR ANRTS ; 18 uS delay
LDYIM 0 ; so the initial delay in 19 uS
LOOP LDA &FEE5 ; Get it from the port ( 2 uS = 2)
STAIY &80 ; Put the data byte (+3 uS = 5)
NOP ; (+1 uS = 6)
NOP ; (+1 uS = 7)
NOP ; (+1 uS = 8)
INY ; (+1 uS = 9)
BNE LOOP ; Next data byte (+1.5 uS = 10.5 uS/byte)
LDAIM &80+&10 ; Release code + My ID
JSR &0406 ; Release the Tube
2. These same documents I have read also mention that BPUT for large amounts of data transfer.....
"Moving large quantities of data: To move large quantities of data, for example a complete screen update,
the fast Tube BPUT OSBYTE call is used. Prior to the call, some machine code is placed in the I/O
processor ready to handle the data as it arrives across the Tube from the co-processor. When data is ready
to be moved across the Tube, an OSBYTE &9D (157) is made to initiate the users code to in the I/O
processor. The data is moved through Tube register 1 and handled by the user code on the other side. Note
that all OSBYTE calls are vectored through the BYTEV vector at &20A,B in the I/O processor, and this
vector has to be intercepted to detect an OSBYTE &9D call and pick up the X and Y parameters to be used
by the user's code. The advantage of OSBYTE &9D over other OSBYTE calls is that after the X and Y
parameters have been sent across the Tube, control is immediately returned to the parasite. no parameters
are returned."
Could anyone please elaborate and possibly give small example program?
Thanks
Peter
____________________________________________________________________________________
Yahoo!7 Mail has just got even bigger and better with unlimited storage on all webmail accounts.
http://au.docs.yahoo.com/mail/unlimitedstorage.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cloud9.co.uk/pipermail/bbc-micro/attachments/20070731/4f8d759b/attachment.html
More information about the bbc-micro
mailing list