Subject: RE: H89 disk transfer program

From: "Dwight K. Elvey" <[email-masked]>
Date: Tue Apr 15 13:11:19 2003

Hi
 Here is the code I have so far. I've shortened it a
bunch but I don't think I can get it much shorter.
I desided not to use any special Z80 instructions
because I want this to work with the H8's as well
( these are 8080 box's but can run HDOS ). It is
down to about 42 ( decimal ) bytes. If anyone can
remove some more that would be great. I'm using
the over writing of the jump address at the end
of the code to stop loading and begin using the
main down loader. This saved quite a bit of code
but it means that I need to load the main loader
backwards. This is a pain but not that big of a
deal, compared to typing in a lot of bytes. For this
code, if someone thinks of some other method that
does something like self modifying code, I'm
game to that. This is a boot strap and the key is
being small. There are no other rules.
 I thought it would be a good idea to also have the
ability in the main loader to save the main loader to
disk as a bootable image. This would make it easier
because one wouldn't need to keep typing in the first
bootstrap loader every time one got more images to load,
like a week later.
Dwight

 BOOTSTRP.ASM
 
; 42 BYTE BOOTSTRAP LOADER WITH INIT FOR 8250
; INTENDED FOR THE H89 BUT MAY ASLO WORK ON H8.

        ORG 2300H
LDR:    XRA A
        OUT LCNTL       ; LINE CONTROL
        OUT IER         ; NO INTERRUPTS
        OUT MCNTL       ; INIT MODEM CONTROL
        DCR A           ; SHOULD BE 'MVI A, 80H' BUT 0FFH OK?
        OUT LCNTL
        MVI A, 0CH      ; 9600 BAUD
        OUT DVL
        XRA A
        OUT DVH
        MVI A, 07H      ; 8 BIT 2 STOPS
        OUT LCNTL
        IN LSTAT
        IN RX           ; CLEAR ANY JUNK
        LXI H, 2400H    ; DEPENDS ON SIZE (TO BE DETERMINED)
LDR1:   IN LSTAT
        ANI 01
        JZ LDR1         ; WAIT FOR CHAR
        IN RX
        MOV M,A
        DCX H
        JMP LDR         ; ADDRESS TO BE OVER WRITTEN BY CODE LOADED

---

From: Vintage Computer Festival <[email-masked]>
Date: Wed Apr 16 10:37:00 2003

My knowledge of 8080 assembly is totally weak, but here I go:

>         DCR A           ; SHOULD BE 'MVI A, 80H' BUT 0FFH OK?

Why not move this up so you don't have to repeat the XRA A?  Or does this
have to be here?

>         JMP LDR         ; ADDRESS TO BE OVER WRITTEN BY CODE LOADED

How does this work if the address is two bytes but the code is loaded one
byte at a time?

-- 

Sellam Ismail                                        Vintage Computer Festival
------------------------------------------------------------------------------
International Man of Intrigue and Danger                http://www.vintage.org

 * Old computing resources for business and academia at www.VintageTech.com *