ticalc.org
Basics Archives Community Services Programming
Hardware Help About Search Your Account
   Home :: Archives :: News :: Kirk Meyer Announces ChASM Programming Language

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

Wait a minute!!!
Miquel Burns
(Web Page)

Never mind about the article format error, it was fixed when my comment was posted.
I think ticalc.org should check on that, I find it way too weird.

     9 September 1999, 01:28 GMT


Re: Wait a minute!!!
Nick Disabato  Account Info
(Web Page)

It was a problem for users of IE5 to the best of my knowledge =(

--BlueCalx

     9 September 1999, 02:33 GMT

Re: Re: ChASM Programming Language Announced by Meyer
Kirk Meyer  Account Info
(Web Page)

There was a problem with our news script stripping the carriage returns out of the item. It's kind of fixed now but it looks really ugly. We'll work on it.

     9 September 1999, 01:28 GMT

Re: Re: ChASM Programming Language Announced by Meyer
Nick Disabato  Account Info
(Web Page)

You got first comment.
That's fixed now. :)

--BlueCalx

     9 September 1999, 01:29 GMT


Re: Re: ChASM Programming Language Announced by Meyer
Jean Vásquez  Account Info
(Web Page)

Looks fine to me. Either you are running at a low res or there was a bug that has been fixed. Well, maybe to add some humour, I would like PasBasCasm, a mix of Pascal, Basic, C, and Asm =} . But seriously, PROSIT and LINUX RULES!!!!!!!! Wait, I meant 'can't wait to see it finished Kirk' or something like that.


LINUX RULES!!!!!!
PROSIT RULES!!!!

     9 September 1999, 01:36 GMT

Re: Re: Re: ChASM Programming Language Announced by Meyer
DeeKay Account Info

Yeah.... Linux does ROCK!!!! and of course... Prosit does too! =Þ

but ChAsm does look good.... i'm am definitly looking forward to it...

DeeKay
Linux rules, Doors rules, and of course Prosit rules... kinda looks weird posting that after the author! =Þ

     9 September 1999, 02:33 GMT

Re:ChASM Programming Language Announced by Meyer
mad_ian  Account Info

I wonder what it would take to make a Linux port to the Z80 and a TI-86....

Hmm..that sounds fun...

Although, it might be easier to do aport to the TI-92+, since it uses a M68000 and has a QWERTY board...and you could FLASH in the Linux Kernal...

-mad_ian

     9 September 1999, 17:23 GMT


Re: Re:ChASM Programming Language Announced by Meyer
Scott Noveck  Account Info
(Web Page)

What would be the POINT of porting Linux to a TI Calc? What Linux features would be useful on such a weak platform? Besides, the m68k Linux kernel is a LOT more than our two-megabyte limit and the whole damn thing would have to be re-written for a small 4-color greyscale screen, no mouse, the odd keyboard, etc. and no Linux programs would actually run on the thing. . .

-Scott

     10 September 1999, 01:31 GMT


Re: Re: Re:ChASM Programming Language Announced by Meyer
Brock Wilcox  Account Info
(Web Page)

Hey, check this out... Its old but its an idea Adam and I have been toying with for a long time.

http://www.auk.cx/linux-ti92/

     12 September 1999, 05:30 GMT


Re: Re: Re: ChASM Programming Language Announced by Meyer
akromix
(Web Page)

Linux is by far better than Windoze...I don't know why everyone is soo happy with their win98 piece of shit. I mean, it costs $100 for what, the same kernel as win95, and maybe a few added features. Big Whoop. I just was using my windoze box today and it is a AMD/k6II 380 with 128 megs of ram, and my linux box is a 200 MMX with 82 megs of ram. I am seriously thinking of ditching windoze on my other box, because I just well, LOVE LINUX!!!

well well well, it's me again....Akromix

     11 September 1999, 01:00 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! Account Info
(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: Kirk Announces ChASM Programming Language
Kirk Meyer  Account Info
(Web Page)

No. That is what is good. It is 100% asm, only it is easier to write, easier to understand your code later, and hopefully, easier to learn.

     9 September 1999, 02:04 GMT


Re: Re: Re: Kirk Announces ChASM Programming Language
Kouri  Account Info
(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: Re: Re: Re: Kirk Announces ChASM Programming Language
Harper Maddox  Account Info
(Web Page)

I think you could make an efficient use of "If (comparison)" in your compiler

all you would have to do is move the code inside an if to a location later in memory. This would take up roughly the same space in "quasi-C" as ASM.

for instance in "quasi-C":

if (b < a){
b++;
a--;
f = 7;
}

would be in z80:

cp b
call nc,LABEL
<stuff followed by an absolute ret, jr, jp>

LABEL:
inc b
inc a
ld f,7
ret

bytes: 9

it might be a little bigger because of the call, but
since the calculators being released now have a larger
supply of memory, it really wouldnt matter that much.
besides if you could program "C" rather than asm, you could do work 5 times as fast.

     9 September 1999, 17:37 GMT


Re: Re: Re: Re: Re: Kirk Announces ChASM Programming Language
Kirk Meyer  Account Info
(Web Page)

There are already a few Z80 Small C compilers. A few people have tried to make games with them. They're really big and insanely slow considering what they do.

The point of ChASM is that it's really assembly, except it's much easier to understand what's going on, among other things. An 'if' statement like you propose can't be implemented quite as simply as you say. The compiler would also have to push all of the registers if the 'if' clause is executed, because if it didn't things would get all whacked.

     9 September 1999, 21:52 GMT

Re: Kirk Meyer Announces ChASM Programming Language
Kirk Meyer  Account Info
(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: Re: Kirk Meyer Announces ChASM Programming Language
Samir Ribic  Account Info
(Web Page)

I remember one computer magazine "Racunari" from former Yugoslavia, about 1986. They called such software "Humanized assembler". The idea was to replace LD HL,2000 with HL=2000 ; and LD A,(HL) with A=dat.HL
Some HP calculators had such mnemonics, anyway.

     9 September 1999, 11:38 GMT

Re: Kirk Meyer Announces ChASM Programming Language
Andrew Magness  Account Info
(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


Re: Re: Kirk Meyer Announces ChASM Programming Language
Kirk Meyer  Account Info
(Web Page)

Well first off TI-94 is now called Cymbol. And although it says on my web page that I dropped Cymbol, one of the main reasons for creating this language is so that I can pick up the development of it again.

     9 September 1999, 03:16 GMT

1  2  

You can change the number of comments per page in Account Preferences.

  Copyright © 1996-2011, the ticalc.org project. All rights reserved. | Contact Us | Disclaimer