Paolo Amoroso's Journal

Tech projects, hobby programming, and geeky thoughts of Paolo Amoroso

Every few days, Telegram notifies me one of my contacts joined the platform. Aside from other Google enthusiasts, only 3-4 of my contacts are still on Google Chat.

This is emblematic of the complete failure of Google in the messaging space.

#Google

Discuss... Email | Reply @amoroso@fosstodon.org

For years Google encouraged Android developers to pretty please support tablet screens.

Nothing happened. Then Google repeatedly reported Chromebook shipments and Android app usage on Chrome OS were skyrocketing. Again, crickets. Google didn't lead by example either.

The carrot didn't work, so Google is going with the stick. The Play Store will change search rankings and recommendations to prioritize apps with tablet and large screen support, and warn when installing apps that don't meet these quality standards.

About damn time.

#Android

Discuss... Email | Reply @amoroso@fosstodon.org

I love the Discourse discussion forum platform. It's fast and smooth, has a clean design, works nicely on mobile, and supports Markdown.

But Discourse is missing by design a feature that gets in the way of my workflow: it doesn't allow marking read in bulk all unread messages. This makes it difficult to keep track of what I want to see and skip what I'm not interested in.

#misc

Discuss... Email | Reply @amoroso@fosstodon.org

I extended the Suite8080 assembler to allow the ds directive to take a label as an operand. The label, which must be defined before use, may be in uppercase. I also broke into subsections the section of the documentation about the assembler limitations, as well as mentioning the limitations of org and ds.

This hopefully concludes the work to make the assembler accept uppercase identifiers such as instruction mnemonics, labels, and constants.

Suite8080 is a suite of Intel 8080 Assembly cross-development tools I'm writing in Python.

#Suite8080 #Python

Discuss... Email | Reply @amoroso@fosstodon.org

My work on Suite8080 is making me rediscover the Unix M4 macro processing language.

Suite8080, a suite of Intel 8080 Assembly cross-development tools I'm writing in Python, includes also an assembler. I designed the latter to optionally read from the standard input, a feature that gives for free macro processing via a separate tool like m4. I can feed macro Assembly source to m4 and pipe the expanded output into the assembler.

The M4 language is a good choice thanks to its power and ubiquity on POSIX systems.

However, m4 is an obscure tool with a learning curve made steep by the unintuitive quoting and expansion rules. There are few resources and no books or tutorials. The very few code samples are abstract, short, and formatted with little or no whitespace and indentation, which doesn't help readability.

After extensive online research, I put together a list of the best learning and reference resources:

#Linux #development

Discuss... Email | Reply @amoroso@fosstodon.org

Bob Nystrom, a Google software engineer who works on the Go programming language, self-published two software development books, Game Programming Patterns and Crafting Compilers.

The books, available in digital format and in print, are deservingly popular. They cover interesting topics, provide clear explanations and code, are beautifully designed, and can be read online for free.

But the meta level is as interesting as the creative works themselves.

Bob posted to his blog a series of articles describing his tech book publishing process. These long and detailed posts are a fascinating read, a peek behind the curtain of running two complex tech writing projects.

The posts share every aspect of the work that went into the books.

The description of the custom-built toolchain and the workflow for formatting the Markdown manuscript is geeky. This involved combining the text and sample code, taming the arcane Adobe InDesign, and producing both the digital and print versions of the books.

Bob goes into a lot of detail also on his writing routine. For years he had the discipline to write every single day despite the stress of a demanding job, family life, personal tragedies, and setbacks.

Finally, the posts discuss the business and marketing side of the publishing projects. Bob reports on the book launches, the promotion strategy, and the early sales.

The experience of Bob, who declined a traditional publishing deal to go full indie, is a valuable resource for self-published technical authors.

#selfpublishing

Discuss... Email | Reply @amoroso@fosstodon.org

While reporting my challenging experience with picking a blogging platform, I incorrectly assumed Silvrback was unmaintained. I hadn't heard back from my email inquiry to them and the latest activity on their Twitter profile dated back to two years earlier.

Silvrback's founder, Kermit Kuehn, later reached out to me to confirm the platform is still maintained and supported.

I updated my previous post. I'm glad Silvrback is alive and I recommend checking it out. Although I'm happy with with my choice of Write.as, Silvrback was a close runner up.

#blogging

Discuss... Email | Reply @amoroso@fosstodon.org

Encouraged by the emuStudio developer, I donated to the project an Intel 8080 Assembly demo. It's a modified version of Twirl, my program to display a twirling bar animation.

