Table of Contents

Link spam

Here's some links I happened to have lying around. This may become a regular type of contribution to this blog.

b16cat and echoify

I disassembled your b16cat program, converted the disassembly to an lDebug script, rebuilt it several times, and added a tool (echoify) that can automatically generate the instructions of what to type for the echo command.

I also fixed two problems: First, the HP 95LX didn’t allow me to pass along a Control-P to the echo command, so the uses of that (codepoint U+0010) had to go. I added Control-P to the problem values to detect in my echoify program. Then I modified the debugger script to avoid those.

Second, it turns out function 21.02 will expand tabs (U+0009) even when redirecting the b16cat.com program’s output to a file. (Again, on the HP 95LX, running its MS-DOS 3.22 from ROM.) So I modified b16cat to use function 21.40 (to bx = 1 as stdout handle, with cx = 1 as length) which preserves all binary values exactly.

It’s all at https://hg.pushbx.org/ecm/b16cat

This is how to use it:

dosemu -K "$PWD" -E "ldebug /c='y b16cat.sld'" -dumb
gcc -O2 echoify.c -o echoify
./echoify b16cat.com

lDebug is my debugger, available from my website at https://pushbx.org/ecm/web/#projects-ldebug

Comment by E. C. Masloch, 2022-09-11, at https://palmtop.cosi.com.pl/2014/03/15/dhs-hacks-for-the-portfolio/#comment-100852

This links to the b16cat repo, which also contains a very good example of how to use lDebug as an ersatz assembler. Note the uses of Vxx and AAO variables as well as the expression evaluator in the assembler (invoked by using parentheses in the operands). This allows to automate forwards and backwards branch targets without having to enter the numbers manually or with another scripting language. Also note the support for comments in the assembler and debugger command line, as well as supporting dot lines to exit assembler mode (instead of the oft misinterpreted empty line).

a 100
 xor dx, dx
 mov bl, 11
 dec bx
 .
r v0 := aao
a
 mov ah, bl
 shr ah, 1
 int 21
 test al, 40
 .
r v10 := aao
a
 jnz 180
 test al, 20
 jz (v0)
 test al, bl
 .
r v12 := aao
a
 jnz 180
 test al, 01
 .
r v13 := aao
a
 jnz 180
 push bx
 push dx
 mov dx, sp	; -> dl byte on stack
 xor bx, bx
 inc bx		; = 1 (stdout)
 mov cx, bx	; = 1 (one byte)
 mov ah, 40
 int 21
 pop dx
 pop bx
 xor dx, dx
 jmp (v0)
 .
r v1 := aao
a
 add al, 05
 add al, 04
 inc cx		; padding to affect jump at v12
 .
r v2 := aao
a
 and al, 0F
 mov cl, 4
 shl dx, cl
 xor ah, ah
 add dx, ax
 jmp (v0)
 .
r v3 := aao
a
 int 20
 nop
 .
r bxcx := aao - 100
; Now fix up the forward jumps.
a v10
 jnz (v1)
 .
a v12
 jnz (v2)
 .
a v13
 jnz (v3)
 .
n b16cat.com
w 100
q

pcjs.org running DOS with a german keyboard problems

For example, I'm loading the default system (COMPAQ Personal Computer MS-DOS version 3.31) from https://www.pcjs.org/configs/pcx86/machine/compaq/deskpro386/vga/2048kb/machine.xml

I have a PS/2 keyboard connected to a Debian Linux 11-ish box, running Firefox "78.11.0esr (64-bit)" within a MATE Desktop Environment session. The keyboard has a german DIN T1 layout printed on its keycaps. (No Euro sign on the E key, but other than that standard.) In Debian I am using the "German German (no dead keys)" layout.

Some of the special keys do not work (on the DOS command line) as expected.

https://github.com/jeffpar/pcjs/issues/55

Remainder of the report elided, it lists all special key inputs without loading keyb gr.

bugzilla.nasm.us is down

Hi list,

yesterday I noticed that bugzilla.nasm.us is down. It appears to be this way from multiple independent clients. Please fix it!

Regards, ecm

https://lists.nasm.us/archives/nasm-devel/2022-November/000065.html