Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"When the going gets weird, the weird turn pro..." -- Hunter S. Thompson


devel / comp.os.cpm / Assembly subroutines vs macros as reusable building blocks

SubjectAuthor
* Assembly subroutines vs macros as reusable building blocksPaolo Amoroso
`- Re: Assembly subroutines vs macros as reusable building blocksDouglas Miller

1
Assembly subroutines vs macros as reusable building blocks

<d612d394-c2a9-4954-a03f-443821f58123n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:a05:6214:29c3:: with SMTP id gh3mr24798282qvb.44.1637936507579;
Fri, 26 Nov 2021 06:21:47 -0800 (PST)
X-Received: by 2002:aca:581:: with SMTP id 123mr23696295oif.13.1637936507227;
Fri, 26 Nov 2021 06:21:47 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Fri, 26 Nov 2021 06:21:47 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=5.94.139.184; posting-account=uOUOHg4AAADo8AO9B3SI43ekV3AA6lU0
NNTP-Posting-Host: 5.94.139.184
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d612d394-c2a9-4954-a03f-443821f58123n@googlegroups.com>
Subject: Assembly subroutines vs macros as reusable building blocks
From: paolo.am...@gmail.com (Paolo Amoroso)
Injection-Date: Fri, 26 Nov 2021 14:21:47 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 7
 by: Paolo Amoroso - Fri, 26 Nov 2021 14:21 UTC

I'm reading the CP/M Assembly development books "CP/M Assembly Language Programming" by Ken Barbier and "Mastering CP/M" by Alan Miller, which are interesting also for their their different approaches to reusable code building blocks. Barbier builds a library of subroutines, Miller focuses on macros..

Back in the day, what building blocks were more common or recommended, macros or subroutines? What were the best practices?

Re: Assembly subroutines vs macros as reusable building blocks

<48fc6298-1ba7-40b8-9bb0-413b63af5bc3n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:a05:6214:2427:: with SMTP id gy7mr25223239qvb.38.1637940581635;
Fri, 26 Nov 2021 07:29:41 -0800 (PST)
X-Received: by 2002:a05:6830:201a:: with SMTP id e26mr27673125otp.130.1637940581407;
Fri, 26 Nov 2021 07:29:41 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Fri, 26 Nov 2021 07:29:41 -0800 (PST)
In-Reply-To: <d612d394-c2a9-4954-a03f-443821f58123n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=96.42.194.246; posting-account=5XW4vgoAAADMD8xScYja8bdzAXoYQrTS
NNTP-Posting-Host: 96.42.194.246
References: <d612d394-c2a9-4954-a03f-443821f58123n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <48fc6298-1ba7-40b8-9bb0-413b63af5bc3n@googlegroups.com>
Subject: Re: Assembly subroutines vs macros as reusable building blocks
From: durgadas...@gmail.com (Douglas Miller)
Injection-Date: Fri, 26 Nov 2021 15:29:41 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 10
 by: Douglas Miller - Fri, 26 Nov 2021 15:29 UTC

Some reasons that I would shy away from macros were that the DRI assemblers did not cleanly show the macros in the listing file (I think "$*MACRO" got close, but was still messy), Macros inline the code so can lead to unexpectedly large binaries, and the DRI macro facility was never quite as robust as I wanted. But, I did use macros plenty, and certainly leveraged the Z80.LIB macros extensively. It's my opinion that macros have a place, as do subroutines, and so it's just a matter of picking the right approach for the situation. There are even hybrid approaches, where macros "soften" the function calls but subroutines avoid code bloat (a macro handles/hides the setup for the subroutine call, but there is still a subroutine library required) - more akin to a high-level-language.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor