If you've tried the example, you would know it does not produce the same output.
Calculator language
Re: Calculator language
Re: Calculator language
I was going to award you a virtual cigar for this Erik but as it doesn't say "HELLO WORLD" I now ban you from the forum!!!olofsen wrote: ↑Wed Jun 07, 2017 1:42 am Cracking as wellCode: Select all
1 REM 1112222333334444455 10 REM START 11 POKE 16514,239 12 POKE 16515,47 ; jump 13 POKE 16516,5 20 REM STRING 21 POKE 16517,63 22 POKE 16518,61 23 POKE 16519,36 24 POKE 16520,29 30 REM STRING ADDR,LEN 31 POKE 16521,48 ; stk-data 32 POKE 16522,129 33 POKE 16523,133 34 POKE 16524,64 35 POKE 16525,4 40 REM STK FETCH AND PRINT 41 POKE 16526,48 42 POKE 16527,124 43 POKE 16528,53 44 POKE 16529,192 45 POKE 16530,41 ; usr 50 REM END 51 POKE 16531,52 ; end-calc 52 POKE 16532,201 100 RAND USR 16514
Serious face on, nice work but how does the jump work at 16515 just after the calculator is switched on,is this part of the calculators language as I thought a jump would start with something like 24(D)-jr,nn or 32(D)-jr nz,nn.
As you can tell assembler is not my strong point.
Re: Calculator language
This is not ML. 47d (2Fh) is the "calculator opcode" for jump. So "47 5" jumps over 5, Z, X, 8, 1.
Re: Calculator language
Thanks Martin all clear now.
He still can't have a cigar!
He still can't have a cigar!
Re: Calculator language
Yes, for MEM output, MEM needs to be set, which may not be possible with CL. The current code goes from RST 28h to end-calc; however, it is not relocatable Nevertheless, perhaps we are now ready to have a go at "81 boxes with a Z80 inside" (conceivably without a virtual single malt award) https://en.wikipedia.org/wiki/99_Bottle ... er_science
Re: Calculator language
This is a simple example that display inverse Z, but it's relocatable.
Code: Select all
4082 EF RST 28H
4083 30 STFP
4084 B83F0000 191
4088 2B CHR$
4089 30 STFP
408A 7C35C0 2908
408D 29 USR
408E 34 END
408F C9 RET
It would probably be better to do a
Code: Select all
[C0] STOR 0
Code: Select all
STFP 2908
Code: Select all
[E0] GET 0
Re: Calculator language
Maybe a better way to have string data is to have them stored in Basic variables, and fetch them somehow when they're needed. Basic variables have the same properties as Calculator Language:
- Can be anywhere in memory, as it is just data
- Data is fully relocatable, as it has a name as reference
Re: Calculator language
Here's a program which uses the FP calculator extensively. Originally written for the Spectrum, I converted it way back in '87 to run on a hi-res capable T/S 1000. It shows that the calculator in the Spectrum is pretty much the same as the ZX81's. The listing is nicely annotated in the article.
Regards;
Greg
Regards;
Greg
- Attachments
-
- Spirograph.zip
- Program and article
- (577.61 KiB) Downloaded 161 times
Re: Calculator language
Thanks Greg this is MUCH appreciated.
EDIT
just trying it with the new Zxpand+ and whilst some of the introductory surround/border is a bit corrupted the text is fine and so is the first demo I'm running albeit very very slow.
A cracking piece of work and it's nice to see the calculator being used like this.
I think Martin will like this.
More like this please Greg!!!
EDIT
just trying it with the new Zxpand+ and whilst some of the introductory surround/border is a bit corrupted the text is fine and so is the first demo I'm running albeit very very slow.
A cracking piece of work and it's nice to see the calculator being used like this.
I think Martin will like this.
More like this please Greg!!!