1 eÿsvc.s
\0\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0\9c+.define _EmMon, _EmTrp
25 LDR R1,[R12,#4] !fildes
29 ! READ FROM THE KEYBOARD
31 LDR R0,[R12,#8] !buffer
33 LDR R1,[R12,#12] ! char count
35 MOV.CS R1,#255 !OS_Readline max
46 ADD R1,R1,#1 ! INC BUFFER COUNT
79 ! APPEND CR TO LINE ENDING WITH LF
99 LDR R1,[R12,#12] !always success
115 MOV R0,#67 !READ ONLY
120 MOV R0,#195 !UPDATE, FILE MUST EXIST
123 MOV R0,#131 !CREATE AND OPEN FOR UPDATE
125 LDR R1,[R12,#4] !FILE NAME
127 SWI 0x2000D !Xos_find
129 CMP R0,#0 !MAP ERROR CODES
144 BLT _51 !IGNORE IF NOT FILE
145 SWI 0x2000D !Xos_find (IGNORE ERRORS)
148 ! STMFD R12<,{R0} !not sure...
164 ! note that on UNIX, unlink may be
165 ! done on an open file. This would
166 ! cause an error on RiscOs, which is ignored
172 SWI.GE 0x20008 !os_file
176 ! STMFD R12<,{R8} ! not sure...
189 STMFD R12<,{R0} !not sure...
198 MOV R0,#0 !FIRST GET CURRENT PTR
202 LDR R3,[R12,#12] !NOW DO THE LSEEK
259 STR R0,[R2,#4] ! utime = stime
266 ! returns random number (clock ticks)
283 ! ONLY FIRST PARAMETER IS USED
294 ! NOT IMPLEMENTED CALLS
295 ! ---------------------
296 ! THESE CALLS MAY REQUIRE DIFFERENT
297 ! STACK HANDLING (THERE MAY BE BUGS HERE!!)
298 ! (the number of return values does not always
299 ! correspond to the Ack manual)
471 .asciz "Monitor call "
475 .asciz ": not implemented"
489 ! deal with ignore mask here
490 ! (not yet implemented)
706 .asciz "Array bound error "
709 .asciz "Range bound error "
712 .asciz "Set bound error "
715 .asciz "Integer overflow "
718 .asciz "Floating overflow "
721 .asciz "Floating underflow "
724 .asciz "Divide by 0 "
727 .asciz "Divide by 0.0 "
730 .asciz "Undefined integer "
733 .asciz "Undefined float "
736 .asciz "Conversion error "
739 .asciz "unknown trap "
742 .asciz "unknown trap "
745 .asciz "unknown trap "
748 .asciz "unknown trap "
751 .asciz "unknown trap "
754 .asciz "Stack overflow "
757 .asciz "Heap overflow "
760 .asciz "Illegal instruction "
763 .asciz "Illegal size argument "
769 .asciz "Addressing non-existent memory "
772 .asciz "Bad pointer used "
775 .asciz "Program counter out of range "
778 .asciz "Bad argument of LAE "
781 .asciz "Bad monitor call "
784 .asciz "Argument of LIN too high "
787 .asciz "GOTO decriptor error "
790 .asciz "Language run-time trap "
793 .asciz " (line number unknown)"
906 swi.s
\0\0\0\0\0\0\0\0\0\0\0\0\0\ 2\ 2¤
\ 1\0\0ä
\ 5.define _Swi, _Swix, _bbc_get, _bbc_vduw, _bbc_vdu
915 AND R10,R10,#0xFF000000
919 LDR R11,[R12,#4] ! PT TO REGS
920 STMFD R12<,{R4,R5,R6,R7}
943 LDMFD R12<,{R4,R5,R6,R7}
950 AND R10,R10,#0xFF000000
956 STMFD R12<,{R4,R5,R6,R7}
980 LDMFD R12<,{R4,R5,R6,R7}
983 ! the rest is for Acorn compatibility