Search found 348 matches
- Mon Dec 20, 2021 10:43 am
- Forum: Programming
- Topic: DUMP
- Replies: 7
- Views: 553
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: 614
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: 614
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: 1169
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: 705
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: 1078
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: 1501
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: 863
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: 920
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: 920
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: 920
Re: Fastloaders?
WimBasic offers a Turbo-load/save/verify/merge feature for datasette. See http://wimbasic.webs.com
Regards,
Wim.
Regards,
Wim.
- Fri Nov 27, 2020 2:06 am
- Forum: Games
- Topic: Sargon II Chess
- Replies: 92
- Views: 15638
Re: Sargon II Chess
Did you know about the 'ADAPTED BY ANDY FINKEL' easter-egg that shows up when you press Shift-C=-CTRL at the startscreen ?
- Wed Nov 18, 2020 6:19 am
- Forum: Programming
- Topic: Just Learning 650x ML & VICMON
- Replies: 4
- Views: 489
Re: Just Learning 650x ML & VICMON
I used to have an EPROM with Vicmon at $6000, Progaid at $7000 and an EPROM with my own utilities at $A000 (with UNNEW amongst others).
To cleanly switch from Vicmon to Basic I did a G FD22, and at the READY., I did a SYS40960 to recover my Basic program.
Regards,
To cleanly switch from Vicmon to Basic I did a G FD22, and at the READY., I did a SYS40960 to recover my Basic program.
Regards,
- Mon Nov 16, 2020 2:00 am
- Forum: Programming
- Topic: 6502 Carry Flag
- Replies: 16
- Views: 1883
Re: 6502 Carry Flag
For some reason--don't ask me why because I don't know--I woke up this morning with the question, "What's the most efficient way to invert the Carry Flag?" That is, set it when it's unset and unset it when it's set. I did not wake up with any practical uses for inverting the Carry Flag, o...
- Thu Nov 05, 2020 4:38 am
- Forum: Hardware and Tech
- Topic: Vic 20 - Black screen on working machine
- Replies: 13
- Views: 1043
Re: Vic 20 - Black screen on working machine
Hmm, C8 doesn't look too healthy...