syscall_en.txt
来自「这是一个用java编的windlx模拟器」· 文本 代码 · 共 49 行
TXT
49 行
SYSCALL INSTRUCTION
===================
The SYSCALL instruction offers to the programmer an operating-system-like
interface.
System calls expect that the address of their parameters is stored in register
R14, and will put their return value in register R1.
If an error occurs, they put the value -1 into R1 register.
The syscall 0 not returns anything.
Syscall 0
Description: Stops the simulator (it's similar to HALT deprecated instruction)
Parameters: None
Syscall 1
Description: Open a file
Parameters: 1 - Pathname of the file that must be opened
2 - an integer that be used to specify how to open the file
(see the manual to more detail)
Syscall 2
Description: Close a file
Parameters: 1 - File descriptor of the file must be closed
Syscall 3
Description: Read bytes from an input source
Parameters: 1 - file descriptor to read from (0 for keyboard)
2 - address where the read data must be put into
3 - number of bytes to read
Syscall 4
Description: Write bytes into an output source
Parameters: 1 - file descriptor to write to
2 - the address where the data must be read from
3 - number of bytes to write
Syscall 5
Description: Print a string
Parameters: 1 - format string tha can be included some placeholders
- a parameter for each placeholders
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?