![Samsung S3C2501X Скачать руководство пользователя страница 141](http://html.mh-extra.com/html/samsung/s3c2501x/s3c2501x_user-manual_340828141.webp)
INSTRUCTION SET
S3C2501X
3-50
3.13.4 ASSEMBLER SYNTAX
SWI{cond} <expression>
{cond}
Two character condition mnemonic, Table 3-2.
<expression>
Evaluated and placed in the comment field (which is ignored by ARM9TDMI).
Examples
SWI
ReadC
; Get next character from read stream.
SWI
“k”
; Output a “k” to the write stream.
SWINE
0
; Conditionally call supervisor with 0 in comment field.
Supervisor code
The previous examples assume that suitable supervisor code exists, for instance:
0x08 B Supervisor
; SWI entry point
EntryTable
; Addresses of supervisor routines
DCD ZeroRtn
DCD ReadCRtn
DCD WriteIRtn
. . .
Zero
EQU 0
ReadC
EQU 256
WriteI
EQU 512
Supervisor
; SWI has routine required in bits 8-23 and data (if any) in
; bits 0-7. Assumes R13_svc points to a suitable stack
STMFD
R13,{R0-R2,R14}
; Save work registers and return address.
LDR
R0,[R14,#-4]
; Get SWI instruction.
BIC
R0,R0,#0xFF000000
; Clear top 8 bits.
MOV
R1,R0,LSR#8
; Get routine offset.
ADR
R2,EntryTable
; Get start address of entry table.
LDR
R15,[R2,R1,LSL#2]
; Branch to appropriate routine.
WriteIRtn
; Enter with character in R0 bits 0-7.
. . . . . .
LDMFD
R13,{R0-R2,R15}^
; Restore workspace and return,
; restoring processor mode and flags.
Содержание S3C2501X
Страница 1: ...S3C2501X 32 BIT RISC MICROPROCESSOR USER S MANUAL Revision 1 查询S3C2501X供应商 捷多邦 专业PCB打样工厂 24小时加急出货 ...
Страница 18: ......
Страница 275: ...MEMORY CONTROLLER S3C2501X 5 60 NOTES ...
Страница 289: ...I2C CONTROLLER S3C2501X 6 14 NOTES ...
Страница 373: ...GDMA CONTROLLER S3C2501X 9 24 NOTES ...
Страница 435: ...I O PORTS S3C2501X 12 12 NOTES ...
Страница 463: ...ELECTRICAL DATA S3C2501X 15 6 NOTES ...