On 3/16/2017 11:53 PM, Robert Armstrong wrote:

>Under VMS, PFN map a section to the EEPROM, copy it to normal memory & write it to disk.

Um, fair enough. I don’t suppose someone has a program already written to do this?

I could have easily done that about ten or fifteen years ago, and in theory I still can, but it’ll probably take an afternoon with the VMS manuals to remember how J

Here's an example, which I wrote for the MicroVAX. Took me a bit to find this.

The program creates a file called ROM.EXE and copies the boot ROM into that file. Note the " vbn=#<^X20040000/512>" line - that says that the ROM is mapped into physical address 20040000 on that system. Likely different for others. Size of the ROM is calculated by the "page_count" variable.
    -Rick

        .title  copyrom - Copy the rom
        .psect  data    rd, wrt, nopic, noshr, noexe, long
        .library        /sys$Library:lib/
        $iouv2def
        $secdef
        .psect  data    rd, wrt, nopic, noshr, noexe, long

        page_count = ^X10000/^X200

file_fab:       $FAB    ALQ=page_count,-
                        FAC=<GET,PUT>,-
                        FNM=<ROM.EXE>,-
                        FOP=UFO

p1_space:       .quad   0

copy_sec_base:  .long   0
                .long   0

rom_sec_base:   .long   0
                .long   0
buf_descr:      .long   80
                .address        buffer
buffer:         .blkb   80

format:         .ascid  /Checksum is !XW/

        .psect  code    rd, nowrt, pic, noshr, exe, long

        .entry  go, ^m<>

        $create fab=file_fab
        blbs    r0, 10$
        ret

10$:    $crmpsc_s       inadr=p1_space,-
                        retadr=copy_sec_base,-
flags=#<sec$m_expreg!sec$m_wrt>,-
                        chan=file_fab+fab$l_stv
        blbs    r0, 20$
        ret

20$:    $crmpsc_s       inadr=p1_space,-
                        retadr=rom_sec_base,-
flags=#<sec$m_expreg!sec$m_pfnmap>,-
                        pagcnt=#page_count,-
                        vbn=#<^X20040000/512>
        blbs    r0, 30$
        ret
30$:    movl    rom_sec_base, r0
        movl    copy_sec_base, r1
        movl    #^x10000/2, r2
40$:    movw    (r0)+, (r1)+
        sobgtr  r2, 40$
        movl    #1,r0
        ret
        .end    go
_______________________________________________
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Reply via email to