Assembler / disassembler

Here you can ask questions or provide insights about how to use efficiently 6502 assembly code on the Oric.
Post Reply
User avatar
Symoon
Archivist
Posts: 1148
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Assembler / disassembler

Post by Symoon » Sun Aug 20, 2017 11:00 am

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!

User avatar
Chema
Game master
Posts: 2016
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: Assembler / disassembler

Post by Chema » Sun Aug 20, 2017 1:16 pm

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!

User avatar
iss
Flight Lieutenant
Posts: 476
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: Assembler / disassembler

Post by iss » Sun Aug 20, 2017 2:45 pm

+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 ;).

jede
Flying Officer
Posts: 137
Joined: Tue Mar 14, 2006 11:53 am
Location: France

Re: Assembler / disassembler

Post by jede » Sun Aug 20, 2017 3:18 pm

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

User avatar
Symoon
Archivist
Posts: 1148
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Re: Assembler / disassembler

Post by Symoon » Sun Aug 20, 2017 5:34 pm

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

User avatar
Dbug
Site Admin
Posts: 2345
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Assembler / disassembler

Post by Dbug » Sun Aug 20, 2017 8:13 pm

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.

User avatar
Symoon
Archivist
Posts: 1148
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Re: Assembler / disassembler

Post by Symoon » Sun Aug 20, 2017 9:18 pm

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!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest