I spent some time today looking at the CP/M manual' ASM chapter: https://www.tramm.li/i8080/cpm22-m.pdf. It explicitly states that labels are case insensitive (page 79) and that machine instructions can be used in the operand field (page 82). So what I thought were questionable constructs are actually valid according to that assembler. If your aim is to be as compatible with old sources as possible, maybe it's worth perusing.
You're right.. this code is not optimal. I've found a lot of questionable sources on altairclone.com that break your assembler. Another example is HEXLOAD.ASM which is trying to use the "ret" mnemonic to load the opcode for that instruction into L: lxi h,ret ;H=0, L=RET instruction I'm not sure if any of these things are really worth accomodating. I'm curious what assembler they're using that lets them get away with this. And yes, your assembler has been very helpful for experimenting with old sources...
You're right.. this code is not optimal. I've found a lot of questionable sources on altairclone.com that break your assembler. Another example is HEXLOAD.ASM which is trying to use the "ret" mnemonic to load the opcode for that instruction into L: lxi h,ret ;H=0, L=RET instruction I'm not sure if any of these things are really worth accomodating. I'm curious what assembler they're using that lets them get away with this. And yes, your assembler has been very helpful for experimenting with old sources...
You're right.. this code is not optimal. I've found a lot of questionable sources on altairclone.com that break your assembler. Another example is HEXLOAD.ASM which is trying to use the "ret" mnemonic to load the opcode for that instruction into H: lxi h,ret ;H=0, L=RET instruction I'm not sure if any of these things are really worth accomodating. I'm curious what assembler they're using that lets them get away with this. And yes, your assembler has been very helpful for experimenting with old sources...
You're right.. this code is not optimal. I've found a lot of questionable sources on altairclone.com that break your assembler. Another example is HEXLOAD.ASM which is trying to use the "ret" mnemonic to load the opcode for that instruction into H: lxi h,ret ;H=0, L=RET instruction I'm not sure if any of these things are really worth accomodating. I'm curious what assembler they're using that lets them get away with this. And yes, your assembler has been very helpful for experimenting with old sources...
Confirmed that http://altairclone.com/downloads/roms/DBL.ASM now assembles succesfully with a warning. I agree it may not be what most people want so a command-line switch is probably a good idea.
It's this version of dbl.asm that I modified not to wrap around: https://github.com/jblang/z80ctrl/blob/master/dbl.asm It still generates the all-zero lines after pulling down the patch. I think maybe the bug is only triggered if the last byte assembled falls exactly on FFFF. The original version of DBL.ASM from http://altairclone.com/downloads/roms/DBL.ASM does not reproduce this issue now and assembles with the warning as you stated in the other bug.
I filed new bugs for the other problems.