[Coco] Portal-9/CCASM

Roger Taylor rtaylor at bayou.com
Mon Dec 6 15:45:56 EST 2004


Here's a few tips for using CCASM with the IDE

To print a listing for a certain source file in your project, add the "-l" 
option to the "assembler options" field for that file.
To print the symbol table, use -s
To print all symbols, including locals and internal symbols, use -sa
Local labels are labels that have one or more @ characters anywhere in the 
name.
	b@  a@  a at b c at 3 c at 4 d@@a
! is 'branch point' local label.  BRA < will branch back to the nearest !, 
while BRA > will branch forward to the nearest !.

The full-size readout window will show whatever CCASM prints.  You'll 
quickly notice that the symbol tables are not sorted at this time.  I'll 
try to get this in the next CCASM version 2.93.

Also, CCASM (when used in Portal-9) automatically creates an error file 
that reveals the lines that have errors in them.  Portal-9 will then 
highlight those lines so you can find them quicker.  Eventually, the IDE 
will let you jump between those lines using a single F-key.  Right now, 
included files won't work with the error report system correctly.

In addition to procedures, I'll be adding structures like While/Endwhile, 
Repeat/Until, and a few others to help ease the pain of writing raw 
assembly programs.

Also, with the addition of the PROC call, something like this could be your 
next assembly language program:

	org	3584
	include	cocolib.asm
	include	graphics.asm

	call	vsync,0
	call	gsetmode,320,200,16
	call	gclear,0
	call	gfcolor,15
	call	gline,0,0,319,199

a@	call	readjoy,0,jx,jy	; returns left joystick in jx, jy variables
	call	gset,jx,jy,15	; plot pixel at jx,jy color of 15
	bra	a@

This would be a program that switches to graphics mode and draws a line on 
the screen, then plots a point on the screen whereever the joystick or 
mouse is pointing.

-- 
Roger Taylor




More information about the Coco mailing list