BREVITY assembler

Programming the 6502 microprocessor and its relatives in assembly and other languages.
Post Reply
dave
Posts: 5
Joined: 17 Oct 2002

BREVITY assembler

Post by dave »

Does anybody here have a copy of the BREVITY assembler by Thomas G. Windeknecht?

I had forgotten about this assembler until a post in another forum ignited my nostalgia.

My school was on the Memphis State University campus, and I got to hang out a bit in the math dept. where Dr. Windeknecht had a lab full of OSI C2-8P's. There were usually a few grad students in there working on projects using Dr. W's BREVITY assembler. The notation was very compact, and I believe the idea was that the source was smaller, taking up less RAM and assembling faster. The systems were all cassette based. I somehow carried the impression that BREVITY might have been in ROM, since the code would often crash and require a reboot. But perhaps the assembler was loaded from cassette instead.

Watching the students work on these computers no doubt played a role in my eventually getting a second-hand C2-4P.

Dave
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: BREVITY assembler

Post by BigEd »

I don't have a copy but it does sound like an interesting utility. He describes it in his book "6502 Systems Programming":
Quote:
The second novel feature is the use of a nonstandard assembly language, BREVITY, for the 6502 microprocessor. BREVITY was specifically designed to permit efficient assembly language programming on 6502 systems containing no more than 12-16K bytes of primary memory and only tape cassette secondary storage. It is a clean, precisely defined, readable, and easily learned language with some unusual features such as two-character (only) labels, one-character (mathematical) opcodes, one-character addressing mode syntax, and locally defined labels. No statement is longer than eight characters and, consequently, a source program is only three to four times as long as the object program it produces. A 300-line BREVITY program can be listed on a single page. For individuals with a 48K-byte primary memory and a floppy disk, the use of BREVITY means there is going to be lots of room left over for the user's systems programs.*
Quote:
*The BREVITY software development system which is designed in this book has been tailored to run on many of the popular 6502 microcomputer systems and is available for sale. Details on ordering this software are available from T. G. Windeknecht, P.O. Box 232, Rochester, Michigan 48308-0232
In fact, it seems Chapter 6 describes the design and gives a listing of a one-pass BREVITY implementation in BREVITY: just 3 or 4 pages of (dense) text to type in and hand-assemble...

(It was very easy to find a dodgy PDF download for the book, but I think we tend not to share such links here.)

From the blurb:
Quote:
Second, it uses BREVITY, a very appropriately named nonstandard assembly language, tor the 6502 microprocessor. BREVITY was specifically designed for maximum efficiency in assembly language programming on 6502 systems containing no more than 12-16K bytes of primary memory and only tape cassette secondary storage. (Of course, with a 48K byte primary memory and a floppy disk, using BREVITY means there's lots of room left over for your systems programs.) It is precise, readable, and extremely easy to learn and has these novel features:
[*] Two-character labels, one-character mathematical opcodes, one-character addressing mode syntax, and locally defined labels.
[*] No statement is longer than eight characters — so a source program is only three or four times as long as the object program it produces.
[*] A 300 line BREVITY program can be listed on a single page
User avatar
barrym95838
Posts: 2056
Joined: 30 Jun 2013
Location: Sacramento, CA, USA

Re: BREVITY assembler

Post by barrym95838 »

BigEd wrote:
(It was very easy to find a dodgy PDF download for the book, but I think we tend not to share such links here.)
Agreed, on both points.
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)
User avatar
cjs
Posts: 759
Joined: 01 Dec 2018
Location: Tokyo, Japan
Contact:

Re: BREVITY assembler

Post by cjs »

The book looks quite interesting, and is definitely one I wish I'd known about and had back in the early '80s. For those curious as to what BREVITY looks like, here's the first page (of three and a bit) of the BREVITY assembler listing.
BREVITY ASSEMBLER - 01.png
Curt J. Sampson - github.com/0cjs
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: BREVITY assembler

Post by GARTHWILSON »

