From ec86bed4aca73e07d101dcfb27473a8b30faf273 Mon Sep 17 00:00:00 2001 From: Paul Robson Date: Sat, 25 May 2024 15:01:23 +0100 Subject: [PATCH] Removed all of Sweet16 --- basic/scripts/tokens.py | 4 +- .../assembler/{6502 => }/assembler.asm | 0 .../assembler/{common => }/aswrite.asm | 0 .../assembler/{6502 => }/constants.inc | 0 .../assembler/{6502 => }/instruction.asm | 0 .../sources/assembler/{common => }/label.asm | 0 .../sources/assembler/{6502 => }/operands.asm | 0 basic/sources/assembler/sweet/opcodes.asm | 236 ------------------ basic/sources/assembler/sweet/operands.asm | 56 ----- basic/sources/commands/extras/sweet16.asm | 64 ----- examples/basic/examples/mixedassembler.bas | Bin 641 -> 897 bytes release/Makefile | 2 +- 12 files changed, 2 insertions(+), 360 deletions(-) rename basic/sources/assembler/{6502 => }/assembler.asm (100%) rename basic/sources/assembler/{common => }/aswrite.asm (100%) rename basic/sources/assembler/{6502 => }/constants.inc (100%) rename basic/sources/assembler/{6502 => }/instruction.asm (100%) rename basic/sources/assembler/{common => }/label.asm (100%) rename basic/sources/assembler/{6502 => }/operands.asm (100%) delete mode 100644 basic/sources/assembler/sweet/opcodes.asm delete mode 100644 basic/sources/assembler/sweet/operands.asm delete mode 100644 basic/sources/commands/extras/sweet16.asm diff --git a/basic/scripts/tokens.py b/basic/scripts/tokens.py index 83705803b..0be8b6f2d 100644 --- a/basic/scripts/tokens.py +++ b/basic/scripts/tokens.py @@ -124,7 +124,7 @@ def create(self): LOAD CAT GOSUB GOTO RETURN RESTORE DIM FKEY CLS INK FRAME SOLID BY WHO PALETTE DRAW HIDE FLIP SOUND SFX ANCHOR GLOAD DEFCHR LEFT - RIGHT FORWARD TURTLE SWEET TILEMAP PENUP PENDOWN FAST + RIGHT FORWARD TURTLE !!UK0 TILEMAP PENUP PENDOWN FAST HOME LOCALE CURSOR RENUMBER DELETE EDIT MON OLD ON ERROR PIN OUTPUT WAIT IWRITE ANALOG ISEND SSEND IRECEIVE SRECEIVE ITRANSMIT STRANSMIT NEAL LIBRARY @@ -140,8 +140,6 @@ def create(self): PLX PLY ROL ROR RTI RTS SBC SEC SED SEI STA STX STY STZ TAX TAY TRB TSB TSX TXA TXS TYA - SET LD ST LDD STD POP STP ADD SUB POPD CPR INR DCR - RTN BR BNC BC BP BM BZ BNZ BM1 BNM1 BK RS BS BSL """,0x60) # # Additional Unary functions, less popular diff --git a/basic/sources/assembler/6502/assembler.asm b/basic/sources/assembler/assembler.asm similarity index 100% rename from basic/sources/assembler/6502/assembler.asm rename to basic/sources/assembler/assembler.asm diff --git a/basic/sources/assembler/common/aswrite.asm b/basic/sources/assembler/aswrite.asm similarity index 100% rename from basic/sources/assembler/common/aswrite.asm rename to basic/sources/assembler/aswrite.asm diff --git a/basic/sources/assembler/6502/constants.inc b/basic/sources/assembler/constants.inc similarity index 100% rename from basic/sources/assembler/6502/constants.inc rename to basic/sources/assembler/constants.inc diff --git a/basic/sources/assembler/6502/instruction.asm b/basic/sources/assembler/instruction.asm similarity index 100% rename from basic/sources/assembler/6502/instruction.asm rename to basic/sources/assembler/instruction.asm diff --git a/basic/sources/assembler/common/label.asm b/basic/sources/assembler/label.asm similarity index 100% rename from basic/sources/assembler/common/label.asm rename to basic/sources/assembler/label.asm diff --git a/basic/sources/assembler/6502/operands.asm b/basic/sources/assembler/operands.asm similarity index 100% rename from basic/sources/assembler/6502/operands.asm rename to basic/sources/assembler/operands.asm diff --git a/basic/sources/assembler/sweet/opcodes.asm b/basic/sources/assembler/sweet/opcodes.asm deleted file mode 100644 index 9c52a9631..000000000 --- a/basic/sources/assembler/sweet/opcodes.asm +++ /dev/null @@ -1,236 +0,0 @@ -; ************************************************************************************************ -; ************************************************************************************************ -; -; Name: opcodes.asm -; Purpose: Opcode handling code -; Created: 9th April 2024 -; Reviewed: No -; Author: Paul Robson (paul@robsons.org.uk) -; -; ************************************************************************************************ -; ************************************************************************************************ - - .section code - -; ************************************************************************************************ -; -; Support Macros -; -; ************************************************************************************************ - -; -; Single register operand -; -sweetreg .macro - jsr SweetAsmGetRegister - ora #\1 - jsr AssemblerWriteByte - .endm -; -; Single byte opcodes. -; -sweetopc .macro - lda #\1 - jsr AssemblerWriteByte - .endm -; -; Short branch like 65C02 -; -sweetbra .macro - lda #\1 - bra ShortBranchCommon - .endm -; -; Check @ follows. May soften ? -; -checkat .macro - lda #KWD_AT - jsr ERRCheckA - .endm - -; ************************************************************************************************ -; -; Standard dispatcher -; -; ************************************************************************************************ - -; ************************************************************************************************ -; SET n, -; ************************************************************************************************ - -SweetAsm_SET: ;; [SET] - .sweetreg $10 ; $10+x - jsr ERRCheckComma - ldx #0 - jsr EXPEvalInteger16 ; operand - lda XSNumber0,x ; output it - jsr AssemblerWriteByte - lda XSNumber1,x - jsr AssemblerWriteByte - rts - -; ************************************************************************************************ -; n -; ************************************************************************************************ - -SweetAsm_LD: ;; [LD] - jsr SweetAsmGetAltRegister - clc - adc #$20 - jsr AssemblerWriteByte - rts - -SweetAsm_ST: ;; [ST] - jsr SweetAsmGetAltRegister - clc - adc #$30 - jsr AssemblerWriteByte - rts - -SweetAsm_LDD: ;; [LDD] - .checkat - .sweetreg $60 - rts - -SweetAsm_STD: ;; [STD] - .checkat - .sweetreg $70 - rts - -SweetAsm_POP: ;; [POP] - .checkat - .sweetreg $80 - rts - -SweetAsm_STP: ;; [STP] - .checkat - .sweetreg $90 - rts - -SweetAsm_ADD: ;; [ADD] - .sweetreg $A0 - rts - -SweetAsm_SUB: ;; [SUB] - .sweetreg $B0 - rts - -SweetAsm_POPD: ;; [POPD] - .checkat - .sweetreg $C0 - rts - -SweetAsm_CPR: ;; [CPR] - .sweetreg $D0 - rts - -SweetAsm_INR: ;; [INR] - .sweetreg $E0 - rts - -SweetAsm_DCR: ;; [DCR] - .sweetreg $F0 - rts - -; ************************************************************************************************ -; No operand -; ************************************************************************************************ - -SweetAsm_RTN: ;; [RTN] - .sweetopc $00 - rts - -SweetAsm_RS: ;; [RS] - .sweetopc $0B - rts - - -; ************************************************************************************************ -; 8 bit relative branch -; ************************************************************************************************ - -SweetAsm_BR: ;; [BR] - .sweetbra $01 - -SweetAsm_BNC: ;; [BNC] - .sweetbra $02 - -SweetAsm_BC: ;; [BC] - .sweetbra $03 - -SweetAsm_BP: ;; [BP] - .sweetbra $04 - -SweetAsm_BM: ;; [BM] - .sweetbra $05 - -SweetAsm_BZ: ;; [BZ] - .sweetbra $06 - -SweetAsm_BNZ: ;; [BNZ] - .sweetbra $07 - -SweetAsm_BM1: ;; [BM1] - .sweetbra $08 - -SweetAsm_BNM1: ;; [BNM1] - .sweetbra $09 - -SweetAsm_BK: ;; [BK] - .sweetbra $0A - -SweetAsm_BS: ;; [BS] - .sweetbra $0C - -; -; Branch common -; -ShortBranchCommon: - jsr AssemblerWriteByte ; output opcode - ldx #0 ; target address - jsr EXPEvalInteger16 - jsr AssembleRelativeBranch ; use 65C02 code. - rts - -; ************************************************************************************************ -; 16 bit relative subroutine call (added) -; ************************************************************************************************ - -SweetAsm_BSL: ;; [BSL] - .sweetopc $0D ; subroutine call - - ldx #0 ; target address - jsr EXPEvalInteger16 - - sec ; calculate target - P - lda XSNumber0 - sbc VariableP - pha - lda XSNumber1 - sbc VariableP+1 - tax - pla ; in X:A - - sec ; sub 2, 2 further back to allow for operand. - sbc #2 - php - jsr AssemblerWriteByte ; low offset - plp - txa - sbc #0 - jsr AssemblerWriteByte ; high offset - - rts - - .send code - -; ************************************************************************************************ -; -; Changes and Updates -; -; ************************************************************************************************ -; -; Date Notes -; ==== ===== -; -; ************************************************************************************************ diff --git a/basic/sources/assembler/sweet/operands.asm b/basic/sources/assembler/sweet/operands.asm deleted file mode 100644 index f1e0171f3..000000000 --- a/basic/sources/assembler/sweet/operands.asm +++ /dev/null @@ -1,56 +0,0 @@ -; ************************************************************************************************ -; ************************************************************************************************ -; -; Name: operands.asm -; Purpose: Operands handling -; Created: 9th April 2024 -; Reviewed: No -; Author: Paul Robson (paul@robsons.org.uk) -; -; ************************************************************************************************ -; ************************************************************************************************ - - .section code - -; ************************************************************************************************ -; -; Get a single register to A -; -; ************************************************************************************************ - -SweetAsmGetRegister: - jsr EXPEvalInteger8 - cmp #16 - bcs _SAGRRange - rts -_SAGRRange: - .error_range - -; ************************************************************************************************ -; -; Get a single register to A n or @an -; -; ************************************************************************************************ - -SweetAsmGetAltRegister: - lda (codePtr),y ; check @x - cmp #KWD_AT - bne SweetAsmGetRegister ; just normal register - - iny ; consume @ - jsr SweetAsmGetRegister ; get register - ora #$20 ; indirect adjust - rts - - .send code - -; ************************************************************************************************ -; -; Changes and Updates -; -; ************************************************************************************************ -; -; Date Notes -; ==== ===== -; -; ************************************************************************************************ diff --git a/basic/sources/commands/extras/sweet16.asm b/basic/sources/commands/extras/sweet16.asm deleted file mode 100644 index 849933021..000000000 --- a/basic/sources/commands/extras/sweet16.asm +++ /dev/null @@ -1,64 +0,0 @@ -; ************************************************************************************************ -; ************************************************************************************************ -; -; Name: sweet16.asm -; Purpose: Execute Sweet 16 code. -; Created: 10th April 2024 -; Reviewed: No -; Author: Paul Robson (paul@robsons.org.uk) -; -; ************************************************************************************************ -; ************************************************************************************************ - -; ************************************************************************************************ -; -; SWEET Command -; -; ************************************************************************************************ - - .section code - -Command_SWEET: ;; [sweet] - ldx #0 ; register address. - jsr EXPEvalInteger16 - lda XSNumber0 ; copy register address to XA - ldx XSNumber1 - -_CSWExecute: - sta ControlParameters+0 ; set reg address parameters - stx ControlParameters+1 - pha ; save on stack - phx - DoSendMessage ; execute that code. - .byte 1,9 - DoWaitMessage - - lda ControlError ; reentrancy check ? - beq _CSWEnter - - plx ; throw register address - pla - rts - -_CSWEnter: - .byte $F3 ; this is right. It's an unused 1 byte 65c02 opcode - nop ; and it signals to the emulator to frame synchronise - nop ; the NOPs are for safety. On real hardware does nothing. - - plx ; restore XA - pla - bra _CSWExecute ; and restart. - - .send code - -; ************************************************************************************************ -; -; Changes and Updates -; -; ************************************************************************************************ -; -; Date Notes -; ==== ===== -; -; ************************************************************************************************ - diff --git a/examples/basic/examples/mixedassembler.bas b/examples/basic/examples/mixedassembler.bas index 993eaecdc6ae1c05eaf6c75b1d1d3f8ddb07d27c..e447083955f06b01f13947813393700de488c0ec 100644 GIT binary patch literal 897 zcmdsyziSg=7{|YlnA{r!BDzSYmqNEvPr=}r9Yj$cV+0YehO`tTA}-g#K^(-vLA}fSo_~Zl+~@n;_j5cvdklonONI9e zeT5GS!^B7_<-L8QU}vgZVw5Uds;bmBRjB5-Ra5LKR<~7A%=NTU)4`tWM_+Wv{Burs z^`<#n+m=00cA>08&Kjr{Sxvj6jBNRpE+Y2z>}h_C#3+S#w_Xg?ku`v1OS zXW{YKMR->aW!i1$!a~z&$;+I{ky-u@Hymt!fwb%gl{3A5PpX268?mIM8trqFCT3Q%SqvTCqDs*i%$<#5Zt|v!nc9qEme?eg)8o6Xuc9F_ zSgyfjFd4*qO~3qyb6VEQ13M_?R*!ba(P`(}sa{wZINh-L=EO?3nx?c5r_K`X%Sp@h zKUswp`VmN>PCp8rhBEyabQWglC!q5%OFs!+ggM$2bXlP#(A7MB4Z03B+8WfY(i%{2 zfwm6y7wI=Qpj$Uh--PZmZ40k4x1sy!9`q1BfCkY+=rMW>Jw*jQNBht)I)wiB@6m+z QncXEUd_()p|Kf!14`GXMy#N3J diff --git a/release/Makefile b/release/Makefile index 1e73222cc..1f371a5d1 100644 --- a/release/Makefile +++ b/release/Makefile @@ -38,7 +38,7 @@ BINARIES = $(BINDIR)*.uf2 $(BINDIR)*.elf \ # PYTHONAPPS = $(BINDIR)makebasic.zip $(BINDIR)listbasic.zip $(BINDIR)exec.zip \ $(BINDIR)createblanks.zip $(BINDIR)makeimg.zip $(BINDIR)cvimg.zip \ - $(BINDIR)nxmit.zip $(BINDIR)swasm.zip + $(BINDIR)nxmit.zip # *************************************************************************************** #