comparison level2/modules/kernel/fldabx.asm @ 3170:18306d646f71

mc09: First release of working L2 port to MC09 platform Kernel has conditional code so should build for all targets, but it's been split out into a separate file to avoid polluting the main code. The included system call source code only has minor conditional additions so it is shared.
author Neal Crook <foofoobedoo@gmail.com>
date Thu, 20 Apr 2017 20:15:19 +0100
parents 2d22d31bc74b
children
comparison
equal deleted inserted replaced
3169:1ff3d7673e36 3170:18306d646f71
17 * Entry: B=Task # 17 * Entry: B=Task #
18 * X=Pointer to data 18 * X=Pointer to data
19 * Exit : B=Byte from other task 19 * Exit : B=Byte from other task
20 L0C40 pshs cc,a,x,u 20 L0C40 pshs cc,a,x,u
21 bsr L0BF5 Calculate offset into DAT image (fmove.asm) 21 bsr L0BF5 Calculate offset into DAT image (fmove.asm)
22 ldd a,u 22 ldd a,u [NAC HACK 2017Jan25] why ldd when a is never used??
23 orcc #IntMasks 23 orcc #IntMasks
24 IFNE mc09
25 lda <D.TINIT Current MMU mask - selects block 0
26 sta >MMUADR Select block 0
27
28 stb >MMUDAT Map selected block into $0000-$1FFF
29 ldb ,x
30 clr >MMUDAT Restore mapping at $0000-$1FFF
31 ELSE
24 stb >DAT.Regs Map block into $0000-$1FFF 32 stb >DAT.Regs Map block into $0000-$1FFF
25 ldb ,x 33 ldb ,x
26 clr >DAT.Regs Restore mapping at $0000-$1FFF 34 clr >DAT.Regs Restore mapping at $0000-$1FFF
35 ENDIF
27 puls cc,a,x,u 36 puls cc,a,x,u
28 37
29 stb R$A,u Save into caller's A & return 38 stb R$A,u Save into caller's A & return
30 clrb set to no errors 39 clrb set to no errors
31 rts 40 rts
61 * X=Pointer to data 70 * X=Pointer to data
62 L0C28 andcc #^Carry 71 L0C28 andcc #^Carry
63 pshs cc,d,x,u 72 pshs cc,d,x,u
64 bsr L0BF5 Calculate offset into DAT image (fmove.asm) 73 bsr L0BF5 Calculate offset into DAT image (fmove.asm)
65 ldd a,u Get memory block 74 ldd a,u Get memory block
75 IFNE mc09
76 orcc #IntMasks
77 lda <D.TINIT Current MMU mask - selects block 0
78 sta >MMUADR Select block 0
79
80 lda 1,s Haven't lost stack yet so this is safe
81
82 stb >MMUDAT Map selected block into $0000-$1FFF
83 sta ,x
84 clr >MMUDAT Restore mapping at $0000-$1FFF
85 ELSE
66 lda 1,s 86 lda 1,s
67 orcc #IntMasks 87 orcc #IntMasks
68 stb >DAT.Regs Map selected block into $0000-$1FFF 88 stb >DAT.Regs Map selected block into $0000-$1FFF
69 sta ,x 89 sta ,x
70 clr >DAT.Regs Restore mapping at $0000-$1FFF 90 clr >DAT.Regs Restore mapping at $0000-$1FFF
91 ENDIF
71 puls cc,d,x,u,pc 92 puls cc,d,x,u,pc