Search found 189 matches

by olofsen
Tue Jul 22, 2014 6:53 pm
Forum: Development
Topic: ZX Floating point to Decimal code in BASIC
Replies: 12
Views: 12638

Re: ZX Floating point to Decimal code in BASIC

The "28" should perhaps be "128" to clear the sign bit for positive numbers?

Code: Select all

tmpint2 = IntNum - (Fix(IntNum / 65536#) * 65536#) - 128
by olofsen
Fri Jul 04, 2014 6:54 pm
Forum: GAMES
Topic: Random Maze Creator
Replies: 6
Views: 4384

Re: Random Maze Creator

Here is a version that uses RAM in 8192-16383 as workspace, can be compiled with MCODER II, and run with LET L=USR 20500:
by olofsen
Tue Jul 01, 2014 10:21 pm
Forum: GAMES
Topic: Random Maze Creator
Replies: 6
Views: 4384

Re: Random Maze Creator

Interesting! Would this be something for MCODER?
by olofsen
Thu Jun 26, 2014 6:44 pm
Forum: Sinclair Misc
Topic: rand usr 975
Replies: 1
Views: 1684

rand usr 975

First, belated hellos from me to everyone as well! It is really nice to read about everyone's projects. Here is just something funny my brother discovered in the early 80s. Usually RAND USR n where n is a random address in the ROM crashes the ZX81. But for n=975, something interesting happens; scree...
by olofsen
Wed May 21, 2014 7:47 pm
Forum: ZX BASIC
Topic: Bouncing ball
Replies: 14
Views: 11946

Re: Bouncing ball

In the emulator available here http://rullf2.xs4all.nl/sg/z81-2.2.tar.gz I've added a startup flag (-f) so that the six bytes after a number are not stored in the BASIC program when lines are entered. Programs still run, but of course more slowly. Just for fun, to see what changes are needed to the ...
by olofsen
Thu May 15, 2014 9:01 am
Forum: ZX BASIC
Topic: Prime Numbers
Replies: 8
Views: 4467

Re: Prime Numbers

There are 24 numbers in the first 90 that are prime or can be divided by 7. Primes 2, 3, and 5 are quickly handled in lines 80 and 82. There would be more ways to construct a candidate list, smaller or larger than 24. A list X with four elements would be 3, 7, 9 and 11, numbers that are prime or can...
by olofsen
Wed May 14, 2014 10:40 pm
Forum: ZX BASIC
Topic: Prime Numbers
Replies: 8
Views: 4467

Re: Prime Numbers

It is a form of "trial division" (http://en.wikipedia.org/wiki/Trial_division) where the candidate factors are mostly prime when C=0 and with less prime candidates as C increases. Here is a slightly shifted version of the 24 families. For C=0, the 24 numbers contain all numbers except those that can...
by olofsen
Sat May 10, 2014 5:03 pm
Forum: Emulators
Topic: sz81 (gnu/linux) not supporting hires?
Replies: 39
Views: 23203

Re: sz81 (gnu/linux) not supporting hires?

There are some notes in the README in section 4; uncomment the following lines at the beginning of the Makefile and set PREFIX as desired:

Code: Select all

PREFIX?=/usr/local
BINDIR?=$(PREFIX)/bin
DOCDIR?=$(PREFIX)/share/doc/$(TARGET)
PACKAGE_DATA_DIR?=$(PREFIX)/share/$(TARGET)
by olofsen
Sat May 10, 2014 8:14 am
Forum: Emulators
Topic: sz81 (gnu/linux) not supporting hires?
Replies: 39
Views: 23203

Re: sz81 (gnu/linux) not supporting hires?

According to the Makefile, data should be relative to the prefix, and if the prefix is absolute, the path to the data will be too - did you recompile after editing the Makefile and a make clean?
by olofsen
Fri May 09, 2014 9:35 pm
Forum: Emulators
Topic: sz81 (gnu/linux) not supporting hires?
Replies: 39
Views: 23203

Re: sz81 (gnu/linux) not supporting hires?

I haven't tried this, but I think you can set such paths by editing the Makefile?