Page 1 of 1

can sombody make a hello world tutorial for BRASS

Posted: Wed 03 Jan, 2007 7:23 pm
by necro
I am having trouble with all asm efforts and am looking to just be able to get something to compile. (in any compiler for any emu/real calc) so if I could get something very, very specific to, say for instance, just display hello world in brass/latenite, Id be most happy.

Posted: Thu 04 Jan, 2007 12:27 pm
by benryves
  • Run Latenite.
  • Select TI-8x Program, and type "Hello" in the name field. Click 'Create New Project'.
  • Double-click 'Program.asm' on the right hand side. This will open up the source file for editing.
Now, as an aside, Latenite sets up a project in a different way to the way most tutorials set up projects. What happens is that the assemblers starts by assembling Includes\Headers.asm first, which sets up all the program header and shell information for you, before assembling Program.asm which contains your code. I did this as it feels (at least, to me) a lot neater.

The program will start at the "Main" label, regardless of shell options. So, your code should come after Main. The 'ret' returns back to the shell afterwards, ending program execution.

Modify the code so that it looks like this:

Code: Select all

; ===============================================================
; Hello
; ===============================================================

.module Program
.export

	Main
		; Program entry point
		

		xor a
		ld (curCol),a
		ld (curRow),a
		
		ld hl,HelloString
		bcall(_PutS)
		
		bcall(_GetKey)		
		
		ret
		
	
	HelloString
	.db "Hello, world!", 0
	
.endmodule
Here's a tip - when you type "bcall(_", press Ctrl+Space afterwards and a pop-up window will appear listing all loaded labels (from XML help files) that start with "_".

Hit F6 and the following should appear (it gets faster after you've run Brass for the first time):

Code: Select all

------ Building: Source File: Headers.asm, Script: TI-83 Plus (Ion).cmd ------
Brass Z80 Assembler 1.0.4.7 - Ben Ryves 2005-2006
-------------------------------------------------
Assembling...
Pass 1 complete. (81ms).
Pass 2 complete. (29ms).
Writing output file...
Warning: The TIOS gets confused with variable names containing lowercase characters ('Hello').
Errors: 0, Warnings: 1.
Writing error log...
Writing debug log...
Writing list file...
Done!
------ Build Process Complete ------
========== Build: 0 errors, 1 warning ==========
This is complaining that the program name, "Hello", is not TIOS-friendly. To change this, click File->Project Properties, and change Binary Name to "HELLO" (without quotes).

If you expand the Bin folder, you should now see "Hello - TI-83 Plus (Ion).8xp" which would run under Ion on your calculator.

To run the program in PTI easily, press F5. You must have an 83+ ROM renamed to ti8x.rom - located at Debug\PindurTI\ROMs\ti8x.rom - to run this, though.

Let me know how you get on!

Posted: Sat 13 Jan, 2007 5:26 am
by necro
Ok, I have tried your example in as many ways as I can think of but all I get is a screen flash (mirage) or nothing but a "done" line in nostub.

It should be noted I tired a number of other things but they all also failed.

Posted: Sun 14 Jan, 2007 4:56 am
by necro
well, while I got tasm to finaly work (ergggg...about time) , I still can't get latenite...eh, oh well. I should be able to get buy.

Posted: Mon 15 Jan, 2007 1:36 pm
by benryves
Very strange. Does it work on hardware? Could you send me a copy of the output .8xp? (Or just zip up the project file?)

Posted: Tue 16 Jan, 2007 6:45 am
by necro
sure...can I get an email adress? I can't figure out why programs I compile with it don't seem to work even though they ressble tasm compiled programs I have gottent to work. out of couriosisty, why inst there a straight build option where the headers and all are just the same way that tasm does it?

Posted: Tue 16 Jan, 2007 7:24 am
by kalan_vod
necro wrote:sure...can I get an email adress? I can't figure out why programs I compile with it don't seem to work even though they ressble tasm compiled programs I have gottent to work. out of couriosisty, why inst there a straight build option where the headers and all are just the same way that tasm does it?
I would like to suggest heading over to revsoft and trying out SPASM.

Posted: Tue 16 Jan, 2007 11:55 am
by benryves
necro wrote:sure...can I get an email adress?
Try the (email) button under the post. ;)
I can't figure out why programs I compile with it don't seem to work even though they ressble tasm compiled programs I have gottent to work.
Neither can I. I'm puzzled!
out of couriosisty, why inst there a straight build option where the headers and all are just the same way that tasm does it?
If you look at the size of the header file's code, you'd notice that there's a lot of it (declaring character mapping, adding in icons/descriptions, even putting on a footer for 83 programs). At least this way breaks the code away from the headers.

There's nothing stopping you from doing it the TASM way, though. Create a new project, open the main source file, nuke all the template code from it (the "Main" bit), then go File->Project Properties and select it as the file to build instead of Headers.asm.

Posted: Thu 18 Jan, 2007 4:26 am
by necro
So, um, did you recieve them?

Posted: Thu 18 Jan, 2007 11:13 am
by benryves
necro wrote:So, um, did you recieve them?
I'm afraid not. :\ If you didn't put in a subject line (or a non-descriptive one) chances are it was removed as spam. (I have to sort through ~200 emails every morning, so be kind). Unless you're sending from a linuxmail.org or .jp domain, that is, where it'll be deleted before it even gets to my inbox...

Posted: Tue 13 Feb, 2007 6:39 pm
by Halifax
One recommendation. DO NOT use TASM compiled source with SPASM. It will create a world beyond frustration for you. Or the other way around DO NOT use SPASM compiled source with TASM. So if working with someone on a project make sure you both have a copy of the same compiler. I was devasted when this happened to me and I tried to compile my source that compiled fine with TASM on SPASM and got 311 errors. I was like O.o

Posted: Tue 13 Feb, 2007 6:44 pm
by benryves
Brass 2 will probably head this way too, though I might write a TASM compatibility plugin.

Posted: Tue 13 Feb, 2007 7:16 pm
by Jim e
Halifax wrote:One recommendation. DO NOT use TASM compiled source with SPASM. It will create a world beyond frustration for you. Or the other way around DO NOT use SPASM compiled source with TASM. So if working with someone on a project make sure you both have a copy of the same compiler. I was devasted when this happened to me and I tried to compile my source that compiled fine with TASM on SPASM and got 311 errors. I was like O.o
Thats REALLY odd. Theres only 2 or 3 things different from my understanding, the most damaging being .org.

Posted: Tue 13 Feb, 2007 10:20 pm
by threefingeredguy
I've never had anything assemble differently between any of the 3 assemblers until I made some Brass specific code and some Spasm specific code.