Page 1 of 1

Assembler / disassembler

Posted: Sun Aug 20, 2017 11:00 am
by Symoon
Hi all,

Ok, I'm getting tired of writing my own assembler programs by hand in a TXT file, like this for instance:

Code: Select all

Address / cycles / op codes / Asm instructions / Comments
0431    6    20 6A E7  JSR #E76A    Init du VIA ***ROM1.0: E6CA
It's fine for short programs but when they start being longer than 100 bytes, having to re-write all the addresses when I insert or remove instuction is HELL. Also repeating the addresses in "op codes" and in "asm instruction" leads to typos.

So, before looking by myself and going the wrong route, is there any standard / used by Oricians / efficient cross-assembler?
Which one should I use/learn, knowing that if it handles cycle counting display, it would be heaven ?

Thanks!

Re: Assembler / disassembler

Posted: Sun Aug 20, 2017 1:16 pm
by Chema
XA included in the OSDK. The best option, imho.

In fact, just download the OSDK and have a look at the examples. You'll be writing multi file asm programs in no time!

Re: Assembler / disassembler

Posted: Sun Aug 20, 2017 2:45 pm
by iss
+1 for XA/OSDK.
BTW, when I saw your source 'Load_Vader_0400_source.txt', I wonder what tool are you using because of the inconsistency of hex number notation ($,# ...), I simply can't believe you do it everything manual. Man, this is self punishment ;).

Re: Assembler / disassembler

Posted: Sun Aug 20, 2017 3:18 pm
by jede
I used frasm, xa, ca65.

XA is the best solution (for syntax, preprocessor, etc). ca65 is good too, but, XA is the best assembler.

Dbug is the maintainer of XA in OSDK. It means that there is updates, bug corrections. The only tool, i don't use in OSDK, is the compiler.

Oric's coder use mainly XA. It's easy to share source code :)

Re: Assembler / disassembler

Posted: Sun Aug 20, 2017 5:34 pm
by Symoon
Thanks fr the replies guys, it seems quite clear ;)
I'll be a total newbie here, is there some user interface, kind of: "I write my code, it displays the address and cycles count automatically"?
iss wrote: ↑
Sun Aug 20, 2017 2:45 pm
BTW, when I saw your source 'Load_Vader_0400_source.txt', I wonder what tool are you using because of the inconsistency of hex number notation ($,# ...), I simply can't believe you do it everything manual. Man, this is self punishment ;).
Lol ;)
The inconsitency is due to the fact that I'm trying to follow what I was told here (about $ and #) but sometimes get it wrong or keep using my old way of writing... Sorry, that certainly doesn't help.
Doing it by hand is painful but also has the advantage of being able to make it here or there (at work, in the bus, ...) on paper even if I have no computer at hand. If I have to have a SDK all the time, that's the end of my programming career ;) as I only have 5 mins here, 15 mins there...

Re: Assembler / disassembler

Posted: Sun Aug 20, 2017 8:13 pm
by Dbug
Symoon wrote: ↑
Sun Aug 20, 2017 5:34 pm
I'll be a total newbie here, is there some user interface, kind of: "I write my code, it displays the address and cycles count automatically"?
You get that for free with Oricutron: Press F2 and you are in the debugger:
http://osdk.org/index.php?page=document ... =oricutron

There's a value called CY which contains the number of cycles, you can press F9 to reset it.

After, it's just a matter of putting a breakpoint at the end of the code, and run it until it hits, then you have the exact cycle count.

Re: Assembler / disassembler

Posted: Sun Aug 20, 2017 9:18 pm
by Symoon
Ok thanks!
In what I'm mainly working at these days (tape loading), cycles counting is really important and determines the way of coding.
I guess I'll have to try and learn now!

Re: Assembler / disassembler

Posted: Sat Feb 06, 2021 12:33 pm
by iss
Symoon wrote: ↑
Sun Aug 20, 2017 11:00 am
Ok, I'm getting tired of writing my own assembler programs by hand in a TXT file, like this for instance:

Code: Select all

Address / cycles / op codes / Asm instructions / Comments
0431    6    20 6A E7  JSR #E76A    Init du VIA ***ROM1.0: E6CA
I'm resurrecting this old thread because of a message in Apple][ FB-group which announce a tool
for writing 6502 assembler code in ..... (suspense....) MS Excel :!: :shock:

It's seems maybe little slow but in general it works.
Download here: https://github.com/tilleul/apple2/tree/ ... _assembler

@Symoon: IIRC you are an Excel-pro, hopefully this tool will be easier than hand-made assembler coding ;).

Re: Assembler / disassembler

Posted: Tue Feb 09, 2021 8:23 am
by Symoon
Aha thanks, I don't have a recent Excel version so not sure I can read xlsx files, but I should give it a try!
BTW i'm no Excel "pro", rather a hobyyst that likes playing with VBA for fun - but none of my work is pro ;)

Re: Assembler / disassembler

Posted: Thu Feb 11, 2021 10:24 pm
by Badger
BTW i'm no Excel "pro", rather a hobyyst that likes playing with VBA for fun - but none of my work is pro
Remember, amateurs built the Ark, Pros built the titanic :D

Re: Assembler / disassembler

Posted: Fri Feb 12, 2021 6:26 am
by xahmol
Pro’s should never use Excel πŸ˜‰ (sorry, could not help myself. Always in my work battling against End User Defined Apllucations instead of proper automation...)

Re: Assembler / disassembler

Posted: Fri Feb 12, 2021 8:08 am
by Symoon
xahmol wrote: ↑
Fri Feb 12, 2021 6:26 am
Pro’s should never use Excel πŸ˜‰ (sorry, could not help myself. Always in my work battling against End User Defined Apllucations instead of proper automation...)
Ha ha, I both agree and disagree.
It's a matter of doing things you have to do, with the tools you got.
Sometimes fully right (you don't call an architect to use a hammer and a spike), sometimes wrong (if you're using spikes too help the wall standing... You should call an architect ;) )

Anyway, sorry for the off-topic ;)