CHAPTER 4: ASSEMBLER
84
EPSON
S5U1C63000A MANUAL
(S1C63 FAMILY ASSEMBLER PACKAGE)
4.9 Sample Executions
Command line
C:\EPSON\S1C63\bin\as63 -g -e -l main.s
Assembly source file
; main.s
; AS63 test program (main routine)
;
;***** INITIAL SP1 & SP2 ADDRESS DEFINITION *****
#ifdef SMALL_RAM
.set SP1_INIT_ADDR 0xb
;SP1 init addr = 0x2c
#else
.set SP1_INIT_ADDR 0x4b
;SP1 init addr = 0x12c
#endif
.set SP2_INIT_ADDR 0x1f
;SP2 init addr = 0x1f
;***** NMI & BOOT, LOOP *****
.global INIT_RAM_BLK1
; subroutine in sub.s
.global INC_RAM_BLK1
; subroutine in sub.s
.org 0x100
NMI:
calr INIT_RAM_BLK1
; initialize RAM block 1
reti
; in NMI(watchdog timer)
.org 0x110
BOOT:
ldb %ba,SP1_INIT_ADDR
ldb %sp1,%ba
; set SP1
ldb %ba,SP2_INIT_ADDR
ldb %sp2,%ba
; set SP2
calr INIT_RAM_BLK1
; initialize RAM block 1
LOOP:
calr INC_RAM_BLK1
; increment RAM block 1
jr LOOP
; infinity loop
;***** RAM block *****
.org 0x0
.bss
.comm RAM_BLK0, 4
.comm RAM_BLK1, 4
Содержание S5U1C63000A
Страница 1: ...MF910 06 CMOS 4 BIT SINGLE CHIP MICROCOMPUTER S1C63 Family Assembler Package S5U1C63000A Manual ...
Страница 4: ......
Страница 14: ......
Страница 304: ......
Страница 305: ...S1C63 Family Assembler Package Quick Reference ...