Failing to fix AMON to run as a .COM file under CP/M 2.2 ...

25 views
Skip to first unread message

Walt Perko

unread,
Jun 27, 2026, 3:49:56 PMJun 27
to Altair 8800
Hi, 

For my IMSAI-JAIR CBBS computer, I want to have an AMON.COM program that when I run it, the computer is running AMON at 0100h or another address in RAM so that when I'm done with AMON, I can jump to 0000h and get back into CP/M 2.2 again.  

I've been trying but failing over and over with ChatGPT, Gemini, CODEX and even Claude.  

Essentially, the IMSAI-JAIR CBBS computer isn't all that different from an Altair 8800, but the J.A.I.R. board is an SBC and does have a few different addresses to BOOT and I/O etc.  

IF an AMON.COM can be made to work, then anybody with a J.A.I.R. will have that extra tool to help them play or test stuff with their computer.  


.

Patrick Linstruth

unread,
Jun 27, 2026, 4:04:08 PMJun 27
to Altair 8800
The problem is probably due to AMON assuming there is a ROM in your computer, since AMON is usually in ROM. This is how AMON detects top of RAM where I think it puts its stack.

After the JAIR boots, there is no ROM, so I think AMON will loop forever looking for ROM, which it never finds (I can’t remember if it detects looping past FFFF).

AMON will need to be modified to not search for top of RAM and use RAM right above it for stack and storage.

ChatGPT should be able to handle that.

Altmon doesn’t have this complicated top-of-ram setup. It would probably run fine at 0100H.

Patrick

--
You received this message because you are subscribed to the Google Groups "Altair 8800" group.
To unsubscribe from this group and stop receiving emails from it, send an email to Altair-8800...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/Altair-8800/fad755d7-9261-480f-9dec-20226cd3243cn%40googlegroups.com.

Walt Perko

unread,
Jun 27, 2026, 4:44:22 PMJun 27
to Altair 8800
Hi, 

Both CODEX and Claude removed checking for RAM since the program was already running in RAM.   

They both removed stuff, re-addressed stuff, made some logical changes, but when I goto ASSEMBLE then LOAD into a AMON.COM ... the AMON.COM just seems to go into LALA Land and I need to ReBOOT the computer to get back into CP/M.  

I think my biggest hurdle is, I don't know 8080 assembly language to even look at the code to look for obvious problems.  



.

Walt Perko

unread,
Jun 27, 2026, 5:09:43 PMJun 27
to Altair 8800
Hi,  

This is the latest ASM I got from Claude ... part of the problem is even knowing which AMON.HEX file to give to A.I. to disassemble into a .ASM to study.  



.

AMON100H.ASM

Walt Perko

unread,
Jun 27, 2026, 5:19:13 PMJun 27
to Altair 8800
Hi, 

My mistake ... I gave both A.I. agents one of the the AMON.ASM files I downloaded from deramp ... 



.

AMON.ASM

Walt Perko

unread,
Jun 27, 2026, 8:24:04 PMJun 27
to Altair 8800
Hi,  

Started again with Claude explaining I have a J.A.I.R. SBC in the computer ... 

Got a new AMON100H.ASM file, loaded it into my IMSAI-JAIR computer, ran ASM then LOAD ... then I ran it and the short 5-second video shows the action and result where the console is stuck.  


A0>ASM AMON100H

CP/M ASSEMBLER - VER 2.0

P0E4F DBFF      MRCODE: in      SSWTCH          ;N: read sense switches

P               SKPSW:

P0E5D B7        SKPSWF: ora     a               ;null leader?

P0E61 CDC80E    LDSKIP: call    GETBYT          ;get another byte

P0E69 CDC80E    CLSKIP: call    GETBYT          ;get a loader byte

P0E70 CDC80E    RCHUNT: call    GETBYT          ;hunt for sync character

P0E82 7A        LRLOOP: mov     a,d             ;d=RAM Execution page

P0EA2 3E4D      MERDON: mvi     a,MERMSG        ;memory error message

P0EA4 1D        ERDONE: dcr     e               ;PROM disabled?

P0EAF D311      ERHANG: out     CONTXD          ;Console output

P0EB4 EE44      CHEKGO: xri     ALTGOR XOR ALTPLR ;EOF record sync byte?

P0EC2 CDC80E    GETWRD: call    GETBYT

P               GETBYT:

P               MRCEND:

P010C =         SUBEND  equ     $

P0ED4 01E00E    CDBL:   lxi     b,GODBL         ;return address

P               BOCMD:

P               GODBL:

P0EDE AF        WAITEN: xra     a               ;boot from disk 0

P0EF4 D309      SEEKT0: out     DCTRL           ;issue step command

P0EF7 2B        T0DELY: dcx     h               ;(5)

P0EFD DB08      WSTEP:  in      DSTAT           ;wait for step to complete

