Files
vhdl/lib/CPUs/JCpu/asm/reti_issue.jsm
T
jens 335cc4e9d2 Initial import
git-svn-id: http://moon:8086/svn/vhdl/trunk@2 cc03376c-175c-47c8-b038-4cd826a8556b
2008-08-23 07:19:47 +00:00

51 lines
857 B
JavaScript

; -------------------------------------------------
; Constants
; -------------------------------------------------
; Chip register
cpu_revision: equ 0x00 ; RO
cpu_control: equ 0x01 ; R/W
cpu_status: equ 0x02 ; RO
cpu_int_ctrl: equ 0x03 ; R/W
; -------------------------------------------------
; Program
; -------------------------------------------------
code
reset: jmp init
org 0x001
; nop
reti
; -------------------------------------------------
; Main
; -------------------------------------------------
init: mov R0, 0x05
cout (cpu_int_ctrl), R0
mov R0, 0x00
loop: nop
inc R0
nop
call subr
nop
push R3
nop
push R2
nop
push R1
nop
push R0
nop
pop R0
nop
pop R1
nop
pop R2
nop
pop R3
nop
jmp loop
subr: ret