6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 6:00 am

All times are UTC




Post new topic Reply to topic  [ 35 posts ]  Go to page Previous  1, 2, 3
Author Message
PostPosted: Mon Mar 28, 2022 3:18 am 
Offline
User avatar

Joined: Fri Aug 03, 2018 8:52 am
Posts: 746
Location: Germany
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.


Top
 Profile  
Reply with quote  
PostPosted: Mon Mar 28, 2022 6:37 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1950
Location: Sacramento, CA, USA
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:
Code:
  @ 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        "    "     "


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 ...

_________________
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)


Top
 Profile  
Reply with quote  
PostPosted: Mon Mar 28, 2022 9:46 am 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 718
Location: Texas
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 ...


Primitive indeed! And those are the reasons why I do it, yes, super easy to parse. My assembler actually supports the < > symbols as well, and I have been meaning to remove the periods entirely, like you said.

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 :) Funny how that works.

Thanks guys!

Chad


Top
 Profile  
Reply with quote  
PostPosted: Mon Mar 28, 2022 12:08 pm 
Offline
User avatar

Joined: Fri Aug 03, 2018 8:52 am
Posts: 746
Location: Germany
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.


Top
 Profile  
Reply with quote  
PostPosted: Sat Apr 02, 2022 4:00 pm 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 718
Location: Texas
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


Attachments:
20220402_104836.jpg
20220402_104836.jpg [ 1.4 MiB | Viewed 299 times ]
20220402_104831.jpg
20220402_104831.jpg [ 1.95 MiB | Viewed 299 times ]
20220402_104827.jpg
20220402_104827.jpg [ 1.36 MiB | Viewed 299 times ]
20220402_104842.jpg
20220402_104842.jpg [ 1.28 MiB | Viewed 299 times ]
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 35 posts ]  Go to page Previous  1, 2, 3

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 47 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: