Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dragon-mooh: minor optimisations #1150

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions Kernel/platform/platform-dragon-mooh/mem-mooh.s
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,13 @@ smash@ leau -14,u
pshs dp,d,x,y
cmpu #0x8002+42+7 ; end of copy? (leave space for interrupt) - bottom of SRC
bne smash@ ; no repeat
ldx save_sp ; put stack back
exg x,s ; and data DEST ptr to X now
leau -7,u
safe@ ldd ,--u ; move last 44 bytes with a normal stack
std ,--x ; 4 bytes per loop
ldd ,--u
std ,--x
cmpx #0xA000 ; reached bottom of DEST?
leax -7,u ; pick up SRC in X
ldu save_sp ; restore stack...
exg u,s ; ... and DEST now in U
safe@ ldy ,--x ; move last 44 bytes with a normal stack
ldd ,--x ; 4 bytes per loop
pshu d,y
cmpx #0x8000 ; reached bottom of SRC?
bne safe@
puls x
stx 0xFFA4 ; restore MMU regs
Expand Down
4 changes: 2 additions & 2 deletions Kernel/platform/platform-dragon-mooh/tricks.s
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,13 @@ _dofork:

; now the copy operation is complete we can get rid of the stuff
; _switchin will be expecting from our copy of the stack.
puls x
leas 2,s

ldx #_udata
pshs x
ldx fork_proc_ptr
jsr _makeproc
puls x
leas 2,s

; any calls to map process will now map the childs memory

Expand Down