Here's the code I contributed:

; Twirling bar animation by Paolo Amoroso <info@paoloamoroso.com>
;
; Runs on an Altair 8800 with an ADM-3A terminal. Press any key
; to interrupt the program.


FRAMES    equ  8              ; Number of animation frames

CLS       equ  1ah            ; ADM-3A escape sequence
HOME      equ  1eh            ; ADM-3A escape sequence
STATUS    equ  10h            ; Input status port
READY     equ  1              ; Character ready status mask


          mvi  a, CLS         ; Clear screen
          call putchar

loop:     lxi  h, ANIM        ; Initialize frame pointer...
          mvi  b, FRAMES      ; ...and count

loop1:    mvi  a, HOME        ; Go to home
          call putchar

          mov  a, m           ; Print current frame
          call putchar

          push psw
          in   STATUS
          ani  READY          ; Key pressed?
          jnz  exit           ; Yes
          pop  psw

          inx  h
          dcr  b
          jnz  loop1

          jmp  loop


exit:     pop psw             ; Clear psw left on stack
          hlt


ANIM:     db   '|/-\|/-\'     ; 8 frames


include	'include\putchar.inc'

Unlike the original code, which I designed to run on emuStudio and be easy to port to CP/M, this new version is intended to run only on emuStudio. This was an occasion to simplify the code.

The main difference is the escape codes for VT100-compatible terminals on CP/M are strings, whereas the ADM-3A codes Twirl sends on emuStudio are single bytes. This allows the program to print the codes with the putchar library subroutine instead of putstr. Doing away with putstr no longer requires saving and restoring the HL register pair in the calling sequences.

Finally, I added code to terminate the program if a key is pressed.

#intel8080 #Assembly

Discuss... Email | Reply @amoroso@fosstodon.org

I have fond memories of COHERENT, the first Unix system I could afford on my own PC. Its manual made me grok Unix and its philosophy.

Developed by Mark Williams Company, COHERENT was a clone of System 7 Unix that run on PCs with at least an 80286 CPU. The BYTE magazine ads of this $99.95 Unix, and what I read about the operating system, had intrigued me for the great value. The product was affordable even for a computer enthusiast and hobby programmer like me.

I bought COHERENT around 1991 and installed it on a 386 laptop with a 40 MB HD, reserving a 20 MB partition for COHERENT and the rest for DR-DOS.

I loved the product. COHERENT worked beautifully, was a lot of fun, and I used it daily for a couple of years. It was my first opportunity to explore Unix.

I loved COHERENT's manual too. I read it front-to-back several times and browsed it frequently. That thick book gave me the first comprehensive, clear, coherent (no pun intended) introduction to Unix.

I valued the manual so much because, back then, it was difficult to acquire technical books and software documentation in my country, Italy. I had only limited access to foreign mail-order vendors of technical publications.

COHERENT's manual had everything I wanted to know. I often browsed it just to serendipitously come across something interesting.

My favorite parts were the awk tutorial, which made me fall in love with the language, and the coverage of uucp, which unlocked my access to email. I got a modem and the COHERENT manual helped me set up uucp to read and send email with elm.

It was a joy to discover the full COHERENT manual is available online.

Robert Swartz, the founder of Mark Williams Company, gave permission to publish the document. Steve Ness, who was in charge of documentation in the very early days of COHERENT, reformatted and posted the manual. I got in touch with Steve to thank him for the many pleasant hours I spent with his work.

In the early 1990s I bought additional COHERENT software from Mark Williams Company, such as the device driver SDK and X Window, and possibly also Promula Fortran. I never got to use that software much, as the SDK was challenging and my PC didn't have enough RAM for X Window.

By then Linux was already too prominent not to notice. I eventually switched to Linux, which became my desktop operating system for the next couple of decades.

#retrocomputing

Discuss... Email | Reply @amoroso@fosstodon.org

Once I fixed the Suite8080 assembler to let db accept uppercase symbols, I was ready to work on a similar fix for dw.

But I got dw uppercase support for free as a side effect of canonicalizing symbols to lowercase when adding 16-bit words to the symbol table, as dw already converted symbols to lowercase before checking for inclusion in the table. This unlocked uppercase symbol support, again for free, for most other 8080 instructions that take an address operand such as lhld, shld, lda, sta, jmp, and more.

#Suite8080 #Python

Discuss... Email | Reply @amoroso@fosstodon.org

Enter your email to subscribe to updates.