Until someone comes along and does an ML module for this or Oval is implemented in ROM.
This is as good as it gets.
Implementation of Breshenham Circle Algorithm in Basic. Heavily modified at the cost of a little speed to do Clipping (Can draw a circle thats only partially on screen). Ovals (Using XSquish & YSquish modifiers), Can do filled or open Circles. and by Modifiying Q1,Q2,Q3,Q4 variables prior to calling Partial Circles and limited Arcs can be drawn.
(Its not a TRUE Arc algorithm. But by playing with XSquish & YSquish and the Q variables, I've been able to do anything I've needed to draw)
Line Numbered and BASLOAD version in the archive.
The Line Numbered version is also a little example program. The BASLOAD version is just the Routine.
Heres the code.
An additional Example program. Draws a Smiley Face Calling only BCircle
CIRCLE/OVAL in BASIC
Re: CIRCLE/OVAL in BASIC
Hi good afternoon.
What kind of basic is this written with?
the basic has no line numbers?
Thanks.
greeting
What kind of basic is this written with?
the basic has no line numbers?
Thanks.
greeting
Re: CIRCLE/OVAL in BASIC
There is a program for the X16 called BASLOAD. This program will take text files that do not use line numbers, and can use long variable names, and will convert it into a proper CBM BASIC 2.0 (with X16 extensions) program. The resulting program will have line numbers, and will also make use of those line numbers in place labeled entry points for GOTO and GOSUB statements. Also, all of the variable names will be converted into the standard variable name format, which is only two characters.
Re: CIRCLE/OVAL in BASIC
hello thanks for info.
Where is the executable basload program please?
greeting
Where is the executable basload program please?
greeting
- ahenry3068
- Posts: 1134
- Joined: Tue Apr 04, 2023 9:57 pm
Re: CIRCLE/OVAL in BASIC
There are two versions of BASLOAD. One resides in RAM. That version is here viewtopic.php?t=6322
The other version resides in ROM and is available in the latest pre-release ROM. (You have to download and compile it from github).
https://github.com/X16Community/x16-rom
The RAM version works but I'm using the ROM version for my code which is required for some more advanced features (Long variable
names).
Re: CIRCLE/OVAL in BASIC
According to another post, the variable names are still reduced to two characters at execution, which would make such a feature meaningless.ahenry3068 wrote: ↑Fri Mar 01, 2024 10:12 pm The RAM version works but I'm using the ROM version for my code which is required for some more advanced features (Long variable names).
- ahenry3068
- Posts: 1134
- Joined: Tue Apr 04, 2023 9:57 pm
Re: CIRCLE/OVAL in BASIC
This is true in the Ram version. In the ROM version ALL variables are remapped in the tokenized code and Long Variable names are kept unique even though they are reduced to 2 chars when Tokenized. Believe me it is very usefulmortarm wrote: ↑Sat Mar 02, 2024 2:21 pmAccording to another post, the variable names are still reduced to two characters at execution, which would make such a feature meaningless.ahenry3068 wrote: ↑Fri Mar 01, 2024 10:12 pm The RAM version works but I'm using the ROM version for my code which is required for some more advanced features (Long variable names).
Re: CIRCLE/OVAL in BASIC
As long as the names remain unique, I agree. I wasn't aware of any distinction between the two versions.
- ahenry3068
- Posts: 1134
- Joined: Tue Apr 04, 2023 9:57 pm
Re: CIRCLE/OVAL in BASIC
If you are doing any BASIC development I strongly recommend downloading and using the Pre R47 ROM. I've been using it almost exclusively for quite some time. It's also what the Production boards are currently shipping with. To use the ROM version its a very simple matter of BASLOAD "MYSOURCE.BAS" in immediate mode.
Very good documentation also.
Re: CIRCLE/OVAL in BASIC
What's wrong with the R47 ROM?ahenry3068 wrote: ↑Sun Mar 03, 2024 4:40 am I strongly recommend downloading and using the Pre R47 ROM.