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

Subversion Repositories zipcpu

[/] [zipcpu/] [trunk/] [sw/] [zasm/] [sys.i] - Diff between revs 60 and 69

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 60 Rev 69
Line 11... Line 11...
; Status:       As of August, 2015, I have no confidence that the preprocessor
; Status:       As of August, 2015, I have no confidence that the preprocessor
;               can properly include this file.  It certainly cannot handle
;               can properly include this file.  It certainly cannot handle
;               macros (yet).
;               macros (yet).
;
;
; Creator:      Dan Gisselquist, Ph.D.
; Creator:      Dan Gisselquist, Ph.D.
;               Gisselquist Tecnology, LLC
;               Gisselquist Technology, LLC
;
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
;
; Copyright (C) 2015, Gisselquist Technology, LLC
; Copyright (C) 2015, Gisselquist Technology, LLC
;
;
Line 118... Line 118...
#define JSR(LBL,RG)     SUB 1,SP                \
#define JSR(LBL,RG)     SUB 1,SP                \
                        MOV __here__+3(PC),RG   \
                        MOV __here__+3(PC),RG   \
                        STO RG,1(SP)            \
                        STO RG,1(SP)            \
                        BRA LBL                 \
                        BRA LBL                 \
                        ADD 1,SP
                        ADD 1,SP
 
 
#define RET             LOD 1(SP),PC
#define RET             LOD 1(SP),PC
#define SAVE_USER_CONTEXT(DR,AR)                \
#define SAVE_USER_CONTEXT(DA,DB,DC,DD,AR)       \
                        MOV -15(uSP),AR         \
                        MOV -15(uSP),AR         \
                        MOV     uPC,DR          \
                        MOV     uR0,DA          \
                        STO     DR,15(AR)       \
                        MOV     uR1,DB          \
                        MOV     uCC,DR          \
                        MOV     uR2,DC          \
                        STO     DR,14(AR)       \
                        MOV     uR3,DD          \
                        MOV     uR12,DR         \
                        STO     DA,(AR)         \
                        STO     DR,13(AR)       \
                        STO     DB,1(AR)        \
                        MOV     uR11,DR         \
                        STO     DC,2(AR)        \
                        STO     DR,12(AR)       \
                        STO     DD,3(AR)        \
                        MOV     uR10,DR         \
                        MOV     uR4,DA          \
                        STO     DR,11(AR)       \
                        MOV     uR5,DB          \
                        MOV     uR9,DR          \
                        MOV     uR6,DC          \
                        STO     DR,10(AR)       \
                        MOV     uR7,DD          \
                        MOV     uR8,DR          \
                        STO     DA,4(AR)        \
                        STO     DR,9(AR)        \
                        STO     DB,5(AR)        \
                        MOV     uR7,DR          \
                        STO     DC,6(AR)        \
                        STO     DR,8(AR)        \
                        STO     DD,7(AR)        \
                        MOV     uR6,DR          \
                        MOV     uR8,DA          \
                        STO     DR,7(AR)        \
                        MOV     uR9,DB          \
                        MOV     uR5,DR          \
                        MOV     uR10,DC         \
                        STO     DR,6(AR)        \
                        MOV     uR11,DD         \
                        MOV     uR4,DR          \
                        STO     DA,8(AR)        \
                        STO     DR,5(AR)        \
                        STO     DB,9(AR)        \
                        MOV     uR3,DR          \
                        STO     DC,10(AR)       \
                        STO     DR,4(AR)        \
                        STO     DD,11(AR)       \
                        MOV     uR2,DR          \
                        MOV     uR12,DA         \
                        STO     DR,3(AR)        \
                        MOV     uCC,DC          \
                        MOV     uR1,DR          \
                        MOV     uPC,DD          \
                        STO     DR,2(AR)        \
                        STO     DA,12(AR)       \
                        MOV     uR0,DR          \
                        STO     DC,13(AR)       \
                        STO     DR,1(AR)
                        STO     DD,14(AR)
#define RESTORE_USER_CONTEXT(DR,AR)             \
#define RESTORE_USER_CONTEXT(DA,DB,DC,DD,AR)    \
                        LOD     1(AR),DR        \
                        LOD     (AR),DA         \
                        MOV     DR,uR0          \
                        LOD     1(AR),DB        \
                        LOD     2(AR),DR        \
                        LOD     2(AR),DC        \
                        MOV     DR,uR1          \
                        LOD     3(AR),DD        \
                        LOD     3(AR),DR        \
                        MOV     DA,uR0          \
                        MOV     DR,uR2          \
                        MOV     DB,uR1          \
                        LOD     4(AR),DR        \
                        MOV     DC,uR2          \
                        MOV     DR,uR3          \
                        MOV     DD,uR3          \
                        LOD     5(AR),DR        \
                        LOD     4(AR),DA        \
                        MOV     DR,uR4          \
                        LOD     5(AR),DB        \
                        LOD     6(AR),DR        \
                        LOD     6(AR),DC        \
                        MOV     DR,uR5          \
                        LOD     7(AR),DD        \
                        LOD     7(AR),DR        \
                        MOV     DA,uR4          \
                        MOV     DR,uR6          \
                        MOV     DB,uR5          \
                        LOD     8(AR),DR        \
                        MOV     DC,uR6          \
                        MOV     DR,uR7          \
                        MOV     DD,uR7          \
                        LOD     9(AR),DR        \
                        LOD     8(AR),DA        \
                        MOV     DR,uR8          \
                        LOD     9(AR),DB        \
                        LOD     10(AR),DR       \
                        LOD     10(AR),DC       \
                        MOV     DR,uR9          \
                        LOD     11(AR),DD       \
                        LOD     11(AR),DR       \
                        MOV     DA,uR8          \
                        MOV     DR,uR10         \
                        MOV     DB,uR9          \
                        LOD     12(AR),DR       \
                        MOV     DC,uR10         \
                        MOV     DR,uR11         \
                        MOV     DD,uR11         \
                        LOD     13(AR),DR       \
                        LOD     12(AR),DA       \
                        MOV     DR,uR12         \
                        LOD     13(AR),DB       \
                        LOD     14(AR),DR       \
                        LOD     14(AR),DC       \
                        MOV     DR,uCC          \
                        MOV     DA,uR12         \
                        LOD     15(AR),DR       \
                        MOV     DB,uCC          \
                        MOV     DR,uPC
                        MOV     DC,uPC          \
 
                        MOV     15(AR),uSP
#define READ_USER_TRAP(RG)                      \
#define READ_USER_TRAP(RG)                      \
                        MOV     uCC,RG          \
                        MOV     uCC,RG          \
                        AND     -256,RG
                        AND     -256,RG
 
 

powered by: WebSVN 2.1.0

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