Mercurial > hg > Members > kono > nitros9-code
changeset 627:d45d58e6a5f8
Updated regdump for NitrOS-9
author | boisy |
---|---|
date | Wed, 04 Dec 2002 15:30:54 +0000 |
parents | 472f0651e644 |
children | 661c14ca83e8 |
files | 3rdparty/p2mods/makefile 3rdparty/p2mods/os9p4_regdump.asm |
diffstat | 2 files changed, 34 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/3rdparty/p2mods/makefile Tue Dec 03 21:52:37 2002 +0000 +++ b/3rdparty/p2mods/makefile Wed Dec 04 15:30:54 2002 +0000 @@ -1,7 +1,7 @@ include ../../Makefile.rules DEPENDS = ./Makefile -CMDS = os9p3_perr os9p4_regdump os9p3_sayhi sayhi tsayhi +CMDS = os9p3_perr os9p4_regdump_6809 os9p4_regdump_6309 os9p3_sayhi sayhi tsayhi ALLOBJS = $(CMDS) all: $(ALLOBJS) @@ -11,5 +11,11 @@ @$(ECHO) "* *" @$(ECHO) "*********************************************" +os9p4_regdump_6809: os9p4_regdump.asm + $(AS) $(AFLAGS) $(ASOUT)$@ $< + +os9p4_regdump_6309: os9p4_regdump.asm + $(AS) $(AFLAGS) $(ASOUT)$@ $< -aH6309=1 + clean: $(RM) $(ALLOBJS)
--- a/3rdparty/p2mods/os9p4_regdump.asm Tue Dec 03 21:52:37 2002 +0000 +++ b/3rdparty/p2mods/os9p4_regdump.asm Wed Dec 04 15:30:54 2002 +0000 @@ -55,7 +55,11 @@ fcb $0d regdmp equ * + IFNE H6309 + pshs cc,a,b,e,f,dp,x,y,u save all registers + ELSE pshs cc,a,b,dp,x,y,u save all registers + ENDC tfr u,y transfer addresses leas -60,s back up for some variable storage leau 4,s buffer starts here @@ -74,7 +78,13 @@ ldb R$A,y get register from stack bsr reg000 dump register A ldb R$B,y get register from stack - bsr reg000 dump regsietr B + bsr reg000 dump register B + IFNE H6309 + ldb R$E,y get register from stack + bsr reg000 dump register E + ldb R$F,y get register from stack + bsr reg000 dump register F + ENDC inc -1,u turn off ascii char print flag ldd R$X,y get register from stack bsr reg000 dump register X @@ -89,12 +99,20 @@ ldd R$PC,y get user Task Number bsr reg000 dump register PC ldy <D.Proc get address of users process descriptor - ldd P$Sp,y get users stack address + ldd P$SP,y get users stack address + IFNE H6309 + addd #14 add on for registers which were saved + ELSE addd #12 add on for registers which were saved + ENDC bsr reg000 dump register S lbsr reg060 send a <CR> leas 60,s restore stack pointer + IFNE H6309 + puls cc,a,b,e,f,dp,x,y,u,pc restore all registers and return + ELSE puls cc,a,b,dp,x,y,u,pc restore all registers and return + ENDC * Dump a register in "D" * X = Control Table Location @@ -183,7 +201,7 @@ ldy <D.Proc get process descriptor address lda P$Path+2,y get user error path number pshs a save it - ldu P$Sp,y get user stack address + ldu P$SP,y get user stack address leau -50,u back off to make room lda <D.SysTsk get system task number ldb P$Task,y get users task number @@ -203,6 +221,12 @@ fcc /a / fcb 0 fcc /b / + IFNE H6309 + fcb 0 + fcc /e / + fcb 0 + fcc /f / + ENDC fcb 1 fcc /x / fcb 1 @@ -324,5 +348,3 @@ emod eom end - -