12th October 2002 | KEN ABOUT ... COMAL , CAPTAIN, CASH |
Ken Ross |
NOW SHOWING AT THIS INTERMISSION Sad to say but due to various problems they didn't get to show my video at the Micromart fair at the N.E.C. However it's available on Video CD if anyone wants a copy, (usual ICPUG postal rules! - supply stamped addressed return packaging). To view VCDs on Macs I've found there's a small program called 'FreeVCD', but I've lost the URL, (so enter ''freeVCD'' and "HQX'' into any search engine). I've been told of this for slaves of M$(!) If anyone wants to test the PC VCD player then I can send the video CD mentioned above to test it out with! THE ITALIAN JOB One Friday in Kingston Upon Thames we saw a placard saying: Do you use a Mac - paying a pound to answer some questions Picture sequence of innocent bystanders being knocked to the ground in the rush. Do you use a Mac? Yes indeedy I do - give me the money. Did I ever own a PC? Good lord no - give me the money. Sorry we're looking for people who've switched from PC to Mac and you don't qualify. What a swiz - how about if I still use an Amiga? Sorry we're looking for people who've switched from PC to Mac and to tell us why, but you don't qualify. Exit Ken!!! However the next encounter with another member of the research team was far more profitable as I gave them the same answers as the person before me. AN INTRODUCTION TO COMAL (original printing reproduced from Commodore Scene 20 ) NAMING OF THE PARTS In the dust baked arid wastes of New Mexico lies the little town of 'Truth or Consequences', named after an American radio quiz of the 1930s. The icy windswept Tazhdik SSR in the far flung reaches of what was the USSR is home to Mount Communism. Just a little to the north of San Antonio, Texas is COMAL county ~ I wonder.......... I, BORGE COMAL ( COMmon Algorthmic Languge ) was created by Borge Christensen for educational use, so as to combine the easy to learn BASIC style but with the structured behaviour of PASCAL. It bears a striking resemblance between QBASIC in Windows3.1, (was I told this at the time? k.r. 2002), and a lot more to Chipmunk BASIC which is freeware on the Mac. It comes in various sizes on floppy disk to suit your CBM and it modifies & extends BASIC. In the CBM/PET, unless you've got an 8096, it reduces work space down to around 5K. With an 8096 and COMAL V1.02 you get 38692 bytes, (BASIC 31743 bytes +6949!) - a chunk of the expansion is yours without fighting with machine code. However, BASIC and COMAL can't run each others programs, (but don't let that put you off!). The C64 version can come on floppy disk or the COMAL cartridge. Unless you can find the cartridge the amount of workspace is reduced to embarrassing levels! I use COMAL 1.02 on my 8096 and COMAL 2.0 in cartridge on my C128. This starts it up as a COMAL speaking C64 with a bit of the workspace taken up by the needs of the system, (new figure = 30174 bytes), but this loss is more than made up for by the additional commands that are now available. COMAL can save its programs as normal, but also with an option to save them as SEQ files. The various versions of COMAL seem not to be able to load each others programs. In my case I wanted to convert from V1.4 to V2 so I started up as V2 then exited to BASIC to load V1.4 from disk. I then loaded the COMAL program and saved it as a SEQ file. After a restart as V2 again I used ENTER to load the SEQ file from disk, altering lines as needed when they were brought to my attention. (At this point you may be saying that this sounds like a lot of hard work!) Shifting from C64 V2.0 down to V1.02 on my 8096 needs a lot of typing REMs in case you're wondering! The default device is disk, instead of tape, when loading & saving files. Screen text displays are tidied up with a PRINT AT X,Y USING "###.##" statement which gets rid of print tab, rounding and padding subroutines. A major difference between languages is in variable names. BASIC will only recognise the first 2 characters but COMAL can recognise up to 16 characters. This means that real words, including previously restricted words (NEXTbit), can be used. The only limitation is that BASIC will accept ITEM and ITEM$ as different variables but COMAL won't. Syntax is checked on entry against BASIC's crash when running. COMAL places the cursor over the error - most of mine seem to occur when trying to use BASIC techniques like not leaving spaces between commands and parameters. COMAL status$ is similar to BASIC4 DS$ - but it behaves differently. After one look status$ is cleared, so it needs to be read into a temporary variable to avoid losing the source of my errors. I tend to use BASIC 4's DS$ as a means of checking what's happening with reading files off disk. String variables used have to be declared at the top of a program, with how long they are - any variables input longer than this gets lopped off which comes in handy at times. GOSUB RETURN are replaced by SUBNAME, PROC SUBNAME ENDPROC SUBNAME. A chunk can be tested using subroutines named in the main body. The finished section can then be stripped of unwanted bits, listed to disk, then MERGEd neatly onto the end of the main body with COMAL automatically renumbering to suit. By comparison, with BASIC-AID on my 8096 the items to be merged require renumbering from after the last line number on the main body. There is auto line numbering built in as standard into all versions of COMAL. The standard IF.....THEN conditional instruction is enormously enhanced in COMAL in 3 separate ways. (1) The CASE structure. This saves a long list of IFs when the main variable being tested can take several different values, each of which requires a different instruction, (or instruction set), to be carried out. 0010 CASE ( expression ) OF The 'expression' can be any numeric or text expression, not just a single variable. (2) an extended IF ... THEN ... ELIF ... ELSE structure This allows blocks of code to follow each condition, and allows an OTHERWISE block to be executed if none of the previous conditions are satisfied. 0010 IF ( condition1) THEN (3) the WHILE loop 0010 WHILE ( something is true ) DO This is a do routine until something happens except that, because the test comes at the start, the lots of stuff might never get done at all. PRINTING OUT FROM COMAL (I've not got a printer on my C128 as yet, as I use my 8096 for typing mostly, so the secondary addresses (sa), etc are based on the use of the 8096 and may need modifying for C64 printers) select output "lp" - any print statements after this end up on paper with an sa = 0 In the main program any output using PRINT ends up on paper until: The loop of FOR......NEXT is also expanded with The cartridge version of COMAL for the C64/128 also has a number of procedure packages built in, for using additional statements and commands along with having your error messages in Danish or English. (The options can be combined). English / Danish / graphics / turtle / sprites / sound /system /font / paddles/ joysticks/ lightpen A program which draws a yellow border around the display screen might look like this : USE graphics (This last line of the program keeps the graphics screen visible until any key is pressed, then the text screen is brought up hiding the graphics.) The graphics screen consists of 320 horizontal and 200 vertical points. Each pixel is identified by X,Y, co-ordinates in either GRAPHICSCREEN(0) , high res or GRAPHICSCREEN(1), multicolour . The choice of graphics screen can be text screen - full screen - split screen along with other commands that make life easier. SPLITSCREEN is a procedure which shows the graphics screen and a scrolling copy of the text screen with four lines of text and the cursor at the top of the display. (COMAL still uses the American spelling of colour although it's of European origin) Text colour has 3 commands, TEXTCOLOR, TEXTBACKGROUND, TEXTBORDER. PLOTTEXT Anyway, I hope that this has interested some of you in this subject and may shed some light on that odd cartridge that you've got lurking in a drawer somewhere. SHARP PENCILS You may have noticed that there was a bit of time before Captain Commodore made his recent reappearance. (He made an appearance on the N.E.C video though). The fact that the West Midlands were hit by an earthquake as Maureen Jane was told of the video no go is no surprise to certain people! WHAT DO YOU THINK SO FAR! I was given a copy of Strata Videoshop and when it starts up it tells me that I shouldn't be using virtual memory on my Mac 7300. Excuse me, Mr Strata, the PowerMac is designed to use virtual memory to give better performance ~ switching it off looses nearly 8MB of RAM to system use. As my needs are more modest I'm carrying on with my existing software. |
|
|
|
|
|
|
|
|