Search found 348 matches

by wimoos
Mon Oct 12, 2009 1:14 am
Forum: Programming
Topic: Using and improving Exbasic
Replies: 100
Views: 39702

How CALL works

I figured out how you're supposed to use CALL. First you have to set up the vector: DEF CALL <address> The address is kept in 780 and 781 (these locations are also used by SYS, so you have to keep that in mind). Then you can perform a call like: CALL (<params>) After checking for the left parenthesi...
by wimoos
Thu Sep 24, 2009 2:07 pm
Forum: Programming
Topic: Using and improving Exbasic
Replies: 100
Views: 39702

Fixed it, and reworked the manual

A small challenge because of space limitations, but I fixed it as follows. At $A108 there is a string of 6 characters that seems to denote the date of assembly: "301082". In the code there is no reference to this string. Being 6 bytes it's just enough to hold the patch. So: $A108 JSR $DDDD...
by wimoos
Wed Sep 23, 2009 2:59 pm
Forum: Programming
Topic: Using and improving Exbasic
Replies: 100
Views: 39702

Found the bugs in DUMP and MATRIX as well.
At two instances there is a JMP $DDD7 that needs to be replaced with a JSR $DDDD followed by a JMP $CB1E . Because some more space is needed I have to develop the patch, before I put it here.
If someone beats me to it, I wouldn't mind. :wink:
by wimoos
Tue Sep 22, 2009 12:08 pm
Forum: Programming
Topic: Using and improving Exbasic
Replies: 100
Views: 39702

CEEK

I fixed the bug in CEEK as well. There was a bogus opcode on $BB6C. I changed it to $EA (NOP) and now CEEK works as expected. The code was a $6F and I have a 65C02, so it performs a BBR6, together with the two following bytes, hence the side effect. On a regular 6502 it would probably hang. In the p...
by wimoos
Thu Sep 10, 2009 8:06 am
Forum: Programming
Topic: Interesting bugs in old games
Replies: 11
Views: 2380

How about pushing a calculated address on the stack and later perform an RTS. Mind you, the address will be incremented before operation continues at the desired location.


LDA #>(LABEL-1)
PHA
LDA #<(LABEL-1)
PHA
.
.
.
RTS

LABEL:
LDX #$0A
.
.
by wimoos
Tue Sep 01, 2009 11:13 am
Forum: Programming
Topic: Using and improving Exbasic
Replies: 100
Views: 39702

found it

I discovered that ODF is not an Exbasic statement, but it is a small typo/bug. At location $BEF0 is a $44 ("D") but it should be a $46 ("F"), which turns ODF into OFF. Now the commands SPACE OFF, TRACE OFF, LOCK OFF, LETTER OFF work the way they should. Amazingly, the HELP comman...
by wimoos
Wed Aug 19, 2009 1:44 am
Forum: Programming
Topic: Programmer's Aid cart Block 5
Replies: 47
Views: 16627

Exbasic

Knowing how to move a cart from $7000 to $B000 is very interesting, maybe there is way to automate this ? Instead of ProgAid, why not use Exbasic. It is already in BLK5, provides for programming and debug tooling, AND enhances Basic with a wealth of extra statements and functions. Since I found a ma...
by wimoos
Mon Aug 17, 2009 1:05 pm
Forum: Programming
Topic: Using and improving Exbasic
Replies: 100
Views: 39702

I found it on www.forum64.de in a post by member oldskool.

It appears SPACE has two different functions.
Loading from/saving to disk works with DOS directives.
CEEK has an unwanted side effect in that it changes screencolors.

ODF is not mentioned in the manual, so its purpose remains unclear.
by wimoos
Sun Aug 09, 2009 8:35 am
Forum: Games
Topic: In search of...
Replies: 38
Views: 15157

Thanks Mike

..for putting it together, and that in so little time! I've tried it out in VICE and it works great. Still a lot of things to do of course, like keeping scores, undo moves, and other intelligent things. Havent tried it on a real vic, because I haven't got a joystick on it. But don't worry, I reroute...
by wimoos
Tue Aug 04, 2009 2:23 pm
Forum: Programming
Topic: Game speed in basic
Replies: 20
Views: 4885

What also speeds up quite a bit in a condition is to remove '<>0'. For example, compare the following: 10 IF A<>0 THEN ..statement.. against: 10 IF A THEN ..statement.. But also: 10 IF A<>B THEN ..statement.. against: 10 IF A-B THEN ..statement.. Only works properly in IF-THEN and is not to be used ...
by wimoos
Tue Aug 04, 2009 8:21 am
Forum: Programming
Topic: Game speed in basic
Replies: 20
Views: 4885

Speed of compound conditions

What also may help in certain cases is the following: 10 IF ..simple condition.. THEN IF ..complex condition.. THEN ..statement.. instead of 10 IF ..simple condition.. AND ..complex condition.. THEN ..statement.. In the first example the complex condition is not evaluated when the simple condition i...
by wimoos
Mon Jul 27, 2009 3:54 am
Forum: Programming
Topic: Using and improving Exbasic
Replies: 100
Views: 39702

Using and improving Exbasic

Does anybody have a manual for EXbasic available ? Amongst others I have the following questions:

1. Why does LOAD"<file>",8 behave like there's a tape on 8 ? And how to come around that ?
2. What does ODF do ?
3. What does CEEK do ?
4. What is the reverse of SPACE ?
5...

Regards
by wimoos
Mon Jul 27, 2009 12:55 am
Forum: General Topics
Topic: Math Questions
Replies: 13
Views: 2969

When trying for a number to be prime there's no reason to test any further than the square root of that number. When "even" is also ruled out then you have a pretty Q&D algo. 10 input x 20 if x/2=int(x/2) then (no prime) 30 for i=3 to sqr(x) step 2 40 q=x/i:if q=int(q) then (no prime) ...
by wimoos
Tue Jul 07, 2009 12:59 am
Forum: Games
Topic: In search of...
Replies: 38
Views: 15157

When I posted my first message here, I wouldn't have thought it would come this far. I am looking forward to the results.
Happy programming !
by wimoos
Thu Jun 18, 2009 4:51 am
Forum: Hardware and Tech
Topic: How small could a fully functional Vic 20 be?
Replies: 15
Views: 4236

I have a 65C02 in my VIC-20 since 1983 and have never discovered any anomalies. On the contrary, I have made good use of the extra opcodes in several of my projects.
Dependance on unsupported or undocumented features is always a bad idea.