Mercurial > hg > Members > kono > os9 > sbc09
changeset 137:1078f3e31d9c
index version TL/1 first try
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 07 Jan 2019 12:22:19 +0900 |
parents | 694412798333 |
children | 6f7276831219 |
files | TL1/TL1os9.asm |
diffstat | 1 files changed, 39 insertions(+), 44 deletions(-) [+] |
line wrap: on
line diff
--- a/TL1/TL1os9.asm Mon Jan 07 10:22:20 2019 +0900 +++ b/TL1/TL1os9.asm Mon Jan 07 12:22:19 2019 +0900 @@ -40,10 +40,9 @@ SY RMB 1 CH RMB 1 VAL RMB 1 -GL RMB 1 +GL RMB 1 global 0xff / local 1 OPER RMB 1 -GLL RMB 1 -INDEX RMB 1 +GLL RMB 1 left value g 0xff / local l RMCODE RMB 1 ACC RMB 1 LSIZE RMB 1 @@ -51,7 +50,7 @@ TEND RMB 2 WEND RMB 2 AMODE RMB 1 0x20 main, 1 proc, 0 ? -RSW RMB 1 +RSW RMB 1 0 word lookup, 0xff word register mode in tlook GEND RMB 2 SSW RMB 1 @@ -89,7 +88,6 @@ COMP CLRA STA OUTDN STA LSW - STA INDEX STA AMODE STA LSIZE STA RSW @@ -179,7 +177,7 @@ LBSR WORD LDB RSW BEQ *+5 -ERR4 LBRA ERROR +ERR4 LBRA ERROR define duplicate name LDX TEND LDA LSIZE STA ,X @@ -187,7 +185,7 @@ LDX WEND STX TEND BSR WORD1 - CMPA #$36 [ + CMPA #$36 "[" array BNE REG2 BSR WORD1 BNE ERR4 @@ -204,13 +202,11 @@ ** PROG CMPA #$32 VAR? BNE *+4 - BSR REGNAM - BSR REG0 + BSR REGNAM global variable + BSR REG0 put mark CMPA #$33 ARRAY? BNE *+4 BSR REGNAM - LDB #-1 - STB INDEX ** * STATEMENT ** @@ -240,7 +236,7 @@ CMPA #$38 END BCC SS2 ADDA #4 - PSHS A + PSHS A wait for END BSR WORD1 BSR STLIST PULS A @@ -338,7 +334,7 @@ LBSR PUTX LDA #$A7 LDB OPER - LBRA PUTAB + LBRA PUTOFS AS4 DECA BNE AS5 LDD #$3504 PULS B @@ -350,7 +346,6 @@ FCB 4 FDB $3510 PULS X FDB $A700 STA ,X - CLR INDEX RTS ** ** NON-STATEMENT @@ -371,7 +366,6 @@ ** DECB BNE SS7 - STB INDEX BSR ASTOUT LBSR STLIST LDA #$60 @@ -404,7 +398,6 @@ BSR ASTOUT LDD #$3402 pshs a LBSR PUTAB - CLR INDEX LBSR STAT LDD #$3502 puls a LBSR PUTAB @@ -426,7 +419,6 @@ ** SS8 DECB BNE SS9 - STB INDEX BSR ASTOUT LBSR EXPR LDA #$64 @@ -435,11 +427,7 @@ FCB 2 FDB $2603 BSR SLAOUT - LDB INDEX - PSHS B LBSR STAT - PULS B - STB INDEX BSR PEROUT BSR MINOUT PLUOUT LBRA PULDEF @@ -455,13 +443,7 @@ FCB 2 FDB $2603 BSR SLAOUT - LDB INDEX - PSHS B LBSR STAT - PULS B - CMPB INDEX - BEQ *+4 - CLR INDEX BRA PLUOUT SLAOUT LBRA PSHJMP PEROUT LBRA STCHG @@ -483,22 +465,17 @@ FCB 2 FDB $2703 BSR SLAOUT - LDB INDEX - PSHS B LBSR STAT BSR SLAOUT BSR PEROUT BSR PLUOUT PULS B - STB INDEX - PULS B LDA SY CMPA #$67 BNE S10A PSHS B LBSR WORD LBSR STAT - CLR INDEX PULS A LBRA PLDFN ** @@ -534,7 +511,6 @@ LBSR GETCH BRA WR01 WR02 CLRA put 0 at end - STA INDEX LBSR PUTA LBSR GETCH LBRA WORD @@ -585,7 +561,7 @@ LBSR PUTHSL FDB $03BD FDB PUTDA -WR66 CLR INDEX +WR66 RTS11 RTS ** * PUTX & PUTB @@ -595,14 +571,35 @@ PULS D BRA PUTAB ** -* use X for LB, OR use Y for GB BY INDEX +* use X for LB, OR use Y for GB BY +** +PUTX equ RTS11 * no pointer load ** -PUTX LDB GLL - STB INDEX - CMPB #0 - BNE RTS11 - LDA #$10 - LBRA AOUT +PUTOFS PSHS D,X + LDX <PC + STA ,X+ + CLRA + TST <GLL + BNE PUTOFSX + ORA #$20 +PUTOFSX STA ,S + CMPB #32 + BGT *+6 + CMPB #-32 + BGE PUTOFS5 + LDA #$80 + ORA ,S + STA ,X+ + STB ,X+ + BRA PUTOFS8 +PUTOFS5 + ANDB #$1F + ORA ,S + STA ,X+ +PUTOFS8 + STX <PC + PULS D,X,PC + *** * PUT ACC A&B ** @@ -883,7 +880,7 @@ PULS A ADDA AMODE LDB OPER - LBRA PUTAB + LBRA PUTOFS * PUT 'TAB:PULS A' PUTPUL LBSR PUTHS FCB 4 @@ -1018,7 +1015,6 @@ LBSR CHECK PFC1 LDB #-1 STB ACC - STB INDEX LDA #$86 LDB LSIZE LBSR PUTAB @@ -1139,7 +1135,6 @@ FDB $3297 FCB WT1,$9E,WT1 FDB $A600 - CLR INDEX RTS ** FOR EXPANTION TM10 LBRA ERROR