Curt, thanks for the page. That's awfully cryptic. It's apparently actual source code. Is there an interpretation?
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
User avatar
barrym95838
Posts: 2056
Joined: 30 Jun 2013
Location: Sacramento, CA, USA

Re: BREVITY assembler

Post by barrym95838 »

Excerpted from the book:
Quote:
Because of the rather terse, mathematical nature of its statements, we call our 6502 assembly language BREVITY.
Everything about BREVITY is designed to minimize memory requirements and typing.
However, we also feel that terse, mathematical statements promote readability, which is one of
the more difficult things to achieve in assembly language design.
In small installations, no comment statements are permitted in BREVITY programs.
Instead, some standard methods of developing separate documentation are proposed.
In BREVITY, labels denoting hexadecimal addresses consist of precisely two alphanumeric characters.
Since this means there are only 36 x 36 = 1296 possible labels in all, we allow labels to be redefined within a program.
This has a profound effect on (1) assembler design and (2) reducing overall memory requirements.
These topics are taken up in Chapter 6.
No arithmetic expressions involving labels and addresses are used in BREVITY.
We believe that such expressions are not warranted in terms of their utility in systems programming.
Since there are no comment statements nor arithmetic expressions, the longest statement in BREVITY is only eight characters.
Specific operations and conditions are generally represented by a one-character symbol, as in mathematics.
In almost every case, the one-character symbol chosen is already semantically related to the operation or
condition denoted in applied mathematics, at least in the author's experience.
Hopefully, these associations will be palatable to the reader as well.
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)
User avatar
cjs
Posts: 759
Joined: 01 Dec 2018
Location: Tokyo, Japan
Contact:

Re: BREVITY assembler

Post by cjs »

GARTHWILSON wrote:
That's awfully cryptic. It's apparently actual source code. Is there an interpretation?
Well, perhaps no more cryptic than standard 6502 assembler mnemnonics are to the uninitiated.

Earlier chapters in the book explain the language and the whole chapter leading up to this explains how to write an assembler, so I presume that would be all you'd need to understand this source listing at the end of the chapter. The book's on my to-read list, so I may go do a writeup at some point after I get around to reading it.

In the meantime, I know that labels are no more than two letters, so clearly the `XX:` bits are labels, and I'd guess that `+Y` is INY and maybe `Y<'01` is LDY #1, A?'S' is CMP #'S, and the `1=` and `0=` bits are BEQ and BNE, or something along those lines. And I seem to recall seeing some punctuation prefixes for various addressing modes.
Curt J. Sampson - github.com/0cjs
User avatar
barrym95838
Posts: 2056
Joined: 30 Jun 2013
Location: Sacramento, CA, USA

Re: BREVITY assembler

Post by barrym95838 »

Yeah, at first glance it's actually kinda neat, I think. "Terse" is probably a better adjective than "cryptic". It even mentions comment and macro capabilities. The book is full of source examples for useful tasks.
@0200 means ORG $0200
/L3 means JMP L3
[PR means JSR PR
] means RTS
. means RTI
0C means CLC
-X means DEX
A<X means TXA
A<'00 means LDA #$00
A>C1X means STA C1,X
A>IN@ means STA (IN),Y
0=%L1 means BNE L1 (forward reference)
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: BREVITY assembler

Post by BigEd »

It should certainly be possible to hand-assemble the source code given... it might even be possible to rig up a quick and dirty nearly-assembler to deal with the source code given - it only needs to be nearly right, to assist in making a binary for this code, at which point it can assemble itself.

I think this would be a very nice resurrection project.
User avatar
cjs
Posts: 759
Joined: 01 Dec 2018
Location: Tokyo, Japan
Contact:

Re: BREVITY assembler

Post by cjs »

BigEd wrote:
I think this would be a very nice resurrection project.
Previous chapters in the book also cover writing a relocator, monitor and text editor (and, in later chapter, a disassembler), so it looks rather like this could become a complete (and perhaps much smaller) substitute for KRUSADER, which needs well over 4 KB (maybe up to 8 KB) of ROM, last I checked.
Curt J. Sampson - github.com/0cjs
Post Reply