[SOLVED]Z80 assembler with include path and macro support ?
Moderator: BigEvilCorporation
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
[SOLVED]Z80 assembler with include path and macro support ?
Hey
I'm looking for a Z80 assembler which is available for win32 and does support both macro and the possiblity to give additional "include path" as compiler parameters.
For now i'm using AS80 and i was very happy with it, unfortunatly it doesn't support extra include path and that gimme serious problems to write my ultimate genesis developement makefile
Does anyone has any ideas ? i made some searchs but i can't found any win32 assembler with both features...
thanks
I'm looking for a Z80 assembler which is available for win32 and does support both macro and the possiblity to give additional "include path" as compiler parameters.
For now i'm using AS80 and i was very happy with it, unfortunatly it doesn't support extra include path and that gimme serious problems to write my ultimate genesis developement makefile
Does anyone has any ideas ? i made some searchs but i can't found any win32 assembler with both features...
thanks
Last edited by Stef on Mon Jan 10, 2011 10:22 pm, edited 1 time in total.
SjAsmPlus is the best Z80 cross-assembler, in my opinion. It has includes, macros, and a lot of other features. I've used parent version, SjAsm, to make code for SMD's Z80, and you've seen the code.
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
wladx is a good option too
http://www.smspower.org/dev/tools/wladx/
asmx do 68000 and z80, it's included in basiegaxorz setup
http://www.smspower.org/dev/tools/wladx/
asmx do 68000 and z80, it's included in basiegaxorz setup
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Thanks a tons, i think i found my new Z80 assemblerShiru wrote:SjAsmPlus is the best Z80 cross-assembler, in my opinion. It has includes, macros, and a lot of other features. I've used parent version, SjAsm, to make code for SMD's Z80, and you've seen the code.
Already tried both and they are both quite nice but they miss some features i really need (as include path option), thanks anywayPascal wrote:wladx is a good option too
http://www.smspower.org/dev/tools/wladx/
asmx do 68000 and z80, it's included in basiegaxorz setup
Last edited by Stef on Tue Apr 13, 2010 5:22 pm, edited 1 time in total.
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
I was lately experiencing some problems with my Z80 drivers and i just realized that SJAsm was doing very weird things compared to my previous assembler... anyway i can't use it anymore, it seems quite buggy :-/
So i'm just wondering if someone found a "new cool another Z80 assembler" which does support macro and include path option ? maybe the one you're using
So i'm just wondering if someone found a "new cool another Z80 assembler" which does support macro and include path option ? maybe the one you're using
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
I used to use zasm: http://k1.dyndns.org/Develop/projects/z ... ributions/
It doesn't have macros. I switched to sjasmplus, but I haven't seen anything weird yet. I'm using 1.0.7 RC7. Maybe your problem is an issue with a new version that broke something... or maybe I just haven't used whatever causes you problems.
It doesn't have macros. I switched to sjasmplus, but I haven't seen anything weird yet. I'm using 1.0.7 RC7. Maybe your problem is an issue with a new version that broke something... or maybe I just haven't used whatever causes you problems.
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
I was using sjasm, not sjasmplus... afaik the problem arrives only when you intent to use ORG directive. With my previous assembler (asmZ80, don't remember exactly which one exactly) i was able to choose to fill empty space with 0 in binary file which was very common. So i was able to do the following stuff :Chilly Willy wrote:I used to use zasm: http://k1.dyndns.org/Develop/projects/z ... ributions/
It doesn't have macros. I switched to sjasmplus, but I haven't seen anything weird yet. I'm using 1.0.7 RC7. Maybe your problem is an issue with a new version that broke something... or maybe I just haven't used whatever causes you problems.
Code: Select all
ORG $0
<boot_code>
...
jmp main
ORG $38
<interrrupt_code>
RTI
ORG $200
main
<main_code>
...
Then i tried to use the BLOCK directive to empty space fill but then if code is now correctly located the resulting obj file is truncated before the end of the actual code. For instance my main code_code should end at $450 but the bin file end at $350... so a part of my code isn't there.
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Um - you do use an END statement at the end of the code, right? Here's a snippet of my Z80 code where I use ORG and BLOCK:
ORG doesn't work for offsetting the current PC, but BLOCK does. I have END at the end of my Z80 code and I haven't had a problem with the code size being wrong.
I am using sjasmplus, not sjasm.
Code: Select all
; ########################### Code starts here ##############################
OUTPUT "z80_tadpcm.o80",t
ORG $0000
; basic init code
DI ; Disable ints
LD SP, $2000 ; Setup stack
IM $01 ; Set int mode 1
JP start ; Jump to start
; ########################## Interrupt handler ##############################
BLOCK $0038-$
interrupt
RETI
; ############################## Main code ##################################
BLOCK $0080-$
start
LD B, $10
XOR A
LD HL, $0040
clr_vars
I am using sjasmplus, not sjasm.
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
END statement ? ok so that is the reason why my code is truncated...You're doing is exactly what i want to do so i guess that's the problem, thanks a tons !Chilly Willy wrote:Um - you do use an END statement at the end of the code, right? Here's a snippet of my Z80 code where I use ORG and BLOCK:
...
Honestly i find that END statement a bit surprising, i really wonder why ajasm need that :-/ not a big problem anyway...
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
I'm not very familiar with these 8 bits assemblers, i did a bit of 6809 but a long long time ago and the assembler was really far from what we have now. Anyway problem solved, this is the pointChilly Willy wrote:It was pretty common for assemblers for 8-bit CPUs to require the end statement. It stopped being common on 16-bit systems. For example, all the 6502 assemblers I used to use all required END, but only one of the 68000 assemblers did, and it was optional on the rest.