OpenCores
URL https://opencores.org/ocsvn/ffr16/ffr16/trunk

Subversion Repositories ffr16

[/] [ffr16/] [branches/] [APERT/] [sources/] [fpu/] [050803KN/] [compile/] [debug.psm] - Rev 13

Compare with Previous | Blame | View Log

               ;program example for PSMDEBUG
               ;
               LOAD sF,80             ;walking '1' register
               LOAD sB,00             ;reset accumulator lower byte
               LOAD sC,00             ;reset accumulator upper byte
               ENABLE INTERRUPT
               ;main program to produce walking '1'
         main: OUTPUT sF,01
               ;software delay loop
               LOAD s1,43
    slow_loop: LOAD s0,FF
    fast_loop: SUB s0,01
               JUMP NZ,fast_loop
               SUB s1,01
               JUMP NZ,slow_loop
               ;walk the '1' to the right
               RR sF
               JUMP main
               ;interrupt service routine
               ADDRESS D0
  int_routine: INPUT sA,10            ;read value
               ADD sB,sA              ;16 bit accumulation
               ADDCY sC,00
               OUTPUT sB,20           ;output 16 bit value
               OUTPUT sC,40
               RETURNI ENABLE
               ;interrupt vector
               ADDRESS FF
               JUMP int_routine

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.