mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-01-09 13:33:26 +00:00
Merge branch 'master' of https://github.com/dschmenk/PLASMA
This commit is contained in:
commit
4fd990d4c1
@ -564,7 +564,7 @@ end
|
||||
export def dgrLine(buff, x1, y1, x2, y2)
|
||||
byte dx, dy, dx2, dy2, pp
|
||||
word sx, sy, err, dd2
|
||||
|
||||
|
||||
if x1 < x2
|
||||
sx = 1
|
||||
dx = x2 - x1
|
||||
@ -648,7 +648,7 @@ end
|
||||
//
|
||||
export def dgrClear(buff, clr)
|
||||
byte[32] clrtile
|
||||
|
||||
|
||||
clr = evnclr[clr&$0F] | (oddclr[clr&$0F] << 8)
|
||||
memset(@clrtile, clr, 32)
|
||||
return dgrFill(buff, 0, 0, @clrtile)
|
||||
|
@ -46,7 +46,7 @@ byte valstr[] = '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
|
||||
//
|
||||
asm fbrSwap(saveVM, restoreVM)
|
||||
!SOURCE "vmsrc/plvmzp.inc"
|
||||
HWSP = IPY
|
||||
HWSP = IPY
|
||||
LDA ESTKL,X
|
||||
STA SRCL
|
||||
LDA ESTKH,X
|
||||
@ -66,7 +66,8 @@ asm fbrSwap(saveVM, restoreVM)
|
||||
STA ESTK,Y
|
||||
DEY
|
||||
BPL -
|
||||
LDY HWSP
|
||||
+ TXA
|
||||
TAY
|
||||
- LDA $100,Y
|
||||
STA (DST),Y
|
||||
INY
|
||||
@ -110,7 +111,7 @@ end
|
||||
export def fbrInit(numPool)
|
||||
byte i
|
||||
word pool
|
||||
|
||||
|
||||
if numPool >= MAX_FIBERS
|
||||
numPool = MAX_FIBERS
|
||||
fin
|
||||
@ -146,7 +147,7 @@ end
|
||||
//
|
||||
export def fbrStop(fid)
|
||||
byte i
|
||||
|
||||
|
||||
//
|
||||
// Don't STOP fiber 0 (avoid deadlock)
|
||||
//
|
||||
@ -181,7 +182,7 @@ end
|
||||
export def fbrStart(defaddr, param)
|
||||
byte i
|
||||
word vmstate
|
||||
|
||||
|
||||
for i = fbrMax downto 1
|
||||
if fbrState[i] == FIBER_FREE
|
||||
//
|
||||
@ -204,7 +205,7 @@ export def fbrStart(defaddr, param)
|
||||
// This allows a fiber to return and it will fall into fbrExit
|
||||
//
|
||||
vmstate->hwsp = $FB
|
||||
vmstate=>$FE = @fbrExit - 1
|
||||
vmstate=>$FE = @fbrExit - 1
|
||||
vmstate=>$FC = defaddr - 1
|
||||
//
|
||||
// Link into RUN list
|
||||
@ -224,7 +225,7 @@ end
|
||||
//
|
||||
export def fbrYield
|
||||
byte prev
|
||||
|
||||
|
||||
//
|
||||
// Swap to text fiber if this isn't the only fiber RUNning
|
||||
//
|
||||
@ -239,7 +240,7 @@ end
|
||||
//
|
||||
export def fbrHalt
|
||||
byte i
|
||||
|
||||
|
||||
//
|
||||
// Cannot HALT fiber 0 (avoid deadlock)
|
||||
//
|
||||
@ -286,7 +287,7 @@ end
|
||||
|
||||
def fbrTest(fid, param)
|
||||
byte i
|
||||
|
||||
|
||||
for i = 1 to param
|
||||
puth(fid); putc($0D)
|
||||
fbrYield
|
||||
|
Loading…
Reference in New Issue
Block a user