Search found 352 matches
- Wed Feb 16, 2022 2:00 am
- Forum: Collecting and History
- Topic: ViCalc
- Replies: 9
- Views: 4504
Re: ViCalc
I have looked into ViCalc. Its slowness is more due to the way the screen is handled (cursor movement), than to the length of the program (it is a little bit less than 100 lines). Performance improvements could be done by changing 'IF <cond1> AND <cond2>' into 'IF <cond1> THEN IF <cond2>' constructs...
- Fri Jan 28, 2022 2:23 am
- Forum: Programming
- Topic: Screen values vs PETSCII
- Replies: 11
- Views: 994
Re: Screen values vs PETSCII
Update: I understand why the mismatches might not matter, though. My test program goes strictly "by the book" (The VIC-20 user manual). If you can't type a character on the keyboard, does it even matter? Maybe, maybe not. For my application, I'd rather convert everything, because I can th...
- Thu Jan 27, 2022 5:47 am
- Forum: Programming
- Topic: Screen values vs PETSCII
- Replies: 11
- Views: 994
Re: Screen values vs PETSCII
This does the trick:
Code: Select all
BIT exit
BEQ ctrlchr
CMP #$FF
BEQ ispi
AND #$BF
BPL exit
EOR #$C0
.BYTE $2C
ispi LDA #$5E
exit RTS
- Mon Jan 17, 2022 6:27 am
- Forum: Programming
- Topic: 9-color Block Graphics BASIC Extension for Unexpanded VIC 20
- Replies: 9
- Views: 1071
Re: 9-color Block Graphics BASIC Extension for Unexpanded VIC 20
WimBasic is still at your disposal. Next to SET, RESET and POINT it already supported, I have also added TOGGLE.
For the use of the '9-th color' there is the command AUXCOL to set this color in 36878. The CURSOR command sets the color in 646.
Regards,
Wim.
For the use of the '9-th color' there is the command AUXCOL to set this color in 36878. The CURSOR command sets the color in 646.
Regards,
Wim.
- Mon Dec 20, 2021 10:43 am
- Forum: Programming
- Topic: DUMP
- Replies: 7
- Views: 608
Re: DUMP
Hello Jeff, Here is the source for DUMP in WimBasic that you can use as a headstart. Note that DEFined functions are also registered between the regular variables. My routine filters them out. Regards, Wim ; ; Main entry point for DUMP ; LAF29 BNE LAF95 ; LDA $2D LDY $2E LAF2F CPY $30 BNE LAF39 CMP ...
- Mon Sep 06, 2021 5:59 am
- Forum: Programming
- Topic: out of memory
- Replies: 9
- Views: 711
Re: out of memory
In order to set up a FOR/NEXT loop, a check is done if there is still 18 (decimal) bytes free on stack. For a GOSUB/RETURN a check for 6 bytes is done. Knowing that the stack of the 6502 processor is only 256 bytes, and there is some amount reserved, this gives room for some 40 levels of GOSUBs deep...
- Mon Sep 06, 2021 2:14 am
- Forum: Programming
- Topic: out of memory
- Replies: 9
- Views: 711
Re: out of memory
FOR/NEXT loops eat stack as well. And a combination of nested FORs and GOSUBs is disastrous. The following example throws an OUT OF MEMORY in no time, leaving unclosed FOR/NEXTs and GOSUBs on the stack. 10 FOR I=1 TO 100 20 GOSUB 100 30 NEXT 40 END 100 FOR I=1 TO 100 110 GOSUB 200 120 NEXT 130 RETUR...
- Fri Aug 20, 2021 2:37 am
- Forum: Programming
- Topic: Directory Reading (aka, EOF detection)
- Replies: 18
- Views: 1339
Re: Directory Reading (aka, EOF detection)
In WimBasic I have a 'directory' implementation that even supports redirection of the directory listing to a file, look here:
viewtopic.php?f=2&t=9782#p109534
The only Basic interpreter routine it uses is $DDCD (print unsigned integer)
viewtopic.php?f=2&t=9782#p109534
The only Basic interpreter routine it uses is $DDCD (print unsigned integer)
- Wed Jun 23, 2021 2:07 am
- Forum: Programming
- Topic: illegal function call when evaluating this formula
- Replies: 9
- Views: 772
Re: illegal function call when evaluating this formula
Recently I saw an interesting video about this subject (negative base, fractional power) which made me think again about this forum entry: (-8)^(-2/3) which was calculated to be 1/4. The interesting part of this is that they halved the power and squared the base (leading to a positive base), so: 64^...
- Fri Mar 19, 2021 7:13 am
- Forum: Programming
- Topic: BIT #imm using the VIC-20 BASIC ROM
- Replies: 15
- Views: 1200
Re: BIT #imm using the VIC-20 BASIC ROM
Copying N/V from the constant(!) immediate operand would not constitute a bit *test* at all, in the sense there are no 'surprises' to expect in the outcome. Hmm, thinking about this: loading a register with an immediate value DOES set N and Z (many BEQ/BNE or BMI/BPL depend on this). Or, setting(cl...
- Fri Jan 22, 2021 3:11 am
- Forum: Programming
- Topic: Custom char issue in 6502
- Replies: 20
- Views: 1637
Re: Custom char issue in 6502
In the kernal, the following code is used. Why not use that ? ;***********************************************************************************; ; ; calculate pointers to screen lines colour RAM LAB_EA6E JSR LAB_EAB2 ; calculate pointer to current screen line colour RAM LDA LAB_AC ; get next scre...
- Fri Dec 18, 2020 7:39 am
- Forum: Programming
- Topic: Screen values vs PETSCII
- Replies: 11
- Views: 994
Re: Screen values vs PETSCII
From screenvalue to PETSCII input in X Y = X AND 63 IF (X AND 32) = 0 THEN Y = Y OR 64 IF (X AND 64) THEN Y = Y OR 128 result in Y (if X>127 then char is reverse) From PETSCII to screenvalue input in X IF (X AND 96) = 0 THEN REM it is a control code X = X AND 191 IF X > 127 THEN X = X AND 127 : X = ...
- Tue Dec 15, 2020 2:09 am
- Forum: Programming
- Topic: Fastloaders?
- Replies: 17
- Views: 1082
Re: Fastloaders?
No duplication tests done, so I wouldn't know about reliability. WimBasic holds the loader. Being 8K in size, it is a pretty heavy solution to load WimBasic from tape first, in order to benefit from fast loading your program. Only if your program is written in WimBasic, then this scenario could be u...
- Mon Dec 14, 2020 8:36 am
- Forum: Programming
- Topic: Fastloaders?
- Replies: 17
- Views: 1082
Re: Fastloaders?
WimBasic saves a program of 27904 bytes to tape in 1'54''.
Regards
Regards
- Mon Dec 14, 2020 3:32 am
- Forum: Programming
- Topic: Fastloaders?
- Replies: 17
- Views: 1082
Re: Fastloaders?
WimBasic offers a Turbo-load/save/verify/merge feature for datasette. See http://wimbasic.webs.com
Regards,
Wim.
Regards,
Wim.