mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-04-05 03:37:43 +00:00
Optimize longjmp
This commit is contained in:
parent
3c1be6c92f
commit
01b5418c8b
@ -12,20 +12,18 @@ export asm setjmp(env)
|
||||
STX ESP
|
||||
TSX
|
||||
STX TMPL
|
||||
LDY TMPL
|
||||
- LDA $0100,Y
|
||||
STA (SRC),Y
|
||||
INY
|
||||
BNE -
|
||||
INC SRC+1
|
||||
LDX #ESTK
|
||||
LDY #$00
|
||||
- LDA $00,X
|
||||
STA (SRC),Y
|
||||
INY
|
||||
INX
|
||||
BNE -
|
||||
- LDA $0100,X
|
||||
STA (SRC),Y
|
||||
INY
|
||||
BNE +
|
||||
INC SRC+1
|
||||
+ INX
|
||||
BNE -
|
||||
TXA
|
||||
LDX ESP
|
||||
STA ESTKL,X
|
||||
@ -42,8 +40,9 @@ export asm longjmp(env, retval)
|
||||
STA SRC+1
|
||||
LDA ESTKL+1,X
|
||||
STA DST
|
||||
LDA ESTKH+1,X
|
||||
STA DST+1
|
||||
LDY ESTKH+1,X
|
||||
INY
|
||||
STY DST+1
|
||||
LDX #ESTK
|
||||
LDY #$00
|
||||
- LDA (DST),Y
|
||||
@ -51,15 +50,14 @@ export asm longjmp(env, retval)
|
||||
INY
|
||||
INX
|
||||
BNE -
|
||||
- LDA (DST),Y
|
||||
STA $0100,X
|
||||
INY
|
||||
BNE +
|
||||
INC DST+1
|
||||
+ INX
|
||||
BNE -
|
||||
LDX TMP
|
||||
DEC DST+1
|
||||
LDX TMPL
|
||||
TXS
|
||||
LDY TMPL
|
||||
- LDA (DST),Y
|
||||
STA $0100,Y
|
||||
INY
|
||||
BNE -
|
||||
LDX ESP
|
||||
LDA SRC
|
||||
STA ESTKL,X
|
||||
|
@ -50,6 +50,7 @@ PROFILE = PROFILE\#FE1000
|
||||
MEMMGR = MEMMGR\#FE1000
|
||||
MEMTEST = MEMTEST\#FE1000
|
||||
FIBER = FIBER\#FE1000
|
||||
LONGJMP = LONGJMP\#FE1000
|
||||
PLASM = plasm
|
||||
INCS = toolsrc/plasm.h toolsrc/tokens.h toolsrc/symbols.h toolsrc/lex.h toolsrc/parse.h toolsrc/codegen.h
|
||||
OBJS = toolsrc/plasm.c toolsrc/parse.c toolsrc/lex.c toolsrc/codegen.c
|
||||
@ -69,7 +70,7 @@ TXTTYPE = .TXT
|
||||
#SYSTYPE = \#FF2000
|
||||
#TXTTYPE = \#040000
|
||||
|
||||
all: $(PLASM) $(PLVM) $(PLVM01) $(PLVM02) $(PLVM802) $(PLVM03) $(CMD) $(ARGS) $(MEMMGR) $(MEMTEST) $(FIBER) $(ED) $(MON) $(ROD) $(SIEVE) $(UTHERNET2) $(UTHERNET) $(ETHERIP) $(INET) $(DHCP) $(HTTPD) $(ROGUE) $(ROGUEMAP) $(ROGUECOMBAT) $(ROGUEIO) $(HGR1) $(TONE) $(DGR) $(DGRTEST) $(FILEIO) $(CONIO) $(PORTIO) $(SPIPORT) $(SDFAT) $(FATCAT) $(FATGET) $(FATPUT) $(FATWDSK) $(FATRDSK) $(SANE) $(FPSTR) $(FPU) $(SANITY) $(RPNCALC)
|
||||
all: $(PLASM) $(PLVM) $(PLVM01) $(PLVM02) $(PLVM802) $(PLVM03) $(CMD) $(ARGS) $(MEMMGR) $(MEMTEST) $(FIBER) $(LONGJMP) $(ED) $(MON) $(ROD) $(SIEVE) $(UTHERNET2) $(UTHERNET) $(ETHERIP) $(INET) $(DHCP) $(HTTPD) $(ROGUE) $(ROGUEMAP) $(ROGUECOMBAT) $(ROGUEIO) $(HGR1) $(TONE) $(DGR) $(DGRTEST) $(FILEIO) $(CONIO) $(PORTIO) $(SPIPORT) $(SDFAT) $(FATCAT) $(FATGET) $(FATPUT) $(FATWDSK) $(FATRDSK) $(SANE) $(FPSTR) $(FPU) $(SANITY) $(RPNCALC)
|
||||
|
||||
clean:
|
||||
-rm *FE1000 *FF2000 $(PLASM) $(PLVM) $(PLVM01) $(PLVM02) $(PLVM03)
|
||||
@ -145,6 +146,10 @@ $(FIBER): libsrc/fiber.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/fiber.pla > libsrc/fiber.a
|
||||
acme --setpc 4094 -o $(FIBER) libsrc/fiber.a
|
||||
|
||||
$(LONGJMP): libsrc/longjmp.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/longjmp.pla > libsrc/longjmp.a
|
||||
acme --setpc 4094 -o $(LONGJMP) libsrc/longjmp.a
|
||||
|
||||
$(MON): samplesrc/mon.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < samplesrc/mon.pla > samplesrc/mon.a
|
||||
acme --setpc 4094 -o $(MON) samplesrc/mon.a
|
||||
|
@ -347,7 +347,7 @@ t_opseq *parse_value(t_opseq *codeseq, int rvalue, int *stackdepth)
|
||||
/*
|
||||
* Parse pre operators.
|
||||
*/
|
||||
while (scan)
|
||||
while (scan())
|
||||
{
|
||||
if (scantoken == ADD_TOKEN)
|
||||
{
|
||||
@ -364,8 +364,7 @@ t_opseq *parse_value(t_opseq *codeseq, int rvalue, int *stackdepth)
|
||||
{
|
||||
deref++;
|
||||
if (!type)
|
||||
//type |= scantoken == BPTR_TOKEN ? BPTR_TYPE : WPTR_TYPE;
|
||||
type = scantoken == BPTR_TOKEN ? BPTR_TYPE : WPTR_TYPE;
|
||||
type |= scantoken == BPTR_TOKEN ? BPTR_TYPE : WPTR_TYPE;
|
||||
else if (scantoken == BPTR_TOKEN)
|
||||
parse_error("Byte value used as pointer");
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user