
;*****************************************************************
;
; Copyright 2002   PIER LUCA MONTESSORO
;
; University of Udine
; ITALY
;
; montessoro@uniud.it
; www.montessoro.it
;
; This file is part of a freeware open source software package.
; It can be freely used (as it is or modified) as long as this
; copyright note is not removed.
;
; SIMCPU: assembly language examples
;
;******************************************************************

; same as echo.axx, but using two functions (and CALL-RET instructions)

START:   LDWI R0 1000
         SPWR R0  ; inizialize stack pointer
LOOP:    CALL L1
         CALL L2
         BR LOOP
L1:      INB R1 0001
         TSTI 0001
         JMPNZ L1
         RET
L2:      OUTB R1 0000
         TSTO 0000
         JMPNZ L2
         RET
