Skip to content
puregorill edited this page Jun 2, 2023 · 67 revisions

Welcome to the MACRO HLA BASIC wiki

Let's start with the usual "hello world" code. I will explain the whole process using C64Studio, because that is what I use. I will provide a step-by-step guide.

If you are an experienced user of the C64Studio in combination with the VICE emulator, then use the quick guide. Otherwise, choose the more detailed step-by-step guide.
However, even for experienced users it is worth taking a look at the detailed instructions. Some C64Studio settings may still be unfamiliar.

It is assumed that you are not a complete beginner with BASIC-type programming languages and that you therefore understand the concept of common program structures (such as IF...ENDIF, SELECT...CASE, REPEAT...UNTIL, variables and data sizes etc.) without a basic course.
The wiki is not a programming class, but is intended to explain MACRO HLA BASIC.

MACRO HLA BASIC

What is it?

MACRO HLA BASIC is a macro collection for the Commodore 64 (NMOS 6502/6510).
More concretely it contains a so-called "Solution" for the C64Studio, which has an ACME Cross Assembler-like syntax. The macros can of course also be used without the C64Studio (with the Cross Assembler ACME, whose syntax the files just have).

The special feature of this macro collection is that it contains structure macros such as IF-ELSE-ENDIF or REPEAT-UNTIL.

HLA means high level assembly. You can mix the HLA BASIC macros with 6502 assembly mnemonics.

But it is also possible - within limits - to program only with the HLA BASIC macros like in BASIC. It is a bit more inefficient, but of course much much faster than C64 BASIC. So if you know almost nothing about machine language, you can program MACRO HLA BASIC as if it were a kind of Tiny Basic (a limited and therefore somewhat cumbersome Basic that is very fast). However, with parts of machine language you get much more out of the macro collection and the use like Tiny Basic comes with the disadvantage that the code is much longer (and somewhat more cumbersome, because it is not a real high level BASIC) than C64 BASIC.

Should you want to dive into compiler construction, then looking at how these macros are implemented could possibly also be of use - possibly how to do it or how not to do it.

The whole project and also parts of the code are heavily influenced and inspired by the following project:
http://wilsonminesco.com/StructureMacros/

I was also very inspired by the language "QUICK" for the Atari 8-bit series:
https://atariwiki.org/wiki/Wiki.jsp?page=Quick

Important Links

C64Studio:
https://github.com/GeorgRottensteiner/C64Studio (german speaking author, actual software is in english)
https://www.georg-rottensteiner.de/de/c64.html (german site)

ACME:
https://sourceforge.net/projects/acme-crossass/
https://www.c64-wiki.de/wiki/ACME (german site but the english translation with google is good enough)