glad you're having fun! it's always a good feeling to finally get something running.
it seems like you still got some space left on the screen (or is the generated image not stretched to fill the whole screen?), i wonder if you can fit the address on the left (5 characters) infront of each line.
but i gotta ask, what assembler are you using? the syntax looks very strange and unlike any 6502 assembler i've seen.
like why is there a dot infront of every instruction? what does "-label +label" mean? and why do some instructions specify their addressing mode with a little "a", "ax", etc after them?
overall it doesn't matter what assembler someone uses to write code, i'm just curious why you didn't go for something more standard like ca65 for example.
Apple II VGA (Schematics and PCBs)
- barrym95838
- Posts: 2056
- Joined: 30 Jun 2013
- Location: Sacramento, CA, USA
Re: Apple II VGA (Schematics and PCBs)
I think that's Chad's own assembler, and he probably designed it that way for the easiest parsing. It seems that a non-alphanumeric character starts every whitespace-separated directive, mnemonic, constant and label:
Primitive, but effective. I have seen other assemblers decorate their mnemonics that way, because it's easier to parse than scanning ahead into the operand. I might have made slightly different choices, like using . for @ and < for - and > for + and nothing for . but that's just me ...
Code: Select all
@ is a generic directive indicator, followed by start, fill, fluff, etc.
= equates a label with a constant
, is an argument separator in the above two elements
; introduces a newline-terminated comment
& indicates the end of the current pass
: defines a label at the current code pointer
. lays down an opcode at the code pointer and advances it
- lays down the low half of a 16-bit label " " "
+ lays down the high half of a 16-bit label " " "
$ lays down an 8-bit hex constant " " "
% lays down an 8-bit binary constant " " "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)
Mike B. (about me) (learning how to github)
Re: Apple II VGA (Schematics and PCBs)
barrym95838 wrote:
Primitive, but effective. I have seen other assemblers decorate their mnemonics that way, because it's easier to parse than scanning ahead into the operand. I might have made slightly different choices, like using . for @ and < for - and > for + and nothing for . but that's just me ...
I'm actually (right now) trying to figure out Dev65, or as65, or whatever it's called. And I'm getting a ton of errors because I don't know how to type assembly
Thanks guys!
Chad
Re: Apple II VGA (Schematics and PCBs)
Oh I see, Writing your own assembler is certainly one way to learn about the instruction set!
I should know, I basically did the same when I started 6502 assembly (except I kinda cheated by using a premade assembler framework called customASM)
But now I personally just use the included assembler that comes with cc65.
The downside of using an assembler that comes from a C compiler utility is that it takes more time/effort to setup, as you have to deal with object files and linking which in turn requires a config file that loosely describes your systems memory map...
But it's functional and once you go through the hassle it's pretty comfortable and makes potentially setting up the C compiler much easier (if you ever want to go that route in the future, as I remember you saying you're a C++ programmer).
Either way it doesn't really matter what you use for programming as long as you're comfortable with it.
Maybe as a next big project you could try making your own BASIC interpreter. I could see that being a fun challenge.
I should know, I basically did the same when I started 6502 assembly (except I kinda cheated by using a premade assembler framework called customASM)
But now I personally just use the included assembler that comes with cc65.
The downside of using an assembler that comes from a C compiler utility is that it takes more time/effort to setup, as you have to deal with object files and linking which in turn requires a config file that loosely describes your systems memory map...
But it's functional and once you go through the hassle it's pretty comfortable and makes potentially setting up the C compiler much easier (if you ever want to go that route in the future, as I remember you saying you're a C++ programmer).
Either way it doesn't really matter what you use for programming as long as you're comfortable with it.
Maybe as a next big project you could try making your own BASIC interpreter. I could see that being a fun challenge.
Re: Apple II VGA (Schematics and PCBs)
Probably the last post/update I have on this particular board: ROM banking!
Attached are my slideshow pictures for the college's Math Day Event! It will be on Thursday April 21st. The 6502 just cycles through the pictures, about 5 second delay for each.
I'm using the VIA's PA4 and PA5 pins (with pull-down resistors) to switch between the four 32K banks in ROM. Each bank is basically a duplicate in code, except for VIA pins and picture hex code. This was finished in about an hour or so. Very easy.
This morning I also got a SPI EEPROM to write and read using the VIA pins PA0-PA3. It was actually pretty difficult because I coded that using the CA65 Assembler, so it took some getting used to. It was great practice though and I will continue to use that from here on out, converting old code into new stuff. Any idea on how I can output a 'real' hex file, instead of just the .lst file? I had to make my own C++ converter program from hex into binary still.
So why is this the last post? Everything I needed to discover and test with this board has been worked out. I will be designing a new board with all of these added features, including the 'data cassette' audio input from the other topic. And... I have plans for more colors
Will show it off in a new topic when the time comes.
Thank you everyone so much for your help and support. It has been a wild ride these past few weeks. Have a most wonderful weekend!
Chad
Attached are my slideshow pictures for the college's Math Day Event! It will be on Thursday April 21st. The 6502 just cycles through the pictures, about 5 second delay for each.
I'm using the VIA's PA4 and PA5 pins (with pull-down resistors) to switch between the four 32K banks in ROM. Each bank is basically a duplicate in code, except for VIA pins and picture hex code. This was finished in about an hour or so. Very easy.
This morning I also got a SPI EEPROM to write and read using the VIA pins PA0-PA3. It was actually pretty difficult because I coded that using the CA65 Assembler, so it took some getting used to. It was great practice though and I will continue to use that from here on out, converting old code into new stuff. Any idea on how I can output a 'real' hex file, instead of just the .lst file? I had to make my own C++ converter program from hex into binary still.
So why is this the last post? Everything I needed to discover and test with this board has been worked out. I will be designing a new board with all of these added features, including the 'data cassette' audio input from the other topic. And... I have plans for more colors
Thank you everyone so much for your help and support. It has been a wild ride these past few weeks. Have a most wonderful weekend!
Chad