- Home /
- Psion II /
- Technical Reference Manual
___________________________________
PSION ORGANISER II TECHNICAL MANUAL
(c) Copyright Psion Ltd 1986. All rights reserved.
This Technical Manual and the programs referred to
therein are copyrighted works of Psion Ltd, London,
England. Reproduction in whole or in part,
including utilization in machines capable of
reproduction or retrieval, without express written
permission of Psion Ltd, is prohibited. Reverse
engineering is also prohibited.
Psion Ltd makes no representation that the
interconnections of its products in the manner
described herein will not infringe on existing or
future patent rights, nor do the description
contained herein imply the granting of license to
make, use, or sell equipment constructed in
accordance with these descriptions.
The information in this document is subject to
change without notice.
CONTENT
CHAPTER 1 INTRODUCTION
CHAPTER 2 SYSTEM BOARD
2.1 GENERAL
2.2 CIRCUIT DESCRIPTION
2.3 MICROPROCESSOR
2.3.1 OPERATING MODES
2.3.2 MEMORY_MAP
2.3.3 PORT 5
2.3.4 PORTS 2 AND 6
2.4 MEMORY DEVICES AND OPTIONS
2.4.1 PROM
2.4.2 RAM
2.4.3 MEMORY DECODING AND LINKS
2.4.4 OPTIONS FOR CM, XP AND LA
2.5 MEMORY MAPPED I/O
2.5.1 ADDRESS ASSIGNMENT
2.5.2 PULSE SIGNAL
2.5.3 ALARM SIGNAL
2.5.4 NMI
2.5.5 COUNTER
2.5.6 SWITCH OFF
2.6 CLOCK AND KEYBOARD
2.6.1 DIVIDER CHAIN
2.6.2 KEEPING TIME
2.6.3 THE KEYBOARD
2.7 LCD DISPLAY
CHAPTER 3 POWER SUPPLY BOARD
3.1 GENERAL
3.2 POWER SUPPLY REQUIREMENTS
3.3 SUPPLY RAILS
3.4 STANDBY REGULATOR
3.5 VCC1/VCC2 REGULATOR
3.6 SVCC REGULATOR
3.7 V_LCD
3.8 VOLTAGE PUMP
3.9 SVPP REGULATOR
3.10 REMOTE SWITCH ON
3.11 BUZZER
CHAPTER 4 TOP SLOT BOARD
4.1 GENERAL
4.2 SLOT CONTROL BUS
4.3 POWER RAILS
4.4 DATA BUS (PROCESSOR PORT 2)
4.5 CONTROL LINES (PROCESSOR PORT 6)
4.6 AC_B INPUT
CHAPTER 5 OPERATING SYSTEM
5.1 SYSTEM INTERFACE
5.1.1 CALLING SYSTEM SERVICES
5.1.2 REGISTER PRESERVATION
5.1.3 ERROR HANDLING
5.1.4 THE OS MACRO
5.1.5 MEMORY USAGE
5.1.6 SYSTEM CONSTANTS AND MACROS
5.1.7 ERROR NUMBERS
5.1.8 VECTOR NUMBERS
5.2 SYSTEM VERSIONS
5.2.1 CM/OS
5.2.2 XP/OS AND XP2/OS
5.2.3 LA/OS AND LA2/OS
5.3 POWER UP
5.3.1 COLD START
5.3.2 WARM START
5.4 POWER DOWN
5.5 INTERRUPTS
5.5.1 NON-MASKABLE INTERRUPTS
5.5.2 TIMER 1 COMPARE INTERRUPT
5.5.3 SOFTWARE INTERRUPT
5.5.4 TRAP INTERRUPT
5.6 VECTORS
5.6.1 HARDWARE VECTORS
5.6.2 SOFTWARE VECTORS
5.7 RELEASE NOTES
5.7.1 VERSION 2.3 AND EARLIER
5.7.2 RELEASE 2.4
5.7.3 RELEASE 2.6
5.7.4 RELEASE 3.1
5.8 SYSTEM SERVICES
5.8.1 BT$NMDN
5.8.2 BT$NMEN
5.8.3 BT$NOF
5.8.4 BT$NON
5.8.5 BT$PPRG
5.8.6 BT$SWOF
CHAPTER 6 MEMORY USAGE
6.1 INTRODUCTION
6.2 MEMORY MAP
6.3 RAM MEMORY
6.3.1 ZERO PAGE
6.3.2 NON-ZERO PAGE
6.4 NON-RAM MEMORY MAP
6.4.1 INTERNAL REGISTERS
6.4.2 MEMORY MAPPED I/O
6.5 MEMORY USAGE
6.5.1 OPERATING SYSTEM
6.5.1.1 NAMING CONVENTION
6.5.1.2 ZERO PAGE
6.5.1.3 NON-ZERO PAGE
6.5.1.4 BUFFERS
6.5.1.5 TIMING
6.5.1.6 I/O DRIVER SPACE
6.5.1.7 COLD BOOT
6.5.2 FREE MEMORY
6.5.2.1 ALLOCATOR
6.5.2.2 LANGUAGE
6.5.2.3 PERMANENT MEMORY
6.6 SYSTEM SERVICES
6.6.1 AL$FREE
6.6.2 AL$GRAB
6.6.3 AL$GROW
6.6.4 AL$REPL
6.6.5 AL$SHNK
6.6.6 AL$SIZE
6.6.7 AL$ZERO
CHAPTER 7 KEYBOARD
7.1 OPERATING THE KEYBOARD
7.2 KEYBOARD SCANNING
7.2.1 THE ON/CLEAR KEY
7.2.2 THE KEY MATRIX
7.2.3 KEY SCANNING
7.3 KEYBOARD INTERRUPTS
7.3.1 INITIALISING
7.3.2 POLLING
7.3.3 TRANSLATING
7.3.4 BUFFERING
7.3.5 KEY CLICK
7.3.6 ALARM CHECKING
7.3.7 FRAME-COUNTER
7.3.8 DISPLAY TIMING
7.4 TESTING FOR KEYS
7.4.1 KEYTEST AND KEYGET
7.4.2 PACK SWITCH OFF
7.4.3 LOW BATTERY TEST
7.4.4 MACHINE SWITCH OFF
7.5 KEYBOARD VECTORS AND VARIABLES
7.5.1 KBB_STAT
7.5.2 BTA_POLL
7.5.3 BTA_TRAN
7.5.4 BTA_TABL
7.5.5 KBB_SHFK
7.5.6 KBB_CAPK
7.5.7 KBB_NUMK
7.5.8 KBW_TDEL
7.5.9 KBB_DLAY
7.5.10 KBB_REPT
7.5.11 KBB_CLIK
7.5.12 KBB_PKOF
7.6 SYSTEM SERVICES
7.6.1 KB$INIT
7.6.2 KB$TEST
7.6.3 KB$GETK
7.6.4 KB$BREK
7.6.5 KB$FLSH
7.6.6 KB$UGET
7.6.7 KB$STAT
7.7 EXAMPLE
7.7.1 FULL ASCII SET FROM KEYBOARD
CHAPTER 8 DISPLAY
8.1 HARDWARE
8.2 SOFTWARE
8.2.1 EXAMPLE
8.2.2 VARIABLE USAGE
8.3 SYSTEM SERVICES
8.3.1 DP$STAT
8.3.2 DP$VIEW
8.3.3 DP$PRNT
8.3.4 DP$EMIT
8.3.5 DP$SAVE
8.3.6 DP$REST
8.3.7 DP$WRDY
CHAPTER 9 DATAPACKS
9.1 NAMING CONVENTIONS
9.2 HARDWARE
9.2.1 EPROM (Eraseable Programmable Read Only Memory) 9-2
9.2.1.1 Reading from EPROM
9.2.1.2 Writing to EPROM
9.2.2 COUNTER
9.2.2.1 Linearly Addressed Datapacks
9.2.2.2 Page Counted Datapacks
9.2.2.3 Segmented Datapacks
9.2.3 RAMPACKS
9.2.4 CONNECTOR
9.2.5 8K AND 16K DATAPACKS
9.2.6 32K DATAPACKS
9.2.7 64K DATAPACKS
9.2.8 128K DATAPACKS
9.2.9 32k, 64k AND 128k RAMPACKS
9.3 ORGANISER INTERFACE
9.3.1 ORGANISER SIDE SLOT CONNECTOR
9.3.2 PROCESSOR INTERFACE
9.3.2.1 Block Diagram of the Processor Interface
9.3.2.2 Powering up the Slots
9.3.2.3 Selecting a Datapack Slot
9.3.2.4 Reading from a Datapack Slot
9.3.2.5 Hardware ID Byte
9.3.2.6 Setting the Program Voltage (SVPP)
9.3.2.7 Writing to a Datapack
9.3.3 EXAMPLE
9.4 SOFTWARE
9.4.1 SUMMARY OF OPERATING SYSTEM SERVICES
9.4.2 VARIABLE USAGE
9.4.3 PACK ID STRING
9.4.4 DEVICE A: INTERNAL RAM PACK
9.5 SYSTEM SERVICES
9.5.1 PK$SETP
9.5.2 PK$SAVE
9.5.3 PK$READ
9.5.4 PK$RBYT
9.5.5 PK$RWRD
9.5.6 PK$SKIP
9.5.7 PK$QADD
9.5.8 PK$SADD
9.5.9 PK$PKOF
9.5.10 PACK ERRORS
9.5.11 EXAMPLE
CHAPTER 10 SYSTEM TIMING
10.1 REAL TIME CLOCK
10.1.1 KEEPING TIME WITH NMI ON
10.1.2 KEEPING TIME WITH NMI OFF
10.1.3 AUTO-SWITCH-OFF TIME OUT
10.2 KEYBOARD INTERRUPT TIMERS
10.2.1 TMW_FRAM
10.2.2 DPW_REDY
10.3 SYSTEM SERVICES
10.3.1 TM$DAYV
10.3.2 TM$TGET
10.3.3 TM$UPDT
10.3.4 TM$WAIT
CHAPTER 11 EXTERNAL INTERFACING
11.1 SOFTWARE INTERFACING
11.1.1 BOOTABLE PACK DESCRIPTION
11.1.1.1 DATAPACK_CONTROL_BYTE
11.1.1.2 DATAPACK_SIZE_BYTE
11.1.1.3 DEVICE_OR_CODE_BYTE
11.1.1.4 DEVICE_NUMBER_BYTE
11.1.1.5 DEVICE_VERSION_BYTE
11.1.1.6 DEVICE_PRIORITY_BYTE
11.1.1.7 DEVICE_CODE_ADDRESS_WORD
11.1.2 RELOCATABLE OBJECT CODE DESCRIPTION
11.1.3 DEVICE CODE DESCRIPTION
11.1.4 DEVICE VECTORS
11.1.4.1 VECTOR SERVICE 0 - INSTALL VECTOR
11.1.4.2 VECTOR SERVICE 1 - REMOVE VECTOR
11.1.4.3 VECTOR SERVICE 2 - LANGUAGE VECTOR
11.1.5 BOOTING
11.2 HARDWARE INTERFACES
11.2.1 BUS SIGNALS
11.2.1.1 SSS_B
11.2.1.2 SOE_B
11.2.1.3 SMR
11.2.1.4 SCLK
11.2.1.5 SVCC
11.2.1.6 SGND
11.2.1.7 SD0-SD7
11.2.2 SIGNAL TRUTH TABLE
11.2.2.1 STATE 0
11.2.2.2 STATE 1
11.2.2.3 STATE 2
11.2.2.4 STATE 3
11.2.2.5 STATE 4
11.2.2.6 STATE 5
11.2.3 EXAMPLE
11.3 SYSTEM SERVICES
11.3.1 DV$BOOT
11.3.2 DV$LOAD
11.3.3 DV$VECT
11.3.4 DV$LKUP
11.3.5 DV$CLER
11.3.6 EXAMPLE
CHAPTER 12 FILING SYSTEM
12.1 FILES AND RECORDS
12.1.1 RECORDS
12.1.1.1 SHORT RECORDS
12.1.1.2 LONG RECORDS
12.1.1.3 DELETED RECORDS
12.1.2 FILES
12.1.2.1 FIND, SAVE AND "MAIN"
12.1.3 BLOCK FILES
12.1.3.1 OPL PROCEDURES, SAVED DIARIES
12.1.4 SUMMARY OF RECORD STRUCTURE
12.1.5 ERROR HANDLING
12.1.6 SUMMARY OF RECORD TYPES
12.1.7 FILE SYSTEM VARIABLES
12.1.8 ORGANISER I COMPATIBILITY
12.2 SYSTEM SERVICES
12.2.1 FL$BACK
12.2.2 FL$BCAT
12.2.3 FL$BDEL
12.2.4 FL$BOPN
12.2.5 FL$BSAV
12.2.6 FL$CATL
12.2.7 FL$COPY
12.2.8 FL$CRET
12.2.9 FL$DELN
12.2.10 FL$ERAS
12.2.11 FL$FFND
12.2.12 FL$FIND
12.2.13 FL$FREC
12.2.14 FL$NEXT
12.2.15 FL$OPEN
12.2.16 FL$PARS
12.2.17 FL$READ
12.2.18 FL$RECT
12.2.19 FL$RENM
12.2.20 FL$RSET
12.2.21 FL$SETP
12.2.22 FL$SIZE
12.2.23 FL$WRIT
12.2.24 TL$CPYX
CHAPTER 13 UTILITIES
13.1 BUFFER HANDLING SYSTEM SERVICES
13.1.1 UT$CPYB
13.1.2 UT$ICPB
13.1.3 UT$FILL
13.1.4 UT$ISBF
13.1.5 UT$SPLT
13.1.6 UT$UTOB
13.1.7 UT$XTOB
13.2 DISPLAY HANDLING SYSTEM SERVICES
13.2.1 UT$DISP
13.2.2 UT$DDSP
13.3 INTEGER ARITHMETIC SYSTEM SERVICES
13.3.1 UT$SDIV
13.3.2 UT$SMUL
13.3.3 UT$UDIV
13.3.4 UT$UMUL
13.4 MISCELLANEOUS SYSTEM SERVICES
13.4.1 UT$ENTR
13.4.2 UT$LEAV
13.4.3 UT$XCAT
13.4.4 UT$YSNO
CHAPTER 14 EDITOR
14.1 LINE-EDITOR SYSTEM SERVICES
14.1.1 ED$EPOS
14.1.2 ED$EDIT
14.1.3 ED$VIEW
14.2 LANGUAGE EDITOR SYSTEM SERVICES
14.3 LG$RLED
14.4 LG$NEWP
14.5 TL$XXMD
CHAPTER 15 MATHS FUNCTIONS
15.1 FLOATING-POINT NUMBERS
15.2 FLOATING-POINT ARITHMETIC
15.2.1 MT$FADD
15.2.2 MT$FSUB
15.2.3 MT$FNGT
15.2.4 MT$FMUL
15.2.5 MT$FDIV
15.3 CONVERTING NUMERIC TEXT TO FLOATING POINT
15.3.1 MT$BTOF
15.4 CONVERTING FLOATING-POINT TO TEXT STRING
15.4.1 MT$FBDC
15.4.2 MT$FBEX
15.4.3 MT$FBIN
15.4.4 MT$FBGN
15.5 THE SCIENTIFIC FUNCTIONS
15.5.1 FN$ATAN
15.5.2 FN$COS
15.5.3 FN$EXP
15.5.4 FN$LN
15.5.5 FN$LOG
15.5.6 FN$POWR
15.5.7 FN$RND
15.5.8 FN$SIN
15.5.9 FN$SQRT
15.5.10 FN$TAN
CHAPTER 16 MENUS
16.1 SYSTEM SERVICES
16.1.1 MN$DISP
16.2 TOP LEVEL MENU
16.2.1 TL$ADDI
16.2.2 TL$DELI
CHAPTER 17 LANGUAGE
17.1 INTRODUCTION
17.2 DEFINITIONS
17.2.1 VARIABLES
17.2.2 PROCEDURES
17.2.3 PARAMETERS
17.2.4 ADDRESSES
17.2.5 INTEGERS
17.2.6 FLOATING POINT
17.2.7 STRINGS
17.2.8 ARRAYS
17.2.9 TYPE CONVERSION
17.2.10 RECORDS AND FIELDS
17.2.11 VARIABLE SCOPE
17.2.12 EXTERNALS
17.2.13 LANGUAGE POINTERS
17.2.14 ADDRESSING MODES
17.2.15 TOP LOOP
17.3 OPERANDS
17.4 OPERATORS
17.4.1 ERRORS, CALLS AND PARAMETERS
17.4.2 LOGICAL AND ARITHMETIC COMPARE OPERATORS
17.5 COMMAND OPERATORS
17.5.1 QCO_AT
17.5.2 QCO_BEEP
17.5.3 QCO_BREAK
17.5.4 QCO_CLS
17.5.5 QCO_CURSOR
17.5.6 QCO_ESCAPE
17.5.7 QCO_GOTO
17.5.8 QCO_OFF
17.5.9 QCO_ONERR
17.5.10 QCO_PAUSE
17.5.11 QCO_POKEB
17.5.12 QCO_POKEW
17.5.13 QCO_RAISE
17.5.14 QCO_RANDOMIZE
17.5.15 QCO_SPECIAL
17.5.16 QCO_STOP
17.5.17 QCO_TRAP
17.6 FILE OPERATORS
17.6.1 QCO_APPEND
17.6.2 QCO_CLOSE
17.6.3 QCO_COPY
17.6.4 QCO_CREATE
17.6.5 QCO_DELETE
17.6.6 QCO_ERASE
17.6.7 QCO_FIRST
17.6.8 QCO_LAST
17.6.9 QCO_NEXT
17.6.10 QCO_BACK
17.6.11 QCO_OPEN
17.6.12 QCO_POSITION
17.6.13 QCO_RENAME
17.6.14 QCO_UPDATE
17.6.15 QCO_USE
17.7 OTHER OPERATORS
17.7.1 QCO_KSTAT
17.7.2 QCO_EDIT
17.7.3 QCO_INPUT_INT
17.7.4 QCO_INPUT_NUM
17.7.5 QCO_INPUT_STR
17.7.6 QCO_PRINT_INT
17.7.7 QCO_PRINT_NUM
17.7.8 QCO_PRINT_STR
17.7.9 QCO_PRINT_SP
17.7.10 QCO_PRINT_CR
17.7.11 QCO_LPRINT_INT
17.7.12 QCO_LPRINT_NUM
17.7.13 QCO_LPRINT_STR
17.7.14 QCO_LPRINT_SP
17.7.15 QCO_LPRINT_CR
17.7.16 QCO_RETURN
17.7.17 QCO_RETURN_NOUGHT
17.7.18 QCO_RETURN_ZERO
17.7.19 QCO_RETURN_NULL
17.7.20 QCO_PROC
17.7.21 QCO_BRA_FALSE
17.7.22 QCO_ASS_INT
17.7.23 QCO_ASS_NUM
17.7.24 QCO_ASS_STR
17.7.25 QCO_DROP_BYTE
17.7.26 QCO_DROP_WORD
17.7.27 QCO_DROP_NUM
17.7.28 QCO_DROP_STR
17.7.29 QCO_INT_TO_NUM
17.7.30 QCO_NUM_TO_INT
17.7.31 QCO_END_FIELDS
17.7.32 QCO_RUN_ASSEM
17.8 INTEGER FUNCTIONS
17.8.1 RTF_ADDR
17.8.2 RTF_ASC
17.8.3 RTF_DAY
17.8.4 RTF_DISP
17.8.5 RTF_ERR
17.8.6 RTF_FIND
17.8.7 RTF_FREE
17.8.8 RTF_GET
17.8.9 RTF_HOUR
17.8.10 RTF_IABS
17.8.11 RTF_INT
17.8.12 RTF_KEY
17.8.13 RTF_LEN
17.8.14 RTF_LOC
17.8.15 RTF_MENU
17.8.16 RTF_MINUTE
17.8.17 RTF_MONTH
17.8.18 RTF_PEEKB
17.8.19 RTF_PEEKW
17.8.20 RTF_RECSIZE
17.8.21 RTF_SECOND
17.8.22 RTF_IUSR
17.8.23 RTF_SADDR
17.8.24 RTF_VIEW
17.8.25 RTF_YEAR
17.8.26 RTF_COUNT
17.8.27 RTF_EOF
17.8.28 RTF_EXIST
17.8.29 RTF_POS
17.9 FLOATING POINT FUNCTIONS
17.9.1 RTF_ABS
17.9.2 RTF_ATAN
17.9.3 RTF_COS
17.9.4 RTF_DEG
17.9.5 RTF_EXP
17.9.6 RTF_FLT
17.9.7 RTF_INTF
17.9.8 RTF_LN
17.9.9 RTF_LOG
17.9.10 RTF_PI
17.9.11 RTF_RAD
17.9.12 RTF_RND
17.9.13 RTF_SIN
17.9.14 RTF_SQR
17.9.15 RTF_TAN
17.9.16 RTF_VAL
17.9.17 RTF_SPACE
17.10 STRING FUNCTIONS
17.10.1 RTF_DIR
17.10.2 RTF_CHR
17.10.3 RTF_DATIM
17.10.4 RTF_SERR
17.10.5 RTF_FIX
17.10.6 RTF_GEN
17.10.7 RTF_SGET
17.10.8 RTF_HEX
17.10.9 RTF_SKEY
17.10.10 RTF_LEFT
17.10.11 RTF_LOWER
17.10.12 RTF_MID
17.10.13 RTF_NUM
17.10.14 RTF_RIGHT
17.10.15 RTF_REPT
17.10.16 RTF_SCI
17.10.17 RTF_UPPER
17.10.18 RTF_SUSR
17.11 FILES
17.11.1 CREATING
17.11.2 OPENING
17.11.3 LOGICAL FILE NAMES
17.11.4 USING FILES
17.12 PROCEDURE CALLS
17.12.1 STANDARD PROCEDURES
17.12.2 LANGUAGE EXTENSIONS
17.13 WRITING OPL
17.13.1 COMPACT Q CODE
17.13.2 COMPACT ON RUN TIME
17.13.3 FAST CODE
17.13.3.1 PROCEDURES
17.13.3.2 FILES
17.13.4 CODE STYLE
17.14 TRANSLATOR
17.15 SYSTEM SERVICES INTERFACE
17.15.1 RM$RUNP
17.15.2 LN$STRT
17.16 MACHINE CODE INTERFACE
17.17 EXCEPTION HANDLING
17.17.1 ERROR HANDLING
17.17.2 OUT OF MEMORY
17.17.3 LOW BATTERY
17.17.4 ON/CLEAR KEY
17.17.5 WARNING
17.18 INDEX OF OPERANDS
17.19 INDEX OF OPERATORS
17.20 INDEX OF FUNCTIONS
17.21 EXAMPLES
17.21.1 EXAMPLE 1
17.21.2 EXAMPLE 2
17.21.3 EXAMPLE 3
17.21.4 EXAMPLE 4
17.21.5 EXAMPLE 5
CHAPTER 18 TABLE INTERPRETER
18.1 THE TABLE INTERPRETER
18.2 TABLE REGISTERS
18.3 THE PREDEFINED ACTIONS
18.3.1 RETURN
18.3.2 CALL
18.3.3 IF
18.3.4 IF_NOT
18.3.5 CASE
18.3.6 VECTOR
18.3.7 GOTO
18.3.8 BRANCH
18.3.9 EQL
18.3.10 NEQ
18.3.11 ASSIGN
18.3.12 ADD2
18.3.13 SUB2
18.3.14 PUSH
18.3.15 CALL_MC
18.3.16 POP
18.3.17 JSR
18.3.18 RANGE
18.3.19 LOADB
18.3.20 STOREB
18.3.21 END
18.4 SYSTEM SERVICES
18.4.1 IT$GVAL
18.4.2 IT$RADD
18.4.3 IT$TADD
18.4.4 IT$STRT
18.5 VARIABLE USAGE
CHAPTER 19 DIARY
19.1 DIARY FORMAT
19.2 ALARM TABLE FORMAT
19.3 ALARM CHECKING INTERRUPTS
19.4 WAKING UP FOR AN ALARM
CHAPTER 20 BUZZER
20.0.1 BZ$ALRM
20.0.1.1 BZ$BELL
20.0.1.1.1 BZ$TONE
CHAPTER 21 ERROR HANDLING
21.0.1 ER$LKUP
21.0.1.1 ER$MESS
INDEX