Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.apple2.programmer > #5772
| From | ol.sc@web.de (Oliver Schmidt) |
|---|---|
| Newsgroups | comp.sys.apple2.programmer |
| Subject | Re: 6502 assembler for Unix with multiple ORG support |
| Date | 2021-03-20 15:14 +0000 |
| Message-ID | <s353gf$ad2$1@solani.org> (permalink) |
| References | <V5-dndEUtO4U3Mn9nZ2dnUU7-fHNnZ2d@giganews.com> |
Hi,
>I would like to know if a 6502 assembler for modern Unix systems supports
>multiple ORG requests, so that I can force certain routines at fixed
>addresses, and insert 0's to fill any space. For example:
>
> org $300
> jsr rout320
> rts
> org $320
>rout320
> rts
>
>And this will place the JSR and RTS at $300-303, and then 00's and then place
>an RTS at $320. I want the final binary result to be:
>
>20 20 03 60,00 00 00 00,00 00 00 00,00 00 00 00,60
>
>and be exactly 33 bytes. If I make an ORG request which cannot work (say,
>replace the "org $320" with "org $303", which already contains the previous
>RTS) I will accept either a warning or an error, but it cannot be silent.
The seasoned cc65 user would accomplish this with...
demo.s contains:
.segment "s300"
jsr rout320
rts
.segment "s320"
rout320:
rts
demo.cfg contains:
memory {
m: file = %O, start = $300, size = $FFFF;
}
segments {
s300: load m, start = $300;
s320: load m, start = $320;
}
Build it with:
cl65 -t none -C demo.cfg demo.s
It for sure complains if things don't fit.
>I'm willing to accept alternative syntax using DS notation:
>
> org $300
> jsr rout320
> rts
> ds $320-*
>rout320
> rts
>
>where DS means insert $320-current_pc number of 00 bytes. I just need this to
>be an error if it overflows, and not 65535 blanks instead.
The casual ca65 user would accomplish this with...
demo.s contains:
.org $300
jsr rout320
rts
.res $320-*
rout320:
rts
Built it with:
cl65 -t none demo.s
It for sure complains if things don't fit.
>So, does your favorite 6502 assembler support the above?
Yes, see above.
Regards,
Oliver
Back to comp.sys.apple2.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread
6502 assembler for Unix with multiple ORG support kegs@provalid.com (Kent Dickey) - 2021-03-19 01:15 -0500
Re: 6502 assembler for Unix with multiple ORG support I am Rob <gids.rs@sasktel.net> - 2021-03-18 23:58 -0700
Re: 6502 assembler for Unix with multiple ORG support I am Rob <gids.rs@sasktel.net> - 2021-03-19 00:18 -0700
Re: 6502 assembler for Unix with multiple ORG support Michael J. Mahon <mjmahon@aol.com> - 2021-03-19 03:13 -0500
Re: 6502 assembler for Unix with multiple ORG support kegs@provalid.com (Kent Dickey) - 2021-03-19 14:36 -0500
Re: 6502 assembler for Unix with multiple ORG support Michael Pohoreski <michael.pohoreski@gmail.com> - 2021-03-19 13:19 -0700
Re: 6502 assembler for Unix with multiple ORG support Antoine Vignau <ntn.vignau@gmail.com> - 2021-03-20 08:38 -0700
Re: 6502 assembler for Unix with multiple ORG support Michael J. Mahon <mjmahon@aol.com> - 2021-03-21 00:13 -0500
Re: 6502 assembler for Unix with multiple ORG support David Schmidt <schmidtd@my-deja.com> - 2021-03-19 09:57 -0400
Re: 6502 assembler for Unix with multiple ORG support Michael Pohoreski <michael.pohoreski@gmail.com> - 2021-03-19 07:59 -0700
Re: 6502 assembler for Unix with multiple ORG support qkumba <peter.ferrie@gmail.com> - 2021-03-19 09:27 -0700
Re: 6502 assembler for Unix with multiple ORG support kegs@provalid.com (Kent Dickey) - 2021-03-19 15:08 -0500
Re: 6502 assembler for Unix with multiple ORG support Michael Pohoreski <michael.pohoreski@gmail.com> - 2021-03-19 09:34 -0700
Re: 6502 assembler for Unix with multiple ORG support ol.sc@web.de (Oliver Schmidt) - 2021-03-20 15:14 +0000
csiph-web