Here you can ask questions or provide insights about how to use efficiently 6502 assembly code on the Oric.
-
JamesD
- Flight Lieutenant
- Posts: 352
- Joined: Tue Nov 07, 2006 7:38 am
Post
by JamesD » Thu Mar 25, 2010 12:04 am
Does the XA assembler included with the OSDK have an option to create output similar to the following which was generated by my 6803 assembler:
Code: Select all
0004 8000 START .org $8000 ;where to store out program
0005 8000
0006 8000 ;==================
0007 8000 ; playsong,
0008 8000 ; play a song located at songstart
0009 8000 ; original Z80 version by James the Animal Tamer
0010 8000 ; 6803 TASM port by James Diffendaffer
0011 8000 playsong
0012 8000 ; save the registers we will modify
0013 8000 36 psha
0014 8001 37 pshb
0015 8002 3C pshx
0016 8003
0017 8003 ; save old interrupt vector info so we can restore it later
0018 8003 B6 42 06 ldaa TOFVect
0019 8006 B7 80 6C staa SVect
0020 8009 FC 42 07 ldd TOFVect+1
0021 800C FD 80 6D std SVect+1
0022 800F
0023 800F ; enable our MC10 TOF interrupt handler
0024 800F 86 7E ldaa #126 ;load 'jmp' instruction opcode
0025 8011 B7 42 06 staa TOFVect ;store into TOF vector
0026 8014 CE 80 61 ldx #inter ;get the address of our interrupt handler
0027 8017 FF 42 07 stx TOFVect+1 ;store as address to jump to
0028 801A 0E cli ;enable interrupts
0029 801B 86 08 ldaa #8 ;enable TOF
0030 801D 97 08 staa 8
Last edited by
JamesD on Fri Mar 26, 2010 7:10 am, edited 1 time in total.
-
Twilighte
- Game master
- Posts: 819
- Joined: Sat Jan 07, 2006 12:07 am
- Location: Luton, UK
-
Contact:
Post
by Twilighte » Thu Mar 25, 2010 10:47 pm
I don't think so, however when disassembling code on the Oric i always used to use ORION which uses a similar format to the above. The optional PDUMPO utility allowed you to dump it to a printer which on the emu you can easily pick up.
Orion and the utility should be on Oric.org sw database otherwise contact me

-
JamesD
- Flight Lieutenant
- Posts: 352
- Joined: Tue Nov 07, 2006 7:38 am
Post
by JamesD » Fri Mar 26, 2010 7:08 am
It's just a lot more convenient to have the assembler do it so that labels and comments appear in the listing. I'd use a different assembler but the syntax is too different.
-
Dbug
- Site Admin
- Posts: 2503
- Joined: Fri Jan 06, 2006 10:00 pm
- Location: Oslo, Norway
-
Contact:
Post
by Dbug » Fri Mar 26, 2010 7:18 pm
Not in any version of XA I know of, but probably not that complex to implement.
Actually as a debugging listing mode can be kind of practical.
Have to think about it

-
JamesD
- Flight Lieutenant
- Posts: 352
- Joined: Tue Nov 07, 2006 7:38 am
Post
by JamesD » Fri Mar 26, 2010 11:09 pm
Generating the number of clock cycles each instruction takes would be a nice addition as well. No need to hand count or load up an emulator to compare different implementations of an algorithm.
<edit>
And that should be something that can be table driven.
Who is online
Users browsing this forum: No registered users and 2 guests