head	1.1;
branch	1.1.1;
access;
symbols
	v001:1.1.1.1
	kongzilee:1.1.1;
locks; strict;
comment	@# @;


1.1
date	2006.01.21.16.53.32;	author kongzilee;	state Exp;
branches
	1.1.1.1;
next	;
commitid	61e43d267074567;

1.1.1.1
date	2006.01.21.16.53.32;	author kongzilee;	state Exp;
branches;
next	;
commitid	61e43d267074567;


desc
@@


1.1
log
@Initial revision
@
text
@	.list	off
        .include        "S3C9428.reg"
	.list on

;--------------<< Interrupt Vector Address >>
.ORG 0000H

.VECTOR 00H,INT_4208		; KS86C4208 has only one interrupt vector

.ORG 0100H

INITIAL:

 LD SYM, #00H
 LD BTCON, #10100010B
 LD CLKCON, #00011000B	; non-divided CPU clock
 LD SP, #0C0H			; 4208 -> 00~BF (After decrease, push data)
;--------------<< Port Initialization >>
 LD P0CONH, #0		; input
 LD P0CONL, #0		; input
 LD P0PUR, #0FFH		; pull-up enable
 LD P1CON, #50H		; input, EXT.INT enable
 LD P1PND, #0F0H		; pull-up enable
 LD P2CONH, #0		; input
 LD P2CONL, #0		; input
 LD P2PUR, #0FFH		; pull-up enable
 LD P3CON, #0		; push-pull output
;--------------<< Timer 0 Setting >>
 LD T0DATA, #41H		; interrupt interval --1.667msec (10MHz base)
 LD T0CONL, #01000010B	; Timer 0 match output
;--------------<< RAM Area Clear >>
 LD R0, #0		; RAM clear area setting
 RAM_CLR:
 CLR @@R0
 INC R0
 CP R0, #0BFH		; general register area -> 00H~BFH
 ;JR ULE, RAM_CLR
 JR F, RAM_CLR
;--------------<< Initialize Other Register >>
;，
;，
;，
 EI

;--------------<< Main Loop >>
 MAIN:
 NOP
 LD R0, #33H
;，
;，
;，
 CALL SUB_ROUTINE0	; subroutine call
;，
;，
;，
 CALL SUB_ROUTINE1	; subroutine call
;，
;，
;，
 JP MAIN

;--------------<< Subroutine >>
SUB_ROUTINE0:
 NOP
 LDC R0, 1104H
;，
;，
;，
 IDLE
 RET

SUB_ROUTINE1:
 NOP
 LDE R0, 1104H
;，
;，
;，
 RET

;--------------<< Interrupt Service Routine >>
INT_4208:

 LD R0, T0CONL		; KS86C4208 has just one interrupt vector
 AND R0, #00000011B	; only Timer 0 match interrupt enable
 CP R0, #00000011B
 JP EQ, INT_TIMER0	; T0CON¨s pending bit & INT. enable bit check
 INT_TIMER0:
 AND T0CONL, #11111110B	; pending clear
;，
;，
;，
 LDC R0, 1104H
 LDE R0, 1104H
 LDC R0, #1000H[RR2]
 LDE R0, #1000H[RR2]
 LDCD R0, @@RR6
 LDED R0, @@RR6

 IRET
;，
;，
;，

.END@


1.1.1.1
log
@no message
@
text
@@
