vbasic
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
vbasic [2020/09/04 03:20] – [Introduction] silverdr | vbasic [2022/11/24 09:40] (current) – [DLOFF] silverdr | ||
---|---|---|---|
Line 11: | Line 11: | ||
Summing up - you will appreciate VBASIC for: | Summing up - you will appreciate VBASIC for: | ||
+ | * all the additions aimed at helping in low-level programming | ||
* fast-turnaround, | * fast-turnaround, | ||
* immediate full access to VASYL' | * immediate full access to VASYL' | ||
Line 24: | Line 25: | ||
====== Initialisation ====== | ====== Initialisation ====== | ||
- | As part of initialisation process VBASIC installs itself in the RAM area, address of which is normally occupied by BASIC ROM code, and adds additional routines at the very top of memory available for BASIC programs. It also verifies the presence of an installed BeamRacer card and activates it if found. Thanks to that your programs do not need to perform any additional steps to check and activate BeamRacer. Last but not least it adds helper routines and modifies several system variables and vectors | + | As part of initialisation process VBASIC installs itself in the RAM area, address of which is normally occupied by BASIC ROM code, and adds additional routines at the very top of memory available for BASIC programs. It also verifies the presence of an installed BeamRacer card and activates it if found. Thanks to that your programs do not need to perform any additional steps to check and activate BeamRacer. Last but not least it adds helper routines and modifies several system variables and vectors. This allows |
====== Features ====== | ====== Features ====== | ||
Line 95: | Line 96: | ||
PRINT 256& | PRINT 256& | ||
PRINT 53248& | PRINT 53248& | ||
+ | PRINT 16777215& | ||
</ | </ | ||
- | the most appropriate one will be chosen automatically | + | the most appropriate one will be chosen automatically. Values up to 32-bit long are supported. |
===== 16-bit PEEKs and POKEs ===== | ===== 16-bit PEEKs and POKEs ===== | ||
Line 173: | Line 175: | ||
which configures | which configures | ||
- | * PORT #0 | + | * Conveyor #0 (connected to VASYL PORT #0) |
* to point to VASYL memory address 0 ($0000) | * to point to VASYL memory address 0 ($0000) | ||
* with the default step of 1 | * with the default step of 1 | ||
Line 237: | Line 239: | ||
PRINT BL&W : REM PRINT IT AS 16-BIT HEXADECIMAL NUMBER | PRINT BL&W : REM PRINT IT AS 16-BIT HEXADECIMAL NUMBER | ||
- | ==== VPEEK ==== | + | ==== HI ==== |
- | FUNCTION: Returns | + | FUNCTION: Returns |
- | __Synopsis__: | + | __Synopsis__: |
- | __Examples__: | + | Where <VALUE> is a number |
- | PRINT VPEEK($100) | + | |
- | + | ||
- | ==== VDPEEK ==== | + | |
- | FUNCTION: Returns " | + | |
- | + | ||
- | __Synopsis__: '' | + | |
__Examples__: | __Examples__: | ||
- | PRINT VDPEEK($100)&W | + | PRINT HI(53281)&B |
==== LO ==== | ==== LO ==== | ||
Line 263: | Line 259: | ||
PRINT LO(53280)& | PRINT LO(53280)& | ||
- | ==== HI ==== | + | ==== VDPEEK |
- | FUNCTION: Returns "HI" | + | FUNCTION: Returns "double peek" |
- | __Synopsis__: | + | __Synopsis__: |
- | Where <VALUE> is a number | + | __Examples__: |
+ | PRINT VDPEEK($100)& | ||
+ | |||
+ | ==== VPEEK ==== | ||
+ | FUNCTION: Returns 8-bit value from <ADDRESS> in currently selected bank of VASYL memory | ||
+ | |||
+ | __Synopsis__: '' | ||
__Examples__: | __Examples__: | ||
- | PRINT HI(53281)&B | + | PRINT VPEEK($100) |
===== Statements only ===== | ===== Statements only ===== | ||
Line 318: | Line 320: | ||
__Examples__: | __Examples__: | ||
- | 100 DLOFF : REM TURN DISPLAULIST | + | 100 DLOFF : REM TURN DISPLAYLIST |
==== DLON ==== | ==== DLON ==== | ||
Line 552: | Line 554: | ||
__Synopsis__: | __Synopsis__: | ||
- | Where <NUM> can be 0, 1, 2 meaning | + | Where <NUM> can be 0, 1, 2, 3 meaning |
* 0 - BeamRacer inactive | * 0 - BeamRacer inactive | ||
* 1 - BeamRacer active but RUN/ | * 1 - BeamRacer active but RUN/ | ||
* 2 - BeamRacer active and automatically reactivated after every RUN/ | * 2 - BeamRacer active and automatically reactivated after every RUN/ | ||
+ | * 3 - Disable VBASIC without changing BeamRacer status (VBASIC V1.2 and higher) | ||
__Examples__: | __Examples__: | ||
Line 588: | Line 591: | ||
STATEMENT: Assembles [[: | STATEMENT: Assembles [[: | ||
- | __Synopsis__: | + | __Synopsis__: |
* RASTERLINES is a 3-bit integer number in the range 0..7 | * RASTERLINES is a 3-bit integer number in the range 0..7 | ||
Line 602: | Line 605: | ||
A = VBADLINE(3) : REM ASSEMBLE AND ASSIGN THE RESULT TO A VARIABLE | A = VBADLINE(3) : REM ASSEMBLE AND ASSIGN THE RESULT TO A VARIABLE | ||
+ | __Discussion__: | ||
==== VBRA ==== | ==== VBRA ==== | ||
---- | ---- | ||
- | DISPLAYLIST: | + | DISPLAYLIST: |
- | STATEMENT: Assembles [[: | + | STATEMENT: Assembles [[: |
- | __Synopsis__: | + | __Synopsis__: |
+ | * ADDRESS is a memory address within the -128..127 range from the current one | ||
* OFFSET is an 8-bit signed number from range -128..127 | * OFFSET is an 8-bit signed number from range -128..127 | ||
Line 621: | Line 626: | ||
999 VEND | 999 VEND | ||
</ | </ | ||
- | FUNCTION: TBD | ||
+ | <code basic [highlight_lines_extra=" | ||
+ | [...] | ||
+ | 200 VBRA 100 : REM CONTINUE AT ADDRESS $64 | ||
+ | 999 VEND | ||
+ | </ | ||
+ | <code basic [highlight_lines_extra=" | ||
+ | [...] | ||
+ | 200 VBRA *-2 : REM INFINITE LOOP | ||
+ | 999 VEND | ||
+ | </ | ||
+ | FUNCTION: Returns assembled [[: | ||
+ | |||
+ | __Synopsis__: | ||
+ | |||
+ | __Examples__: | ||
+ | A = VBRA(*+10): REM ASSEMBLE AND ASSIGN THE RESULT TO A VARIABLE | ||
+ | | ||
+ | __Discussion__: | ||
==== VDECA ==== | ==== VDECA ==== | ||
---- | ---- | ||
Line 637: | Line 659: | ||
110 VWAIT $33,0 : REM WAIT FOR FIRST PAPER LINE | 110 VWAIT $33,0 : REM WAIT FOR FIRST PAPER LINE | ||
120 VSETA 12 : REM TWELVE TIMES | 120 VSETA 12 : REM TWELVE TIMES | ||
- | 130 VLABEL | + | 130 LABEL A% |
140 VMOV $21, 14 : REM LIGHT BLUE | 140 VMOV $21, 14 : REM LIGHT BLUE | ||
150 VDELAYV 8 : REM DELAY EIGHT RASTERLINES | 150 VDELAYV 8 : REM DELAY EIGHT RASTERLINES |
vbasic.1599214848.txt.gz · Last modified: 2020/09/04 03:20 by silverdr