Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Gravity is a myth, the Earth sucks.


devel / comp.os.cpm / Re: much enhanced z-80 assembler now available

SubjectAuthor
* Re: much enhanced z-80 assembler now availableJonathan Harston
`- Re: much enhanced z-80 assembler now availableGeorge Phillips

1
Re: much enhanced z-80 assembler now available

<4fa2d9e6-2a30-4e24-87f4-d845c2a29cf1n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4494&group=comp.os.cpm#4494

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:a05:6214:14f2:b0:64a:683a:2b76 with SMTP id k18-20020a05621414f200b0064a683a2b76mr20922qvw.7.1694143529863;
Thu, 07 Sep 2023 20:25:29 -0700 (PDT)
X-Received: by 2002:a05:6a00:9a0:b0:68e:3c6d:da62 with SMTP id
u32-20020a056a0009a000b0068e3c6dda62mr505488pfg.6.1694143529340; Thu, 07 Sep
2023 20:25:29 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!news.in-chemnitz.de!news2.arglkargh.de!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Thu, 7 Sep 2023 20:25:28 -0700 (PDT)
In-Reply-To: <9cc0e84f-ab30-45b4-9402-0f963b2a2b22@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=80.195.187.235; posting-account=jgPW4gkAAACE_VxPxIZ8VykZc96-9sT_
NNTP-Posting-Host: 80.195.187.235
References: <dfb449e3-9f90-421c-afa5-692e0cafab09@googlegroups.com>
<7642c366-22bd-4075-8a42-601a2e99d263@googlegroups.com> <TIadnY_OVusf-LrPnZ2dnUVZ_qqdnZ2d@giganews.com>
<8d0b975a-eae8-4187-be3e-1d88bf074728@googlegroups.com> <l0g35v$8sp$1@dont-email.me>
<1f077254-e679-47b0-ab6e-8d40006ade2e@googlegroups.com> <l0hhe9$hfq$1@dont-email.me>
<l0hjlr$rqp$1@dont-email.me> <0fa27cfa-8d62-4b58-b09c-ed67dd791c81@googlegroups.com>
<l0i15q$vlq$1@dont-email.me> <c678e9ff-91eb-4222-b8c0-3d2072185cbf@googlegroups.com>
<9cc0e84f-ab30-45b4-9402-0f963b2a2b22@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4fa2d9e6-2a30-4e24-87f4-d845c2a29cf1n@googlegroups.com>
Subject: Re: much enhanced z-80 assembler now available
From: jgh...@mdfs.net (Jonathan Harston)
Injection-Date: Fri, 08 Sep 2023 03:25:29 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Jonathan Harston - Fri, 8 Sep 2023 03:25 UTC

Is there a way to use strings in expressions in ZMAC, so I can do
the following more efficiently:

VersDD equ 06
VersMM equ 11
VersYY equ 2000

DEFB '0'+(VersDD / 10)
DEFB '0'+(VersDD MOD 10)
DEFB "-"
if VersMM=1
DEFB 'Jan'
endif
if VersMM=2
DEFB 'Feb'
endif
if VersMM=3
DEFB 'Mar'
endif
if VersMM=4
DEFB 'Apr'
endif
etc....

In my PDP11 assembler I'd do:
VersDD: equ 06
VersMM$: equ "Nov"
VersYY: equ 2000
DEFM '0'+(VersDD/10),'0'+(VersDD MOD 10)
DEFM "-"+VersM$+"-"+STR$(VersYY)

Re: much enhanced z-80 assembler now available

<a6c6b161-ef3a-4594-9378-4f12c6004972n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4503&group=comp.os.cpm#4503

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:a05:622a:1745:b0:412:2646:9995 with SMTP id l5-20020a05622a174500b0041226469995mr205608qtk.10.1694452001673;
Mon, 11 Sep 2023 10:06:41 -0700 (PDT)
X-Received: by 2002:a17:903:64f:b0:1bc:7c69:925c with SMTP id
kh15-20020a170903064f00b001bc7c69925cmr3484859plb.10.1694452001381; Mon, 11
Sep 2023 10:06:41 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Mon, 11 Sep 2023 10:06:40 -0700 (PDT)
In-Reply-To: <4fa2d9e6-2a30-4e24-87f4-d845c2a29cf1n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=24.80.80.87; posting-account=tJX0kAoAAACxHvEUAb7F6FVw4XmLeIbL
NNTP-Posting-Host: 24.80.80.87
References: <dfb449e3-9f90-421c-afa5-692e0cafab09@googlegroups.com>
<7642c366-22bd-4075-8a42-601a2e99d263@googlegroups.com> <TIadnY_OVusf-LrPnZ2dnUVZ_qqdnZ2d@giganews.com>
<8d0b975a-eae8-4187-be3e-1d88bf074728@googlegroups.com> <l0g35v$8sp$1@dont-email.me>
<1f077254-e679-47b0-ab6e-8d40006ade2e@googlegroups.com> <l0hhe9$hfq$1@dont-email.me>
<l0hjlr$rqp$1@dont-email.me> <0fa27cfa-8d62-4b58-b09c-ed67dd791c81@googlegroups.com>
<l0i15q$vlq$1@dont-email.me> <c678e9ff-91eb-4222-b8c0-3d2072185cbf@googlegroups.com>
<9cc0e84f-ab30-45b4-9402-0f963b2a2b22@googlegroups.com> <4fa2d9e6-2a30-4e24-87f4-d845c2a29cf1n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a6c6b161-ef3a-4594-9378-4f12c6004972n@googlegroups.com>
Subject: Re: much enhanced z-80 assembler now available
From: gp2...@gmail.com (George Phillips)
Injection-Date: Mon, 11 Sep 2023 17:06:41 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2598
 by: George Phillips - Mon, 11 Sep 2023 17:06 UTC

On Thursday, September 7, 2023 at 8:25:30 PM UTC-7, Jonathan Harston wrote:
> Is there a way to use strings in expressions in ZMAC, so I can do
> the following more efficiently:

Maybe it would be enough to just do the month as a macro?

VersMM macro
defm 'Mar'
endm

DEFM '0'+(VersDD/10),'0'+(VersDD MOD 10),'-'
VersMM
DEFM '-'

Or use irp to do the month number to name lookup in a cleaner fashion:

VersMM equ 7
m1=0
irp s1,<Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec>
if VersMM == m1
defm '&s1'
endif
m1++
endm

For the year you can stringify it doing something like this:

VersYY equ 2000

str macro sx
defm '&sx'
endm

str %VersYY

Though I guess the answer to your question is that zmac doesn't have string variables and you need to use macros to get the same kind of manipulation.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor