Kirk Meyer Announces ChASM Programming Language
Posted by Nick on 9 September 1999, 01:03 GMT
Kirk Meyer has announced that he is creating a new programming language for the Z80 to assist him in his projects. ChASM, so called because it is a mix between the readability and ease of C and the power of assembly, has its own compiler. The advantage is that the source code becomes much more readable and easier to program without losing any speed. At first only TI-86 programs will be supported, although it will not take much work in order to make it work for all Z80 calculators. The expected release date is around the first of October. The ChASM code is shown at the left, and the code that would normally be used in assembly is commented out at the right. Spaces are generally optional but make the code easier to read. Also note that it is proper to use either the C form of de-- or the slightly more readable form, de = de - 1. Also note that ChASM is really just an easier-to-use Z80 assembler, and thus expressions such as de = hl - 1 are not allowed. hl = _plotSScreen | ; ld hl,_plotSScreen | de = hl | ; ld d,h \ ld e,l | de = de - 1 | ; dec de | bc = 1024 - 1 | ; ld bc,1024-1 | copy.fwd | ; ldir | | | a = [_plotSScreen] | ; ld a,(_plotSScreen) | rot >> a | ; rrca | a -> [6] | ; out (6),a | a ? 2 | ; cp 2 | if >= goto label | ; jr nc,label |
|
|
|
The comments below are written by ticalc.org visitors. Their views are not necessarily those of ticalc.org, and ticalc.org takes no responsibility for their content.
|
|
Re: ChASM Programming Language Announced by Meyer
|
Miquel Burns
(Web Page)
|
Who setup the sample for this article?
Why is the code taking 5 times the width of my screen and causeing me to scroll over just to read it and that the code is on one line.
Is this just a bug or something is wrong with my browser?
By the way, did I get the first comment or someone's else's comment was deleted before I read the page?
|
|
9 September 1999, 01:22 GMT
|
|
|
|
|
|
|
|
|
|
|
K6-2s and Win '95
|
ShodanZero
(Web Page)
|
Are you runnin' '95 on the k6-2, or '98?
I just bought a k6-2 to replace my pentium 200 mmx in my k6-2 motherboard finally, and '95 doesn't seem to like it (ie, not even able to reach the gui). I had to install '98 on it just to get it to work, and then '98 doesn't even use my agp riva tnt 2 video card properly (not able to leave 640x480x16 colors, no not 16 bit), so I had to dump '98, go back to '95, and gave my new k6-2 to my dad...
So, if you're running '95 w/ a k6-2, could you email me on how you got it to work?
Oh yeah, linux rules!
|
|
14 September 1999, 05:59 GMT
|
|
Re: Kirk Announces ChASM Programming Language
|
Ron!
(Web Page)
|
This language looks cool! I own an '86 and can't wait to try the compiler! (If Kirk Meyer releases it b4 I get a 89 :)) Maybe now I'll be able to get an asm program written! Will the programs be any different than regular asm ones?
|
|
9 September 1999, 01:58 GMT
|
|
|
|
|
|
|
|
Re: Re: Re: Kirk Announces ChASM Programming Language
|
Kouri
(Web Page)
|
Hi Kirk. Just a couple questions and a suggestion:
Wouldn't the C equivalent of "ld a,(_plotSScreen)" be "a = *_plotSScreen" and not "a = [_plotSScreen]"? The latter is more of a cross between C and x86 asm.
Also, will your compiler interpret "b>>3" as "sra b \ sra b \ sra b"? That would make code a little easier to read.
And if you wanted to get complicated you could do something like this:
a==2? ld b,a : ld c,a
The equivalent z80 would be:
cp 2 \ jr z,$+3
ld c,a \ jr $+1
ld b,a
It's not very efficient, but it'll work.
Well, good luck with your project. I hope you make a version that supports the 82 someday. :)
|
|
9 September 1999, 04:18 GMT
|
|
Re: Kirk Meyer Announces ChASM Programming Language
|
Kirk Meyer
(Web Page)
|
Also, I forgot to mention when I sent this to news@ticalc.org that it let's you have assert expressions in the debugging version, for example:
a = 2
assert a >= 3
When the program runs, an error would say "ASSERT LINE #whatever". And maybe exit, dunno what I'll do after an assert just yet.
|
|
9 September 1999, 02:38 GMT
|
|
Re: Kirk Meyer Announces ChASM Programming Language
|
Andrew Magness
(Web Page)
|
Wait... What calc will this be for?? the TI-94??? Heh.... (certain things are running thru my mind that I wont say but I'm sure ALL of you are thinking) Maybe this will make my 86 better than the 89!!!
|Wing|
(it will be amazing if this comment ever gets actually posted)
|
|
9 September 1999, 03:08 GMT
|
|
1 2
You can change the number of comments per page in Account Preferences.
|