Mercurial > hg > Members > kono > nitros9-code
changeset 1243:0819245a7e87
Fixed terrible bug in user state system call dispatch routine thanks to
the good eyes of Rodney H.
author | boisy |
---|---|
date | Sun, 10 Aug 2003 13:39:15 +0000 |
parents | bdd2f61d5dbc |
children | 9b74e4e23293 |
files | level2/modules/kernel/krn.asm |
diffstat | 1 files changed, 10 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/level2/modules/kernel/krn.asm Wed Aug 06 23:52:47 2003 +0000 +++ b/level2/modules/kernel/krn.asm Sun Aug 10 13:39:15 2003 +0000 @@ -451,7 +451,6 @@ IFNE H6309 oim #SysState,P$State,x mark process as in system state ELSE -***** pshs d lda P$State,x ora #SysState sta P$State,x @@ -460,21 +459,23 @@ sts P$SP,x save stack pointer leas (P$Stack-R$Size),x point S to register stack destination + IFNE H6309 leau R$Size-1,s point to last byte of destination register stack leay -1,y point to caller's register stack in $FEE1 - IFNE H6309 ldw #R$Size size of the register stack tfm y-,u- + leau ,s needed because the TFM is u-, not -u (post, not pre) ELSE + pshs b + leau R$Size,s point to last byte of destination register stack ldb #R$Size -Loop3 lda ,y- - sta ,u- +Loop3 lda ,-y + sta ,-u decb bne Loop3 -***** puls d + puls b ENDC andcc #^IntMasks - leau ,s needed because the TFM is u-, not -u (post, not pre) * B=function code already from calling process: DON'T USE IT! ldx R$PC,u get where PC was from process leax 1,x move PC past option @@ -485,9 +486,9 @@ IFNE H6309 aim #^IntMasks,R$CC,u Clear interrupt flags in caller's CC ELSE - ldb R$CC,u - andb #^IntMasks - stb R$CC,u + lda R$CC,u + anda #^IntMasks + sta R$CC,u ENDC ldx <D.Proc get current process ptr IFNE H6309