- 03 May, 2021 1 commit
-
-
Robert Sprowson authored
The A1 encoding uses op=1 for add & op=0 for sub (opposite to VFMA and VFMS, of course). Version 1.82. Tagged as 'BASIC-1_82'
-
- 26 Sep, 2020 1 commit
-
-
Robert Sprowson authored
The help for the two forms of POINT both pointed to the same message, so POINT( was wrong. Version 1.81. Tagged as 'BASIC-1_81'
-
- 02 Apr, 2020 4 commits
-
-
Jeffrey Lee authored
Where an instruction/encoding only allows a zero value, matching against the assembly line is performed by looking for an actual "#0" character sequence. This means that, unlike other locations where literals are parsed, it's impossible to use a variable, function, or any other kind of expression to provide the value. Change the assembler to detect when a "#0" sequence is being looked for, and use the numeric expression parser instead. This will make it much easier to use the zero-shift synonym instructions, since it's common for programs to use expressions to specify/calculate shift amounts (which may evaluate to zero in some circumstances) Version 1.80. Tagged as 'BASIC-1_80'
-
Jeffrey Lee authored
The ARM ARM lists several NEON shift instructions which have special-case synonyms for shifts of zero. Improve the assembler to support them (instead of throwing a "bad shift" error): * VQRSHRN x,y,#0 -> VQMOVN x,y * VQRSHRUN x,y,#0 -> VQMOVUN x,y * VRSHR x,y,#0 -> VMOV x,y * VRSHRN x,y,#0 -> VMOVN x,y * VSHR x,y,#0 -> VMOV x,y * VSHRN x,y,#0 -> VMOVN x,y
-
Jeffrey Lee authored
Give the file a unique name in ResourceFS, so that we don't hide/replace a version of the file that's being used by a different BASIC version/configuration.
-
Jeffrey Lee authored
There's no valid instruction encoding for these. Instead, assemblers are expected to treat them as synonyms for VTRN.32 and use that encoding instead. Fix BASIC to do this, and add a couple of examples to TestVFP.
-
- 29 Feb, 2020 1 commit
-
-
Jeffrey Lee authored
Incorrect stack offsets caused multi-parameter messages to use the wrong parameter values, e.g. "HELP" reporting incorrect program size and free memory values. Version 1.79. Tagged as 'BASIC-1_79'
-
- 17 Dec, 2019 1 commit
-
-
Kevin Swinton authored
Minor fix to prevent an ACS token from being mistaken for another WHILE token, whilst in an existing WHILE construct. Fixes ticket #465. Version 1.78. Tagged as 'BASIC-1_78'
-
- 08 Jun, 2019 1 commit
-
-
Robert Sprowson authored
ARM have added SETPAN, ESB, TSB, CSDB, PSSBB, SSBB since the earlier ARM ARM that BASIC covered. Add these. Raise the limit of 16 on the table that decodes 'pure' 3 character opcodes (+condition) in CASMTB2 since the offset into the jump table can be inferred from the offset into the opcode table (both are 1 word/entry), so removing the 4 bit limit. Move SMC/SMI/SVC into CASMTB2. Help updated in CmdHelp. Version 1.77. Tagged as 'BASIC-1_77'
-
- 05 Jan, 2019 1 commit
-
-
ROOL authored
Detail: BASIC 1.75 switched to syncing the range { old P% - new P% } at the end of assembly instead of all memory. However, this didn't take into account offset assembly in the rare case where the offset assembled code was then run directory (the sources to FSLock-1_22 and earlier were susceptible). Fix by storing both old P% and O% at the start of assembly and choose the appropriate range based on the OPT value. ADR's to CASMTB3 extended to account for larger routine. Admin: Submission from Timothy Baldwin. Version 1.76. Tagged as 'BASIC-1_76'
-
- 12 Apr, 2018 1 commit
-
-
Ben Avison authored
-
- 03 Mar, 2018 1 commit
-
-
Jeffrey Lee authored
Detail: s/Assembler - Have the inline assembler keep track of the original P% value, so the OS_SynchroniseCodeAreas call that's made on exit can be a ranged op instead of a global one Admin: Tested on iMX6 Resolves some performance issues with SMP ROM, where global OS_SynchroniseCodeAreas actually does a ranged clean of RMA + AppSpace due to lack of global D-cache clean Version 1.75. Tagged as 'BASIC-1_75'
-
- 25 Feb, 2018 1 commit
-
-
Jeffrey Lee authored
Detail: - Makefile - Add hdr.VFPMacros as a dependency of VFPData - Tests/VFP/TestVFP,ffb - Add some assembly tests for the new instructions - VFPLib/VFPLib - Remove some non-standard patterns ('D' and 'F' used as data type specifiers). Add the ARMv8 (AArch32) VFP/NEON instructions, and VFPv3 half-precision VCVTB/VCVTT - hdr/VFPMacros - Save a few KB of ROM space by changing some tables to use halfword elements instead of words - s/VFP - Add VFP_LDRH macro to deal with the compressed tables. Fix VMRS of MVFRn registers (erroneously attempted to convert the digit to upper-case), and add MVFR2 Admin: Tested on Raspberry Pi 3 Version 1.74. Tagged as 'BASIC-1_74'
-
- 18 Sep, 2017 2 commits
-
-
Jeffrey Lee authored
Detail: s/ErrorMsgs - Give the VFP "invalid operation" error a more useful error number, and correct the embedded text to match what's in the Resources file. Add VFPExcetion_SQRT, to allow "negative root" errors to be generated by FSQRTD error checks. hdr/Definitions - Update FPSCRCheck macro to allow alternate error handlers to be specified s/Array, s/Factor - Update FSQRTD error checks to use VFPException_SQRT, so that they say "negative root" instead of "invalid operation" Admin: Tested on Raspberry Pi Version 1.73. Tagged as 'BASIC-1_73'
-
Robert Sprowson authored
Bad MODE is ERR=25 on the BBC Micro, follow suit here, and correct the message file token number (should be 13 to match earlier reorganisation). Version 1.72. Not tagged
-
- 07 Sep, 2017 1 commit
-
-
Robert Sprowson authored
Have BASIC V pick either BASICVFP or BASIC VI as appropriate for the current CPU, so if there's VFP hardware don't emulate everything as FPA opcodes. The BASIC64 command (moved to BASIC V) will now automatically RMEnsure then enter the respective module. If there's something depending on the internal workings of BASIC VI and wishes to explicitly select that even when VFP is present a new command, *BASICFPA, forces BASIC VI to start. By having BASIC V manage this selection we in effect remove the requirement to remember to RMEnsure the floating point version, which is usually either forgotten about or wrong anyway. Compatibility wise RISC OS 5 includes all 3 variants (2 if no VFP) and will adopt the new logic. Existing RISC OS 5 stable releases have always included BASIC V and VI, so will work as before (through emulating FPA). Soft loaded modules inside !System will be handled by a disc based update. Changed files CmdHelp: adds the new BASIC64 help/syntax message Basic.s: qualify the FPA version in it's startup banner ModHead.s: add the new selection logic, and move the 'VFP' help to be a suffix so the module names line up nicely in *Modules again Tested in both ROM and disc based guises on ARMs with and without VFP hardware. Version 1.72. Tagged as 'BASIC-1_72'
-
- 27 Jul, 2017 1 commit
-
-
Robert Sprowson authored
The TWIN & TWINO commands were changed to cause 'Mistake' in BASIC 1.54, but because we retain the tokens in the token table (so that programs which include the tokens can still be read) they still appeared in response to HELP. Notch then out of the HELP. In removing the HTWIN and HTWINO tokenised HELP lookup this revealed that the end of table marker was wrong and BASIC kept scanning until it fell off the end of memory - the code expects a terminator of 127. In fixing that it turned out that in BASIC 1.23 the token for 'HELPTOKENNO' was accidentally turned into an error message, and subsequently into token 'E13', when in fact it's only ever looked up as text (not an error). Put this back as string shorter 'HHELPNO' and use the slot for E13 for the new 'Bad MODE' error from BASIC 1.70; delete HTWIN and HTWINO. Version 1.71. Tagged as 'BASIC-1_71'
-
- 22 Jul, 2017 1 commit
-
-
Jeffrey Lee authored
Detail: 1. MODE <string> now uses OS_ScreenMode 15 rather than *WimpMode, to avoid programs which use it (likely unintentionally) altering the Wimp mode or having to worry about preserving it 2. If OS_ScreenMode 15 isn't supported, use our own mode string parsing code that provides a similar level of functionality to the host system's *WimpMode 3. For all MODE variants which use OS_ScreenMode, detect any "SWI not known" error and replace it with "Bad MODE" (under the assumption the user is running pre-OS 3.5) 4. Add a new variant, MODE <x>,<y>,<modeflags>,<ncolour>,<log2bpp>[,<hz>] to allow specification of the three parameters necessary for selecting the new screen modes introduced by RISC OS Select/5 Files: Resources/UK/CmdHelp, Resources/UK/Messages, s/ErrorMsgs, s/ModHead, s/Stmt2 Admin: Tested on RISC OS 3.1, 3.7, and latest 5.23 Version 1.70. Tagged as 'BASIC-1_70'
-
- 21 Jul, 2017 2 commits
-
-
Robert Sprowson authored
SRS changed to accept R13 as a synonym for SP. Fix stack imbalance in CHKCOPRO, CHKREG1 expected R14 & R1 to be stacked but only R1 was, so a copro number not starting CP CDP 5,0,C1,C2,C3 for example led to a abort on instruction fetch when returning from CHKREG. The syntax help for STC and LDC was missing the <cpreg> source/dest register. Fix for LDREXH & STREXH rejecting odd numbered Rt. The check for -EXD was only looking at 1 of the 2 size bits in the output instruction, so -EX and -EXB allowed odd Rt, but -EXH inherited the checks intended for only -EXD. ARMv8: Added ISHLD/NSHLD/OSHLD/LD options to DMB & DSB; HLT #imm16; SEVL; CRC32; LDA[B|H]; LDAEX[B|H|D], STL[B|H]; STLEX[B|H|D]. This completes the review of all the opcodes (see also BASIC-1_63). Tests/ARMv6v7/TestARMv8 has samples of the new opcodes in action. Version 1.69. Tagged as 'BASIC-1_69'
-
Robert Sprowson authored
Swapped IntVectorVectorOp order of $op registers to avoid Rd=Rm being unpredictable for MUL.
-
- 13 Jun, 2017 3 commits
-
-
Robert Sprowson authored
Earlier versions of the VFP assembler extensions cooked up VDPL as a way to dodge the problem of opcode VDUP being tokenised as VDUPRINT when used in its scalar or unconditional form (ie. VDUP.<size> <regs>). This can be handled with an exception in the tokeniser in a similar manner to MOVEQ and ORR in the conventional ARM instruction set. VFPLib: change the tables to use VDUP rather than VDPL. Lexical.s: watch out for specifically VDUP. and tokenise it as VDU followed by a P in memory. Assembler.s: watch out for token VDU followed by a P and take it to be VDUP. VFP.s: when matching, allow the token for VDU to expand as though VDU was seen, also, add support for backslash and REM comments (previously only semicolon was allowed). Tests/VFP/TestVFP: update the test case and 3 other failing tests from earlier fixes. Tests/Match/TokVDUP: brute force trial of all combinations of VDU and PRINT, to check only VDUP. is caught. Version 1.68. Tagged as ...
-
Robert Sprowson authored
Use uppercasing macros from Hdr:Macros rather than local copies. Use OS_NewLine instead of OS_WriteC 13+OS_WriteC 10. Simplify VFPGet4Char by rolling the loop the other way.
-
Robert Sprowson authored
Run through AsmTidy to make it more readable, aligned to columns 9 & 17. Builds the same binary, not tested.
-
- 03 Jun, 2017 1 commit
-
-
Jeffrey Lee authored
Detail: See Doc/BASICVFP for overall design/specification File changes: - !Mk,fd7, !MkClean,fd7, !MkRom,fd7, Makefile - update build scripts to support BASICVFP target - Resources/UK/Messages - Add a few new messages - hdr/Definitions - Define BASICVFP register usage and a few utility macros - hdr/WorkSpace - Define BASICVFP workspace adjustments. Add a few asserts to check some workspace constraints are maintained. - s/* - Lots of changes to add support for BASICVFP variant of the module Admin: Tested on Raspberry Pi 1/2/3, BB-xM Version 1.67. Tagged as 'BASIC-1_67'
-
- 13 Apr, 2017 1 commit
-
-
Jeffrey Lee authored
Detail: The BASIC64 number formatting code was found to be significantly different to the BASIC105 formatting code, and a potential source of compatibility issues due to the various bugs and quirks it seemed to contain To resolve this, the BASIC105 number formatting code has been resurrected and adapted to allow it to be used by both BASIC105 and BASIC64 The formatting code still uses BCD internally, so accuracy will be the same as BASIC 1.65. It's just the formatting discrepancies (for both BASIC versions) which will have been affected. MAXDIGS has also been revised again; the +2 is no longer required (was a BASIC64 quirk), so BASIC105 is down to 11 (up from 10 in pre-1.65 versions) and BASIC64 has reverted to the historic value of 18 (which is technically one more than necessary) File changes: s/fp2 - Updated as described above Tests/Math/AtPercent,ffb - New test program which compares the E/F/G number formatting code against a (BASIC105-style) reference model for the number formatting implemented in BASIC Admin: Tested on Raspberry Pi Fixes issue reported on forums: https://www.riscosopen.org/forum/forums/4/topics/9199 Version 1.66. Tagged as 'BASIC-1_66'
-
- 30 Mar, 2017 1 commit
-
-
Jeffrey Lee authored
Detail: This change rewrites the BASIC105 version of the FCONA routine so that it converts the value to FPA packed decimal format, with ~16 decimal digits of accuracy. To avoid adding an FPA dependency to BASIC105 this is done via a new, custom routine. Apart from improving the accuracy of the result, converting to packed decimal allows the rest of the function body to be shared with the BASIC64 variant of the routine. File changes: s/fp2 - Updated as above. New FACCtoBCD function added to perform the BCD/packed decimal conversion. MAXDIGS for BASIC105 increased to 11+2. Minor FRDFPEXPBIN optimisation. Admin: Tested on BB-xM Although the new FCONA implementation is known not to be fully accurate, testing with Test.Math.Decimal shows a marked improvement over the previous implementation, with ~100m random float -> string -> float conversions being performed without any loss of accuracy Version 1.65. Tagged as 'BASIC-1_65'
-
- 20 Mar, 2017 1 commit
-
-
Jeffrey Lee authored
Detail: Tests/CALL,ffb: - Make compatible with (at least) RISC OS 3.1, for checking behaviour of old BASICs - Allow checking for stack usage - Mark fewer FPA registers as clobbered, to match the registers BASIC actually uses - Implement tests for the untested CALL routines Admin: Tested against current BASIC/BASIC64 and BASIC/BASIC64 1.05 Version 1.64. Retagged as 'BASIC-1_64'
-
- 04 Mar, 2017 1 commit
-
-
Jeffrey Lee authored
Detail: s/Expr - Clean up some confusing code relating to l-value address offsets in LOOKU5. The old code looked like it contained a bug for BASIC64 (two TEQs back-to-back), but the situations LOOKU5 is called in meant it was fine and the TEQs were actually unnecessary. s/HelpMsgs - Fix MSGPRNXXX and friends corrupting R1. Was causing LVAR to crash/malfunction when listing functions/procedures. s/Stmt2 - Fix rotated ellipses being completely broken in BASIC64. Looks like this has been broken forever (bug appears to be present in BASIC64 1.05, as supplied with RISC OS 3) s/fp2 - Increase MAXDIGS by one for BASIC64, to allow for accurate float -> string conversion for numbers of the form 0.0XXXX when using G format. s/fp2 - Rewrite BASIC64's string -> float conversion code. Although the old code was believed to be sufficiently accurate, excessive use of FPA instructions made it rather slow, and a poor fit for any future VFP version of BASIC (the code relied on extended precision for accuracy, which VFP lacks). The new version converts to packed decimal and then relies on FPEmulator to perform the decimal -> float conversion via LDFP (to mirror float -> string conversion via STFP). The reduction in FP instructions makes it many times faster than the original ("Decimal" test runs 5x faster) Tests/CALL,ffb, Tests/Math/Array,ffb, Tests/Math/Decimal,ffb, Tests/Math/ELLIPSE,ffb - Add a handful of new test programs. Admin: Tested on BB-xM Version 1.64. Tagged as 'BASIC-1_64'
-
- 25 Jan, 2017 1 commit
-
-
Robert Sprowson authored
The 'S' of SP was being picked up by CHKPSR as a possible match for SPSR, and setting bit 22 of the output opcode. For banked MRS and MSR this turned MRS R9,SP_hyp into MRS R9,SPSR_hyp MSR SP_hyp,R1 into MSR SPSR_hyp,R1 rather than change CHKPSR to set bit 22 only when it was sure a PSR was seen, just clear the bit for the banked register case. Updated TestARMv6v7 to fewer mismatches, and eyeballed the remaining as being presentational only, rather than wrong encoding. Retagged as BASIC-1_63.
-
- 24 Jan, 2017 1 commit
-
-
Robert Sprowson authored
Review of opcodes of the form OP<c> {#}imm this summarises the ones the BASIC assembler accepts: SVC #imm, SVC imm, SWI imm (Debugger emits SWI imm) DBG #imm, DGB imm (Debugger emits DBG imm) SMC #imm, SMC imm, SMI imm (Debugger emits SMI imm) HVC #imm, HVC imm (Debugger emits HVC imm) BKPT #imm, BKPT imm (Debugger emits BKPT imm) Assembler.s: Add SMI as a synonym for SMC. CmdHelp: Add all the missing v6/v7 opcodes to the help. HelpMsgs.s: Split the terse yet huge assembler help (HELP [) into 3 to avoid needing 4k of stack just for the message token lookup. Version 1.63. Tagged as 'BASIC-1_63'
-
- 30 May, 2016 1 commit
-
-
Robert Sprowson authored
For standalone builds wanting VFP assembler support, a dependency is needed on VFPData since there's no preceding resources phase. This dependency got trimmed in error in revision 4.19 of this file. Retagged as BASIC-1_62.
-
- 29 May, 2016 1 commit
-
-
Robert Sprowson authored
Requires BuildSys-6_91. Retagged as BASIC-1_62.
-
- 28 May, 2016 1 commit
-
-
Jeffrey Lee authored
Detail: s/Basic - Fix error generation for unknown keywords on the command line; MSGPRNXXX is a function, not a SWI s/HelpMsgs - Take account of the fact that under RISC OS 3.1 MsgTrans doesn't support tokenised messages, and so the [1B][01] control codes being used for inserting newlines will be left in place in the message output. Passing the message on to OS_PrettyPrint allows the tokens to be expanded, but only if we pass a sensible dictionary pointer (Old code was passing in the message pointer as the dictionary pointer, resulting in recursive expansion of the message and an eventual stack overflow) Admin: Tested PlingSystem build on RISC OS 3.1 Version 1.62. Tagged as 'BASIC-1_62'
-
- 01 Aug, 2015 1 commit
-
-
Jeffrey Lee authored
Detail: VFPLib/VFPLib - Add support for VNMLA, VNMLS, VNMUL to the assembler, which seem to have been accidentally missed from earlier versions of the code Admin: Tested on Pandaboard Fixes issue reported on forums: https://www.riscosopen.org/forum/forums/2/topics/3457?page=1#posts-45090 Version 1.61. Tagged as 'BASIC-1_61'
-
- 14 Apr, 2015 1 commit
-
-
Adrian Lees authored
Implemented scalar (non-VFP/NEON) instructions for ARMv6/v7 and a couple of omitted ARMv5 instructions in UAL syntax. Added documentary comments and minor performance tweaks to some existing code. Corrected stack imbalance in handling of memory moving when local DIMs in use. Preliminary test code for assembler instructions. Version 1.60. Tagged as 'BASIC-1_60'
-
- 06 Jan, 2015 1 commit
-
-
Jeffrey Lee authored
Detail: Makefile - Split the VFPData rule into two parts so that it's clear where s.VFPData comes from. Fixes amu throwing 'Don't know how to make ...' errors when doing repeated builds of PlingSystem. Admin: Tested with PlingSystem build Version 1.59. Retagged as 'BASIC-1_59'
-
- 24 Sep, 2014 1 commit
-
-
Ben Avison authored
Detail: * Changed file paths to forms that also work when cross-compiling * Changed case of filenames so they match on case-sensitive filing systems * Makefile needs to use leading tabs * Escaped the '$' in 'BASIC$Crunch' (squashes a warning in new version of objasm - unrelated to cross-compilation) Admin: Cross-compiles OK with Norcroft tools, though asasm can't stomach the expressions BASIC uses. Checked it still builds with RISC OS Norcroft. Version 1.59. Not tagged
-
- 02 Jun, 2014 1 commit
-
-
Robert Sprowson authored
Assembler.s revision 1.18 had a slight flaw in assembling LDR Rn,[R1] (or LDMIA Rn,{R1}) would report a bad register because the closing bracket matched the test of being greater than '5' and so skipped the thorough check. So LDR Rn,[R1 ] was OK. Now, do a more thorough check to determine if the character following could be part of a variable name. Version 1.59. Not tagged
-
- 01 Jun, 2014 2 commits
-
-
Robert Sprowson authored
Lexical.s: Rework previous fixes (revision 1.5 and revision 1.4) for BPUT#TRACE,<number> confusing the MATCH routine. While revision 1.5 was better it failed to tokenise IF <expr> GOTO 1234 when the THEN is omitted. A review of all the keywords shows the only ones that take tokenisable line numbers are TRACE, RESTORE, ON, GOTO, GOSUB and of these only TRACE can be used in a function like manner. So, only apply the fix from revision 1.5 if it's a TRACE token. Fix from Martin Avison, fixes ticket #387. Added a test case in Tests/Match/TokTrace to assist. Assembler.s: Only consider SP or LR or PC to be referring to a register name if used in isolation (not as a substring of another word). While LR and PC aren't particularly common start of words in english, SP is, causing source code with such names to give a "Missing ," error. We adopt the same logic as for invalid 'R' named variables (eg. r17foo, r9bar) and attempt to find a variable with that name instead. Fixes ticket #386. Version 1.59. Tagged as 'BASIC-1_59'
-
Robert Sprowson authored
Submission from Martin Avison. Not tagged.
-