P0F0B DB09      CKDSK1: in      DSECTR          ;Read the sector position

P0F14 DB09      CKDSK2: in      DSECTR          ;Read the sector position

P0F1A DB09      CKDSK3: in      DSECTR          ;Read the sector position

P0F2B 3E10      NXTSEC: mvi     a,RETRYS        ;(7)Initialize sector retries

P0F2D D1        RDSECT: pop     d               ;(10)get DSKBUF address

P0F30 DB09      FNDSEC: in      DSECTR          ;(10)Read the sector position

P0F3B 3E4F      OVRERR: mvi     a,OERMSG        ;(7)overlay error message

P0F45 DB08      DATLUP: in      DSTAT           ;(10)Read the drive status

P0F54 1A        MOVLUP: ldax    d               ;(7)get sector buffer byte

P0F8D 3E80      FDEXEC: mvi     a,DDISBL        ;Disable floppy controller

P0F95 3E04      BADSEC: mvi     a,HEDLOD        ;Restart Minidisk 6.4 uS timer

P0F9F 3E43      CSMERR: mvi     a,CERMSG        ;checksum error message

P0FA2 3E4D      MEMERR: mvi     a,MERMSG        ;memory error message

P0FA4 CD8B01    RPTERR: call    PRINTA          ;print the ASCII error code

P0FAB CD4006    HDERR:  call    ILPRNT

P0FBD 3E7B      FNDBUF: mvi     a,DSKBUF

P0FBF E3        HRMPAG: xthl                    ;save hl, get return address

P0FC1 210000    RAMPAG: lxi     h,0

P0FC7 E3        GETHEX: xthl                    ;save hl, put ret address in hl

P0FCC CD3B06    CMDERR: call    CILPRT          ;returns Z flag cleared

P010C =         DBLEND  equ     $

0FD3

01AH USE FACTOR

END OF ASSEMBLY

 

A0>DIR AMON*.*

A: AMON100H ASM : AMON100H PRN : AMON100H HEX

A0>LS AMON*.*

Name    Ext Bytes   Name    Ext Bytes   Name    Ext Bytes   Name    Ext Bytes

AMON100HASM  132K | AMON100HHEX   12K | AMON100HPRN  200K

3 File(s), occupying 344K of 8168K total capacity

434 directory entries and 7088K bytes remain on A:

A0>LOAD AMON100H

 

FIRST ADDRESS 0100

LAST  ADDRESS 0FD2

BYTES READ    0ED3

RECORDS WRITTEN 1E

 

 

A0>LS AMON*.*

Name    Ext Bytes   Name    Ext Bytes   Name    Ext Bytes   Name    Ext Bytes

AMON100HASM  132K | AMON100HCOM    4K | AMON100HHEX   12K | AMON100HPRN  200K

4 File(s), occupying 348K of 8168K total capacity

433 directory entries and 7084K bytes remain on A:

A0>



.

Mike Douglas

unread,
Jun 27, 2026, 8:30:24 PMJun 27
to Altair 8800
Your assembly is full of phasing errors. The .hex output file is not valid.

Mike D

Walt Perko

unread,
Jun 27, 2026, 8:38:20 PMJun 27
to Altair 8800
Hi,  

Yeah, I give up ... I don't think Claude is smart enough to convert AMON.ASM to work on the J.A.I.R. board.   

Somehow I wonder if the only thing I really need is the console port address changed, then assemble the program and let it run at F800h ... I don't know if that would be a conflict with the J.A.I.R. ROM though.  



.

Mike Douglas

unread,
Jun 27, 2026, 8:51:03 PMJun 27
to Altair 8800
If you want it to be a CP/M program, it really should perform console and transfer port I/O using  BDOS calls, not direct I/O to particular physical devices.

Mike D

Walt Perko

unread,
Jun 27, 2026, 9:00:35 PMJun 27
to Altair 8800
Hi, 

I was  hoping I could go from CP/M 2.2 into AMON so I could load little HEX programs into RAM to run tests on my IMSAI-JAIR computer to try and figure out why the BOOT menu disappeared after adding a 88-2SIOR1 board addressed at 14h/15h and why I can't use the two serial I/O ports on the 88-2SIOR1 board from CP/M MBASIC.  

The MONJUMP.COM program works great on my Altair 8800c computer ... I go from CP/M back into the AMON monitor ... when I'm done I can just EX 0000h and I'm back into CP/M or I can ReBOOT at F800h after I swap out a .DSK file on the ESP32 FDC+ Wifi adapter.  

That works so well, now I want a similar setup on the IMSAI-JAIR where I can keep the CP/M warm BOOT at address 0000h but run AMON above 0100h and little programs in RAM that won't conflict with the CP/M warm BOOT.  



.

Reply all
Reply to author
Forward
0 new messages