The PSION Organiser II Homepage
Forum Home Forum Home Help Help Search Search Members Members Login Login Register Register

Welcome, Guest. Please Login or Register.
Why register?
   The Psion Organiser II Forum
   User Forum
(Moderator: Mikesan)
   pk$setp info needed
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: pk$setp info needed  (Read 533 times)
new Member


Posts: 3
pk$setp info needed
« on: Jan 27th, 2003, 11:14pm »
Quote Quote Modify Modify

Hello Psion freaks - here is a question requiring some very arcane knowledge about the psion's operating system which will allow the big boys to really flex their muscles.
I have made a simple parallel I/O system which sits on my Psion II's slot C.  It is controlled by a short assembly language (AL) routine which I call from OPL with a USR command.  The AL routine makes a call to pk$setp each time USR invokes it.  This is necessary for complete compatibility with other devices (a 128k Datapack and a COMMS link) on other slots.  The system works well and there is no contention or incompatibility.
However, each time the USR command is executed (i.e. each time I access the I/O system from OPL), the effect of the pk$setp call is that a brief 'Sizing Pack C' message appears on the screen.  I deduce from this is that pk$setp interrogates my I/O hardware, gets an inappropriate response, and assumes that a Datapack is present on C.  I would like to prevent this from happening: it slows down the execution of my program dramatically - in a loop, I get about 10 reads or writes per second.  If I leave pk$setp out, I get much faster response, but incomplete compatibility.
I can think of two approaches to this problem-
1) Modify the hardware so that a more appropriate response is returned when the slot is interrogated.
2) Or, preferably - Write an alternative version of pk$setp which achieves the required result of system compatability without interrogating the slot.  I can imagine a system where the required information is written into the AL program directly, and fed from there to whatever system variables need it.  This would cut out all unnecessary slot accesses, and would not include any screen output.  So the question is - what exactly does pk$setp do ?, how can I write a routine which does the necessary bits, but leaves out the undesirable ones ?  I feel it should be quite simple - just pushing a few bytes into some registers.  But what are they ?
I have read the available data on pk$setp but do not find it detailed enough.  I am aware that the problem can be avoided by doing all of my I/O in AL routines, but I feel that an efficient port access from OPL is a useful facility which is worth refining.  Boris is currently in the process of preparing some web pages  which will publish this system, so anyone  who can contribute will become famous !  Even an assembly code listing of pk$setp would be useful, particularly if it is annotated.
Andrew Smith
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

The Psion Organiser II Forum » Powered by YaBB 1 Gold - SP 1.1!
YaBB 2000-2002,
Xnull. All Rights Reserved.