LLNL Library - CP/M

This is a discussion on LLNL Library - CP/M ; While searching for ANY information (I want the ROM Monitor code!!!) for my MST-80 processor trainer kit from LLNL I found what you're looking for. Its a 46 page book available from Lawrence Livermore National Laboratory. Try this link: http://www.llnl.gov/tid/lof/documents/pdf/171286.pdf ...

+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 20 of 37

Thread: LLNL Library

  1. LLNL Library

    While searching for ANY information (I want the ROM Monitor code!!!)
    for my MST-80 processor trainer kit from LLNL I found what you're
    looking for.

    Its a 46 page book available from Lawrence Livermore National
    Laboratory.

    Try this link:

    http://www.llnl.gov/tid/lof/documents/pdf/171286.pdf

    If it doesn't work, let me know and I can describe how to search
    through their site to get to it.

    And if someone would like to help me, I'm looking for any information
    on the MST-80 single board microprocessor trainer kit.


  2. Re: LLNL Library

    On 24 Sep 2006 13:43:59 -0700, "Grant Stockly"
    wrote:

    >While searching for ANY information (I want the ROM Monitor code!!!)
    >for my MST-80 processor trainer kit from LLNL I found what you're
    >looking for.
    >
    >Its a 46 page book available from Lawrence Livermore National
    >Laboratory.
    >
    >Try this link:
    >
    >http://www.llnl.gov/tid/lof/documents/pdf/171286.pdf
    >
    >If it doesn't work, let me know and I can describe how to search
    >through their site to get to it.
    >
    >And if someone would like to help me, I'm looking for any information
    >on the MST-80 single board microprocessor trainer kit.


    Ok thats the floating point package.

    I suspect the LL 8k Basic as published by Interface Age magazine
    (DEC 76, jan 77 and feb 77 issues) and also in their compendium
    of software "Best of Interface Age Volume1 Software in BASIC"
    has your answer. The first 138 pages!

    The software package ran on a MCS80 or similar. The whole mess was 8K
    or less and the interpreter was some 6k with some of the remaining
    space as ODT a monitor. ODT was a mere 256bytes. The reason I
    linked this to the floating point package is that was published as
    part of the LLBasic. Yes, it was a floating point basic.

    ODT was small and unusual but also supplied the IO for the BASIC.

    Hope that helps.

    Allison


  3. Re: LLNL Library

    A 46-pages booklet listing a 8008/8080 Floating-Point package!

    Wahoo! Interesting stuff, at last!

    Many thanks, Grant.

    I will print it tomorrow. I have no idea when I will be able to retype it.

    Yours Sincerely,
    "French Luser"




  4. Re: LLNL Library

    There is also a "PL/M Floating-Point Interface Program" which looks
    interesting, since the previous reference contains only the listing, without
    test software or anything objective.

    Yours Sincerely,
    "French Luser"




  5. Re: LLNL Library

    nospam@nouce.bellatlantic.net wrote:
    >
    > On 24 Sep 2006 13:43:59 -0700, "Grant Stockly"
    > wrote:
    >
    > >While searching for ANY information (I want the ROM Monitor code!!!)
    > >for my MST-80 processor trainer kit from LLNL I found what you're
    > >looking for.
    > >
    > >Its a 46 page book available from Lawrence Livermore National
    > >Laboratory.
    > >
    > >Try this link:
    > >
    > >http://www.llnl.gov/tid/lof/documents/pdf/171286.pdf
    > >
    > >If it doesn't work, let me know and I can describe how to search
    > >through their site to get to it.
    > >
    > >And if someone would like to help me, I'm looking for any information
    > >on the MST-80 single board microprocessor trainer kit.

    >
    > Ok thats the floating point package.
    >
    > I suspect the LL 8k Basic as published by Interface Age magazine
    > (DEC 76, jan 77 and feb 77 issues) and also in their compendium
    > of software "Best of Interface Age Volume1 Software in BASIC"
    > has your answer. The first 138 pages!
    >
    > The software package ran on a MCS80 or similar. The whole mess was 8K
    > or less and the interpreter was some 6k with some of the remaining
    > space as ODT a monitor. ODT was a mere 256bytes. The reason I
    > linked this to the floating point package is that was published as
    > part of the LLBasic. Yes, it was a floating point basic.
    >
    > ODT was small and unusual but also supplied the IO for the BASIC.
    >

    I think this is the package you are refering to:

    VOLUME 2 LAWRENCE LIVERMORE BASIC AND DISK TINY BASIC

    2.1 84K LLLBASIC.ASM LLLBASIC INTERPRETER SOURCE
    2.2 38K LLLBASIC.COM SIMPLE PATCHED COM FOR CP/M
    2.3 2K LLLBASIC.DOC NOTES ON LLLBASIC
    2.4 61K LLLFP.ASM FLOATING-POINT PACKAGE FOR LLLBASIC
    2.5 2K LLLMON.ASM KLUGE MONITOR TO TEST LLL IN LLLBASIC.COM
    2.6 2K STARTREK.DOC COMMENTS ON STARTREK.TBI
    2.7 6K STARTREK.TBI TINY BASIC LOADABLE STARTREK
    2.8 3K TINYBAS.COM SHERRY version WANG PALO ALTO TINY BASIC,
    2.9 13K TINYBAS.DOC FULL INSTRUCTIONS FOR TINYBAS


    This can be downloaded as an .ARK file from:


    http://www.retroarchive.org/cpm/cdro...G/CPMUG002.ARK


    --
    +----------------------------------------------------------------+
    | Charles and Francis Richmond richmond at plano dot net |
    +----------------------------------------------------------------+

  6. How to poke Octal values in biased locations in RAM?

    POCTAL.TXT
    ----------

    "How to poke octal values in biased locations in RAM?"

    Ok. So, Grant Stockly has found, in the archives of the Lawrence
    Livermore Laboratories, a PDF file containing a 8008/8080
    Floating-Point package that the LLL used circa 1973-1975.

    Since I have a small interest in how Intel 8008 and 8080 CPUs
    work in general, and Floating-Point arithmetic in particular, I
    had a look.

    The few pages of doc say that it is based on another FP package
    purchased by LLL from David Mead of Recognition System (circa
    1973), then that it was modified by Hal Brand (24-bit mantissa
    and I/O routines) and Frank Olken (overflow/underflow problems)
    in September 1974 and June 1975, respectively.

    Ok. I then turned the page and had a look to the listing...

    Gasp! It had been assembled using an octal absolute assembler.

    Now, I must explain one of my little secrets: when I recreate
    the source code of a program, rather than retype the mnemonics,
    I retype the opcodes, save them in a file, then let my favorite
    disassembler recreate the mnemonics of the source code.

    This saves me from typing. 8080 code has 1 to 3 bytes per line,
    so I type 2 to 6 hex numbers per line, rather than typing a tab,
    the mnemonic (2 to 4 letters), then another tab (the original
    program was putting a space between the mnemonic and the
    operand, instead), then the operand(s). Rather than using my two
    hands, I have the index finger of my left hand on the listing,
    pointing to the byte to enter, and the fingers of my right hand
    entering the hex values.

    (This is how I entered the 12KB of the TDL Extended Precision
    BASIC that was once mentioned in the comp.os.cpm Newsgroup,
    after finding its dump in a German book.) (I made 5 typos.) (But
    I prefer HEX files.)

    I addition, the disassembler finds any typos I could have done
    when retyping, or find a bug in the original source code (rare,
    but it happens from time to time, or the assembler used was not
    Intel-compatible, the way there were 4 VERY different syntaxes
    of the Zilog Z-80 mnemonics, at the beginning). (To be
    compatible and portable, I only use MAC for 8080 stuff, and M80
    for Z-80 stuff. The debuggers are, of course, SID and ZSID.)

    In the present case, everything was in Octal, so I could no
    longer use SID (or DDT). The code was starting at 4400 Octal,
    which happens to be 0900H, and was ending at 7716, which happens
    to be 0FCEH, meaning that this FP package is 1742-bytes long
    (1.7K), or average length for a 8080 FP package. At least, it
    was CP/M-compatible.

    The only thing that prevented me from using SID is that all
    assembly language utilities for CP/M uses the hexadecimal system
    (and rightly so, in my opinion). I remember having had, at the
    beginning, when I had a NorthStar Horizon with a daisy-wheel
    printer, a BASIC program dumping memory in Octal and
    Split-Octal, but I have no idea what it has become. And I never
    was a fan of Octal, anyway.

    I once considered retyping an Octal debugger published in DDJ,
    to play with my ASR-33 Teletype, but finally decided that nobody
    (except Unix freaks) used Octal anymore. (When Andrew Tanenbaum
    published his Minix book, I couldn't prevent myself from
    noticing that he was still using octal numbers, despite their
    length on the IBM Clown! The "rwx" bits of Unix are just showing
    the age of this old donkey.)

    So, it was clearly a unusual, "one-off" problem. Of course, over
    the years, I made several "poke byte" subroutines in BASIC. So,
    I simply played with one of them until it worked the way I liked
    it.

    I decided to do it the old fashioned way: poking the program in
    memory, then saving it in a file. The problem was that BASIC was
    loading at the bottom of the TPA, where the program should have
    been loaded. So, it was necessary to use 2 addresses: one where
    the program would be really poked in memory, and the octal
    address(es) of the print-out of the program, so as not to be
    (too much) confused while entering the 32 pages of octal values.

    In addition, I decided that I was tired of typing on the
    RETURN/ENTER key after each number, and that, since all octal
    numbers are 3-digits long, the BASIC program should advance to
    the next memory location when I enter the 3rd digit of one
    opcode.

    After a few minutes, I got:

    4400: 000 315
    4401: 000 151
    4402: 000 014
    4403: 000 315
    4404: 000 332
    4405: 000 012
    4406: 000 302
    4407: 000 022
    4410: 000 011
    4411: 000 315
    4412: 000 342
    4413: 000 012
    4414: 000 312
    4415: 000 250
    4416: 000 013
    4417: 000 303
    4420: 000 257
    4421: 000 013
    4422: 000 315
    4423: 000 342
    4424: 000 012
    4425: 000 312
    4426: 000 133
    4427: 000 014

    (That's the beginning of the LDIV routine, page A-1.)

    Now that I have the custom tool to do this job, I only need to
    find the time to retype the 32 pages. To be continued...

    10 REM POCTAL.BAS by Emmanuel ROCHE
    20 '
    30 PRINT
    40 INPUT "POCTAL> Memory address (HEX without H) : " ; sa$
    50 INPUT " Octal address (OCT without O) : " ; oa$
    60 PRINT
    70 sa = VAL ("&H" + sa$)
    80 oa = VAL ("&O" + oa$)
    90 PRINT OCT$ (oa, 4) ": " OCT$ (PEEK (sa), 3) " " ;
    100 by$ = ""
    110 FOR i = 1 TO 3
    120 by$ = by$ + INPUT$ (1)
    130 PRINT MID$ (by$, i) ;
    140 NEXT i
    150 PRINT
    160 by = VAL ("&O" + by$)
    170 POKE sa, by
    180 sa = sa + 1
    190 oa = oa + 1
    200 GOTO 90


    Yours Sincerely,
    "French Luser"


    EOF



  7. Re: How to poke Octal values in biased locations in RAM?

    On Tue, 26 Sep 2006 13:49:17 +0200, "French Luser"
    wrote:

    >POCTAL.TXT
    >----------
    >
    >"How to poke octal values in biased locations in RAM?"
    >
    >Ok. So, Grant Stockly has found, in the archives of the Lawrence
    >Livermore Laboratories, a PDF file containing a 8008/8080
    >Floating-Point package that the LLL used circa 1973-1975.
    >
    >Since I have a small interest in how Intel 8008 and 8080 CPUs
    >work in general, and Floating-Point arithmetic in particular, I
    >had a look.
    >
    >The few pages of doc say that it is based on another FP package
    >purchased by LLL from David Mead of Recognition System (circa
    >1973), then that it was modified by Hal Brand (24-bit mantissa
    >and I/O routines) and Frank Olken (overflow/underflow problems)
    >in September 1974 and June 1975, respectively.
    >
    >Ok. I then turned the page and had a look to the listing...
    >
    >Gasp! It had been assembled using an octal absolute assembler.
    >
    >Now, I must explain one of my little secrets: when I recreate
    >the source code of a program, rather than retype the mnemonics,
    >I retype the opcodes, save them in a file, then let my favorite
    >disassembler recreate the mnemonics of the source code.
    >
    >This saves me from typing. 8080 code has 1 to 3 bytes per line,
    >so I type 2 to 6 hex numbers per line, rather than typing a tab,
    >the mnemonic (2 to 4 letters), then another tab (the original
    >program was putting a space between the mnemonic and the
    >operand, instead), then the operand(s). Rather than using my two
    >hands, I have the index finger of my left hand on the listing,
    >pointing to the byte to enter, and the fingers of my right hand
    >entering the hex values.
    >
    >(This is how I entered the 12KB of the TDL Extended Precision
    >BASIC that was once mentioned in the comp.os.cpm Newsgroup,
    >after finding its dump in a German book.) (I made 5 typos.) (But
    >I prefer HEX files.)
    >
    >I addition, the disassembler finds any typos I could have done
    >when retyping, or find a bug in the original source code (rare,
    >but it happens from time to time, or the assembler used was not
    >Intel-compatible, the way there were 4 VERY different syntaxes
    >of the Zilog Z-80 mnemonics, at the beginning). (To be
    >compatible and portable, I only use MAC for 8080 stuff, and M80
    >for Z-80 stuff. The debuggers are, of course, SID and ZSID.)
    >
    >In the present case, everything was in Octal, so I could no
    >longer use SID (or DDT). The code was starting at 4400 Octal,
    >which happens to be 0900H, and was ending at 7716, which happens
    >to be 0FCEH, meaning that this FP package is 1742-bytes long
    >(1.7K), or average length for a 8080 FP package. At least, it
    >was CP/M-compatible.
    >
    >The only thing that prevented me from using SID is that all
    >assembly language utilities for CP/M uses the hexadecimal system
    >(and rightly so, in my opinion). I remember having had, at the
    >beginning, when I had a NorthStar Horizon with a daisy-wheel
    >printer, a BASIC program dumping memory in Octal and
    >Split-Octal, but I have no idea what it has become. And I never
    >was a fan of Octal, anyway.
    >
    >I once considered retyping an Octal debugger published in DDJ,
    >to play with my ASR-33 Teletype, but finally decided that nobody
    >(except Unix freaks) used Octal anymore. (When Andrew Tanenbaum
    >published his Minix book, I couldn't prevent myself from
    >noticing that he was still using octal numbers, despite their
    >length on the IBM Clown! The "rwx" bits of Unix are just showing
    >the age of this old donkey.)


    Octal is not a unixism/ However unix was created on Octal machines!

    The following machines are octal oriented.
    PDP-1
    PDP-4
    PDP-5
    PDP-7
    PDP-8
    PDP-9
    PDP-10
    PDP-11
    Some (PDP7 and 11) ran unix but the native OSs tended to be
    octal notation and the front pannels were octal oriented.
    Also all of the docs are octal as are the manuals to setup boards.
    Infact all DEC systems but the VAX and MIPs based( MIPS used
    hex and ran unix).

    Heath H8 OCTAL Keypad

    MITS Altair front pannel switches were grouped in threes (octal)
    MITSs programming package 1 (resident editor/assembler/debugger)
    was octal. Most of the published software for it was octal.

    The 8080 is octal oriented, look at the opcodes and see the
    pattern. Z80 is as well being inheritor of 8080.

    CP/M was the first OS I had contact with in the 8080 world that
    was hex. The 6800, SC/MP, 1802, 8048, were hex from
    day one. CP/M was where I also moved from 8080 to Z80.

    The transistion from octal to hex was coincident with Z80 and
    also the appearence of machines (8080/8085/z80) that had
    no front pannel.

    I'm not pro octal, only if you going to play in the real old area of
    8080 software history (especially pre 1978) then be prepared for
    Octal or Hex.

    It was fun back then. If you had disk (rare!) is was likely
    incompatable with someone that also had one. Magazine
    articles before '78 were all over the map on 8080/z80 code
    in octal and hex.

    Allison

    >So, it was clearly a unusual, "one-off" problem. Of course, over
    >the years, I made several "poke byte" subroutines in BASIC. So,
    >I simply played with one of them until it worked the way I liked
    >it.


    No it shouldn't be as early 8080 was definately octal. All of the
    Intel docs of the era were octal (for both 8080 and 8008). It was
    the move to Z80 that brought hex as Zilog used hex notation.

    Just be glad the writers didn't choose to print a BNPF dump!


    Allison

    >I decided to do it the old fashioned way: poking the program in
    >memory, then saving it in a file. The problem was that BASIC was
    >loading at the bottom of the TPA, where the program should have
    >been loaded. So, it was necessary to use 2 addresses: one where
    >the program would be really poked in memory, and the octal
    >address(es) of the print-out of the program, so as not to be
    >(too much) confused while entering the 32 pages of octal values.
    >
    >In addition, I decided that I was tired of typing on the
    >RETURN/ENTER key after each number, and that, since all octal
    >numbers are 3-digits long, the BASIC program should advance to
    >the next memory location when I enter the 3rd digit of one
    >opcode.
    >
    >After a few minutes, I got:
    >
    >4400: 000 315
    >4401: 000 151
    >4402: 000 014
    >4403: 000 315
    >4404: 000 332
    >4405: 000 012
    >4406: 000 302
    >4407: 000 022
    >4410: 000 011
    >4411: 000 315
    >4412: 000 342
    >4413: 000 012
    >4414: 000 312
    >4415: 000 250
    >4416: 000 013
    >4417: 000 303
    >4420: 000 257
    >4421: 000 013
    >4422: 000 315
    >4423: 000 342
    >4424: 000 012
    >4425: 000 312
    >4426: 000 133
    >4427: 000 014
    >
    >(That's the beginning of the LDIV routine, page A-1.)
    >
    >Now that I have the custom tool to do this job, I only need to
    >find the time to retype the 32 pages. To be continued...
    >
    >10 REM POCTAL.BAS by Emmanuel ROCHE
    >20 '
    >30 PRINT
    >40 INPUT "POCTAL> Memory address (HEX without H) : " ; sa$
    >50 INPUT " Octal address (OCT without O) : " ; oa$
    >60 PRINT
    >70 sa = VAL ("&H" + sa$)
    >80 oa = VAL ("&O" + oa$)
    >90 PRINT OCT$ (oa, 4) ": " OCT$ (PEEK (sa), 3) " " ;
    >100 by$ = ""
    >110 FOR i = 1 TO 3
    >120 by$ = by$ + INPUT$ (1)
    >130 PRINT MID$ (by$, i) ;
    >140 NEXT i
    >150 PRINT
    >160 by = VAL ("&O" + by$)
    >170 POKE sa, by
    >180 sa = sa + 1
    >190 oa = oa + 1
    >200 GOTO 90
    >
    >
    >Yours Sincerely,
    >"French Luser"
    >
    >
    >EOF
    >



  8. Re: How to poke Octal values in biased locations in RAM?


    wrote in message
    news:6rbih25llp0m5gj5co1g3djiq8nmvln6l3@4ax.com...
    ---snip---
    >
    > Octal is not a unixism/ However unix was created on Octal machines!
    >
    > The following machines are octal oriented.
    > PDP-1
    > PDP-4
    > PDP-5
    > PDP-7
    > PDP-8
    > PDP-9
    > PDP-10
    > PDP-11
    > Some (PDP7 and 11) ran unix but the native OSs tended to be
    > octal notation and the front pannels were octal oriented.
    > Also all of the docs are octal as are the manuals to setup boards.
    > Infact all DEC systems but the VAX and MIPs based( MIPS used
    > hex and ran unix).
    >
    > Heath H8 OCTAL Keypad
    >
    > MITS Altair front pannel switches were grouped in threes (octal)
    > MITSs programming package 1 (resident editor/assembler/debugger)
    > was octal. Most of the published software for it was octal.
    >
    > The 8080 is octal oriented, look at the opcodes and see the
    > pattern. Z80 is as well being inheritor of 8080.
    >
    > CP/M was the first OS I had contact with in the 8080 world that
    > was hex. The 6800, SC/MP, 1802, 8048, were hex from
    > day one. CP/M was where I also moved from 8080 to Z80.
    >
    > The transistion from octal to hex was coincident with Z80 and
    > also the appearence of machines (8080/8085/z80) that had
    > no front pannel.
    >
    > I'm not pro octal, only if you going to play in the real old area of
    > 8080 software history (especially pre 1978) then be prepared for
    > Octal or Hex.
    >
    > It was fun back then. If you had disk (rare!) is was likely
    > incompatable with someone that also had one. Magazine
    > articles before '78 were all over the map on 8080/z80 code
    > in octal and hex.
    >
    > Allison
    >
    >

    --snip--

    DG front panels were also octal. Octal was a lot easier when you had to key
    in a bootstrap, you only had to remember the key positions up to 7!



  9. Lawrence Livermore Laboratory Floating-Point Package doc


    LLLFP.WS4
    ---------

    Lawrence Livermore Laboratory Floating-Point (LLLFP) package

    Original title:

    - "Floating-Point Package for Intel 8008 and 8080 Microprocessors"
    Michael D. Maples
    Lawrence Livermore Laboratory,
    University of California/Livermore, California 94550,
    October 24, 1975

    (Retyped by Emmanuel ROCHE.)

    UCRL-51940
    Work performed under the auspices of the U.S. Department of
    Energy by Lawrence Livermore Laboratory under Contract
    W-7405-ENG-48.
    Distribution Category: UC-32


    Contents
    --------

    Abstract
    Introduction
    Selection and use of operations
    Acknowledgments
    Appendix: Source listing of Floating-Point Package


    Abstract
    --------

    The Lawrence Livermore Laboratory has used a scientific-notation
    mathematics package that performs Floating-Point arithmetic with
    Intel 8008 and 8080 microprocesors. The execution times for the
    mathematical operations -- add, subtract, multiply, divide, and
    square root -- range from 3 to 77 ms. Instructions for using the
    Floating-Point Package and a source listing of it are included.


    Introduction
    ------------

    For the last two years, Lawrence Livermore Laboratory has used a
    scientific-notation mathematics package (Floating-Point Package)
    with the Intel 8008 and 8080 microprocessors. This package
    allows addition, subtraction, multiplication, division, and
    square root operations. Table 1 shows the execution times for
    these operations. The program listing of the complete 8080
    Floating-Point Package is in the Appendix. The package uses some
    I/O calls from an octal debug routine (ODT) that has become a
    standard part of all inhouse LLL microcomputers, but this need
    not be necessary. The appropriate ODT calls (6 or 7) in the I/O
    routines can easily be replaced by assembly language
    equivalents.


    Table 1. Worst-case execution times for the 8080 microprocessor
    using a 0.5-us clock with the package in programmable read-only
    memory (PROM)

    Operation Execution times (ms)
    --------- --------------------
    Add 3
    Subtract 3
    Multiply 7
    Divide 8
    Square root 77

    The Floating-Point Package uses 24 bits of mantissa for
    approximately 7-1/2 digits of accuracy in expressing numeric
    data. Obviously, this decreases rapidly when complex iterative
    computations are used. Nevertheless, the package is functioning
    quite satisfactorily in many experiments, with accuracy
    requirements of one part per hundred thousand.

    The package also indicates underflows and overflows, by placing
    zeros in the mantissa and a 64 (decimal) in the exponent word.


    Selection and use of operations
    -------------------------------

    All registers described in this paper points to four-word
    internal mathematical storage areas, unless otherwise stated.
    Also, before performing any mathematical operation, all needed
    operands must be placed in the same random access memory (RAM),
    along with any needed scratch areas (i.e., all must reside in
    the same page of RAM). (ROCHE> Obviously, the author of this
    paper has NOT the same idea of what is a "page" and a "word"
    than me...)

    The first problem is how to get the decimal numbers into the
    correct format for use in the Floating-Point Package. The
    routine INPUT performs the conversion for all teletypewriter
    input. Also, it easily adapts to converting any BCD numeric
    inputs from either digital panel meters (DPM) or thumbwheel
    switches. To use INPUT, set the L-register to point at the
    location in RAM where the result of the conversion is to be
    placed, and set the C-register to point to another location in
    RAM where intermediate steps are to be calculated. Then, do a
    call to the INPUT routine that does the appropriate conversion
    (see Table 2).

    Table 2. Program for using INPUT routine. The scratch area is
    15 (decimal) bytes long, but the converted number is only 4
    bytes long.

    Program Comments
    ----------- --------
    MVI H,scrpg ; Set H to match scratch page (RAM)
    MVI L,stwd ; Store floating-point number,
    ; starting at STWD.
    MVI C,scr ; Scratch area
    CALL input ;

    The resulting floating-point number has three 8-bit words of
    mantissa, and a fourth word that contains 6 bits of exponent, 1
    bit for mantissa sign, and 1 bit for exponent sign (see Figure
    1). Negative mantissa are indicated only by the sign bit, as the
    mantissa itself is in sign-magnitude form. But the negative
    exponents are in two's complement form.

    Figure 1. Floating-point word format. This format allows
    representation of numbers from +/-6.46235 * 10 to the power of
    -27 to +/-4.61168 * 10 to the power of 18.

    7 6 5 4 3 2 1 0
    +-+-+-+-+-+-+-+-+
    STWD | | | | | | | | | Most significant word
    +-+-+-+-+-+-+-+-+
    STWD<-1 | | | | | | | | |
    +-+-+-+-+-+-+-+-+
    STWD<-2 | | | | | | | | | Least significant word
    +-+-+-+-+-+-+-+-+
    STWD<-3 | | | | | | | | |
    +-+-+-+-+-+-+-+-+
    | |
    | +--> Exponent sign: 1=negative, 0=positive
    +----> Mantissa sign: 1=negative, 0=positive

    If an addition (LADD) is wanted, place the pointer to one addend
    in the L-register, the pointer to the other addend in the
    B-register, and a pointer in the C-register. The C-register
    points to a four-word scratch area used during the addition
    process. The result is pointed to by the L-register (see Table
    3).

    Table 3. Assembly language setup for addition.

    Program Comments
    ----------- --------
    MVI H,scrpg ; Set H to match scratch page (RAM)
    MVI L,add1 ; Pointer four-word addend and final result
    MVI B,add2 ; Pointer 2nd four-word addend
    MVI C,scr ; Four-word scratch area
    CALL ladd ; Turn control over to addition routines

    The subtraction (LSUB) routine is very similar to the addition
    routine. The L-register holds the pointer to the minuend, and
    the B-register holds the pointer to the subtrahend. The
    C-register once again is used as a four-word scratch area, and
    the result is placed in the area pointed to by the L-register,
    destroying the previous data residing there (see Table 4).

    Table 4. Assembly language setup for subtraction.

    Program Comments
    ----------- --------
    MVI H,scrpg ; Set H to match scratch page (RAM)
    MVI L,sub1 ; Pointer four-word minuend and final result
    MVI B,sub2 ; Pointer to four-word subtraend
    MVI C,scr ; Four-word scratch area
    CALL lsub ; Turn control over to subtraction routines

    If a multiplication (LMUL) is wanted, again use the L-, B-, and
    C-registers. The pointer for the multiplicand resides in the
    L-register, the pointer for the multiplier in the B-register,
    and the pointer to the result in the C-register (see Table 5).

    Table 5. Assembly language setup for multiplication.

    Program Comments
    ----------- --------
    MVI H,scrpg ; Set H to match scratch page (RAM)
    MVI L,mlcan ; Pointer to four-word multiplicant
    MVI B,mlplr ; Pointer to four-word multiplier
    MVI C,rslt ; Four-word scratch area
    CALL lmul ; Turn control over to multiply routines

    Division (LDIV), like multiplication, uses the C-register to
    hold the pointer to the result (quotient). The L-register
    pointer refers to dividend, and the B-register pointer refers to
    the divisor (see Table 6).

    Table 6. Assembly language setup for division.

    Program Comments
    ----------- --------
    MVI H,scrpg ; Set H to match scratch page (RAM)
    MVI L,dvdnd ; Pointer to four-word dividend
    MVI B,dvsr ; Pointer to four-word divisor
    MVI C,rslt ; Four-word scratch area
    CALL ldiv ; Turn control over to divide routines

    The square root routine (DSQRT) uses the L-register to point to
    the number to be converted, the B-register to point to the final
    converted number, and the C-register to point to a 14 (decimal)
    word scratch area (see Table 7).

    Table 7. Assembly language setup for square root.

    Program Comments
    ----------- --------
    MVI H,scrpg ; Set H to match scratch page (RAM)
    MVI L,num ; Pointer to number to be converted
    MVI B,dvsr ; Pointer to converted number
    MVI C,scr ; 14 word scratch area
    CALL dsqrt ; Turn control over to square root routine

    The final routine is the output routine (CVRT). This routine
    converts the binary floating-point number pointed to in the
    L-register to its ASCII equivalent, and types it out on the
    teletypewriter. This routine uses a 15 (decimal) word scratch
    area pointed to by the C-register (see Table 8). The final data
    is printed in scientific notation. The output routine, like the
    INPUT routine, is easily modified to output its data to an
    internal (memory) register for display on an LED display.

    Table 8. Assembly language to set up OUTPUT routine for its
    proper execution.

    Program Comments
    ----------- --------
    MVI H,scrpg ; Set H to match scratch page (RAM)
    MVI L,outnm ; Number to be converted from floating
    ; to decimal, and printed in scientific
    ; notation on teletypewriter.
    MVI C,scr ; 15 word scratch area
    CALL cvrt ; Turn control over to convert routine

    Table 9 gives a simple program that allows the user to check out
    the various routines, and examine the various binary
    floating-point numbers.

    Table 9. Sample program that takes two operands from the
    teletypewriter, divides them, and outputs the result to the
    teletypewriter. This routine can be useful in becoming familiar
    with the different routines in the Floating-Point Package.

    Program Comments
    ------- --------
    ORG 0940H Program starts at location 0940H
    ;
    scrpg EQU 9 ; Scratch page is page 9
    op1 EQU 0 ; Starting location of operand 1
    op2 EQU op1+4 ; Starting location of operand 2
    rsult EQU op2+4 ; Starting location of result
    scr EQU rsult+4 ; Starting location of scratch area
    MVI H,scrpg ; Set H register to RAM scratch page
    MVI L,op1 ; Pointer to operand 1
    MVI C,scr ; Scratch area
    CALL input ; Input operand 1 from teletypewriter
    MVI L,op2 ; Pointer to operand 2
    MVI C,scr ; Scratch
    CALL input ; Input operand 2 from teletypewriter
    MVI L,op1 ; Operand-1 pointer in L-register
    MVI B,op2 ; Operand-2 pointer in B-register
    MVI C,rsult ; Result to C-register pointer
    CALL ldiv ; Divide OP1 by OP2, and place result in RSULT
    ;
    MVI L,rsult ; L-pointer now RSULT
    MVI C,slr ; Scratch area
    CALL cvrt ; Output number, starting in location RSULT,
    ; to teletypewriter.
    ;
    HALT ; End


    Acknowledgments
    ---------------

    This package was based on a package purchased from David Mead of
    Recognition System. Major modifications were made by Hal Brand,
    to allow ASCII I/O and a triple-precision mantissa.
    Overflow-underflow problems were resolved by Frank Olken. A
    hardy thanks is given to Eugene Fisher for foreseeing the need
    for such a package.


    Appendix: Source listing of Floating-Point Package
    --------------------------------------------------

    (To be done)


    EOF

  10. Lawrence Livermore Laboratory Floating-Point Package Pseudo-PRN File

    Ok. Now that we have poked in RAM the values of the Lawrence
    Livermore Laboratory Floating-Point Package, how do we check
    that it corresponds, EXACTLY, to what the old photocopy of the
    source code contains?

    If we re-assemble it with MAC, we only get hexadecimal addresses
    and bytes.

    If we re-assemble it with M80, with the /O option, we get a PRN
    file, but (1) M80 has a funny way of displaying addresses, and
    (2) it would contain all the comments, adding to the length.

    So, I decided to have a try. Maybe you remember the "list 8080
    mnemonics" program in BASIC that I published in the comp.os.cpm
    Newsgroup, several months/years ago?

    It turns out that I only had to replace all the HEX$ functions
    by OCT$, change the tabs (since octal needs more place), and add
    2 lines taking into account the fact that the displayed
    addresses are not the real RAM address.

    (The only area where the following output does not conform with
    the original 1975 listing is that it does not take into account
    the DB bytes holding the powers of ten (and the macro
    definition, of course).)

    Now, all that remains to do is to check, line by line, number by
    number, digit by digit, that the following correspond EXACTLY
    with the old photocopy...

    Good luck!

    Yours Sincerely,
    "French Luser"


    run"listioct (=LIST Intel 8080 opcodes in OCTal)

    004400: 315 151 014 CALL 014151 ; .i.
    004403: 315 332 012 CALL 012332 ; ...
    004406: 302 022 011 JNZ 011022 ; ...
    004411: 315 342 012 CALL 012342 ; ...
    004414: 312 250 013 JZ 013250 ; ...
    004417: 303 257 013 JMP 013257 ; ...

    004422: 315 342 012 CALL 012342 ; ...
    004425: 312 133 014 JZ 014133 ; .[.
    004430: 135 MOV E, L ; ]
    004431: 151 MOV L, C ; i
    004432: 315 035 013 CALL 013035 ; ...
    004435: 153 MOV L, E ; k
    004436: 315 020 014 CALL 014020 ; ...
    004441: 151 MOV L, C ; i
    004442: 315 351 012 CALL 012351 ; ...
    004445: 026 027 MVI D, 027 ; ..
    004447: 153 MOV L, E ; k
    004450: 315 012 014 CALL 014012 ; ...
    004453: 025 DCR D ; .
    004454: 312 073 011 JZ 011073 ; .;.
    004457: 175 MOV A, L ; }
    004460: 151 MOV L, C ; i
    004461: 117 MOV C, A ; O
    004462: 315 351 012 CALL 012351 ; ...
    004465: 175 MOV A, L ; }
    004466: 131 MOV E, C ; Y
    004467: 117 MOV C, A ; O
    004470: 303 047 011 JMP 011047 ; .'.

    004473: 315 341 013 CALL 013341 ; ...
    004476: 372 115 011 JM 011115 ; .M.
    004501: 175 MOV A, L ; }
    004502: 151 MOV L, C ; i
    004503: 117 MOV C, A ; O
    004504: 315 351 012 CALL 012351 ; ...
    004507: 115 MOV C, L ; M
    004510: 153 MOV L, E ; k
    004511: 315 071 014 CALL 014071 ; .9.
    004514: 311 RET ; .

    004515: 315 114 013 CALL 013114 ; .L.
    004520: 223 SUB E ; .
    004521: 376 177 CPI 177 ; ..
    004523: 312 133 014 JZ 014133 ; .[.
    004526: 306 001 ADI 001 ; ..
    004530: 315 104 014 CALL 014104 ; .D.
    004533: 311 RET ; .

    004534: 257 XRA A ; .
    004535: 303 142 011 JMP 011142 ; .b.

    004540: 076 200 MVI A, 200 ; >.
    004542: 315 357 013 CALL 013357 ; ...
    004545: 315 342 012 CALL 012342 ; ...
    004550: 310 RZ ; .
    004551: 315 133 013 CALL 013133 ; .[.
    004554: 312 234 011 JZ 011234 ; ...
    004557: 127 MOV D, A ; W
    004560: 332 177 011 JC 011177 ; ...
    004563: 223 SUB E ; .
    004564: 346 177 ANI 177 ; ..
    004566: 127 MOV D, A ; W
    004567: 135 MOV E, L ; ]
    004570: 151 MOV L, C ; i
    004571: 054 INR L ; ,
    004572: 163 MOV M, E ; s
    004573: 150 MOV L, B ; h
    004574: 303 204 011 JMP 011204 ; ...

    004577: 173 MOV A, E ; {
    004600: 222 SUB D ; .
    004601: 346 177 ANI 177 ; ..
    004603: 127 MOV D, A ; W
    004604: 076 030 MVI A, 030 ; >.
    004606: 272 CMP D ; .
    004607: 322 214 011 JNC 011214 ; ...
    004612: 026 030 MVI D, 030 ; ..
    004614: 267 ORA A ; .
    004615: 315 370 012 CALL 012370 ; ...
    004620: 025 DCR D ; .
    004621: 302 214 011 JNZ 011214 ; ...
    004624: 175 MOV A, L ; }
    004625: 270 CMP B ; .
    004626: 302 234 011 JNZ 011234 ; ...
    004631: 151 MOV L, C ; i
    004632: 054 INR L ; ,
    004633: 156 MOV L, M ; n
    004634: 315 002 012 CALL 012002 ; ...
    004637: 315 357 013 CALL 013357 ; ...
    004642: 376 002 CPI 002 ; ..
    004644: 302 252 011 JNZ 011252 ; ...
    004647: 303 215 013 JMP 013215 ; ...

    004652: 026 001 MVI D, 001 ; ..
    004654: 242 ANA D ; .
    004655: 312 326 011 JZ 011326 ; ...
    004660: 315 347 013 CALL 013347 ; ...
    004663: 312 271 011 JZ 011271 ; ...
    004666: 175 MOV A, L ; }
    004667: 150 MOV L, B ; h
    004670: 107 MOV B, A ; G
    004671: 315 046 013 CALL 013046 ; .&.
    004674: 315 357 011 CALL 011357 ; ...
    004677: 315 347 013 CALL 013347 ; ...
    004702: 312 255 012 JZ 012255 ; ...
    004705: 175 MOV A, L ; }
    004706: 150 MOV L, B ; h
    004707: 107 MOV B, A ; G
    004710: 171 MOV A, C ; y
    004711: 110 MOV C, B ; H
    004712: 135 MOV E, L ; ]
    004713: 107 MOV B, A ; G
    004714: 315 044 014 CALL 014044 ; .$.
    004717: 170 MOV A, B ; x
    004720: 101 MOV B, C ; A
    004721: 117 MOV C, A ; O
    004722: 153 MOV L, E ; k
    004723: 303 255 012 JMP 012255 ; ...

    004726: 315 133 013 CALL 013133 ; .[.
    004731: 322 337 011 JNC 011337 ; ...
    004734: 315 215 014 CALL 014215 ; ...
    004737: 315 357 011 CALL 011357 ; ...
    004742: 315 006 013 CALL 013006 ; ...
    004745: 322 322 013 JNC 013322 ; ...
    004750: 315 370 012 CALL 012370 ; ...
    004753: 315 266 013 CALL 013266 ; ...
    004756: 311 RET ; .

    004757: 135 MOV E, L ; ]
    004760: 151 MOV L, C ; i
    004761: 176 MOV A, M ; ~
    004762: 346 200 ANI 200 ; ..
    004764: 153 MOV L, E ; k
    004765: 054 INR L ; ,
    004766: 054 INR L ; ,
    004767: 054 INR L ; ,
    004770: 137 MOV E, A ; _
    004771: 176 MOV A, M ; ~
    004772: 346 177 ANI 177 ; ..
    004774: 203 ADD E ; .
    004775: 167 MOV M, A ; w
    004776: 055 DCR L ; -
    004777: 055 DCR L ; -
    005000: 055 DCR L ; -
    005001: 311 RET ; .

    005002: 315 171 014 CALL 014171 ; .y.
    005005: 273 CMP E ; .
    005006: 332 064 012 JC 012064 ; .4.
    005011: 302 075 012 JNZ 012075 ; .=.
    005014: 203 ADD E ; .
    005015: 332 042 012 JC 012042 ; .".
    005020: 315 341 013 CALL 013341 ; ...
    005023: 362 106 012 JP 012106 ; .F.
    005026: 315 364 013 CALL 013364 ; ...
    005031: 332 124 012 JC 012124 ; .T.
    005034: 302 110 012 JNZ 012110 ; .H.
    005037: 076 002 MVI A, 002 ; >.
    005041: 311 RET ; .

    005042: 315 341 013 CALL 013341 ; ...
    005045: 362 116 012 JP 012116 ; .N.
    005050: 315 364 013 CALL 013364 ; ...
    005053: 332 113 012 JC 012113 ; .K.
    005056: 302 121 012 JNZ 012121 ; .Q.
    005061: 303 037 012 JMP 012037 ; ...

    005064: 315 341 013 CALL 013341 ; ...
    005067: 372 106 012 JM 012106 ; .F.
    005072: 303 026 012 JMP 012026 ; ...

    005075: 315 341 013 CALL 013341 ; ...
    005100: 372 116 012 JM 012116 ; .N.
    005103: 303 050 012 JMP 012050 ; .(.

    005106: 257 XRA A ; .
    005107: 311 RET ; .

    005110: 076 001 MVI A, 001 ; >.
    005112: 311 RET ; .

    005113: 076 003 MVI A, 003 ; >.
    005115: 311 RET ; .

    005116: 076 200 MVI A, 200 ; >.
    005120: 311 RET ; .

    005121: 076 201 MVI A, 201 ; >.
    005123: 311 RET ; .

    005124: 076 203 MVI A, 203 ; >.
    005126: 311 RET ; .

    005127: 315 133 013 CALL 013133 ; .[.
    005132: 300 RNZ ; .
    005133: 315 364 013 CALL 013364 ; ...
    005136: 311 RET ; .

    005137: 315 151 014 CALL 014151 ; .i.
    005142: 315 332 012 CALL 012332 ; ...
    005145: 312 257 013 JZ 013257 ; ...
    005150: 315 342 012 CALL 012342 ; ...
    005153: 312 257 013 JZ 013257 ; ...
    005156: 135 MOV E, L ; ]
    005157: 151 MOV L, C ; i
    005160: 315 000 000 CALL 000000 ; ...
    005163: 153 MOV L, E ; k
    005164: 026 044 MVI D, 044 ; .$
    005166: 315 000 000 CALL 000000 ; ...
    005171: 332 000 000 JC 000000 ; ...
    005174: 175 MOV A, L ; }
    005175: 151 MOV L, C ; i
    005176: 117 MOV C, A ; O
    005177: 315 000 000 CALL 000000 ; ...
    005202: 175 MOV A, L ; }
    005203: 151 MOV L, C ; i
    005204: 117 MOV C, A ; O
    005205: 025 DCR D ; .
    005206: 302 000 000 JNZ 000000 ; ...
    005211: 315 000 000 CALL 000000 ; ...
    005214: 372 000 000 JM 000000 ; ...
    005217: 135 MOV E, L ; ]
    005220: 151 MOV L, C ; i
    005221: 315 000 000 CALL 000000 ; ...
    005224: 153 MOV L, E ; k
    005225: 315 000 000 CALL 000000 ; ...
    005230: 203 ADD E ; .
    005231: 376 040 CPI 040 ; .
    005233: 312 000 000 JZ 000000 ; ...
    005236: 326 001 SUI 001 ; ..
    005240: 315 000 000 CALL 000000 ; ...
    005243: 311 RET ; .

    005244: 175 MOV A, L ; }
    005245: 151 MOV L, C ; i
    005246: 117 MOV C, A ; O
    005247: 315 000 000 CALL 000000 ; ...
    005252: 303 177 012 JMP 012177 ; ...

    005255: 135 MOV E, L ; ]
    005256: 315 101 013 CALL 013101 ; .A.
    005261: 127 MOV D, A ; W
    005262: 153 MOV L, E ; k
    005263: 315 332 012 CALL 012332 ; ...
    005266: 312 215 013 JZ 013215 ; ...
    005271: 176 MOV A, M ; ~
    005272: 267 ORA A ; .
    005273: 372 313 012 JM 012313 ; ...
    005276: 172 MOV A, D ; z
    005277: 376 300 CPI 300 ; ..
    005301: 312 143 013 JZ 013143 ; .c.
    005304: 315 351 012 CALL 012351 ; ...
    005307: 025 DCR D ; .
    005310: 303 271 012 JMP 012271 ; ...

    005313: 303 303 013 JMP 013303 ; ...

    005316: 135 MOV E, L ; ]
    005317: 054 INR L ; ,
    005320: 054 INR L ; ,
    005321: 054 INR L ; ,
    005322: 257 XRA A ; .
    005323: 167 MOV M, A ; w
    005324: 153 MOV L, E ; k
    005325: 026 030 MVI D, 030 ; ..
    005327: 303 263 312 JMP 312263 ; ...

    005332: 054 INR L ; ,
    005333: 054 INR L ; ,
    005334: 176 MOV A, M ; ~
    005335: 055 DCR L ; -
    005336: 266 ORA M ; .
    005337: 055 DCR L ; -
    005340: 266 ORA M ; .
    005341: 311 RET ; .

    005342: 135 MOV E, L ; ]
    005343: 150 MOV L, B ; h
    005344: 315 332 012 CALL 012332 ; ...
    005347: 153 MOV L, E ; k
    005350: 311 RET ; .

    005351: 054 INR L ; ,
    005352: 054 INR L ; ,
    005353: 176 MOV A, M ; ~
    005354: 267 ORA A ; .
    005355: 027 RAL ; .
    005356: 167 MOV M, A ; w
    005357: 055 DCR L ; -
    005360: 176 MOV A, M ; ~
    005361: 027 RAL ; .
    005362: 167 MOV M, A ; w
    005363: 055 DCR L ; -
    005364: 176 MOV A, M ; ~
    005365: 027 RAL ; .
    005366: 167 MOV M, A ; w
    005367: 311 RET ; .

    005370: 135 MOV E, L ; ]
    005371: 176 MOV A, M ; ~
    005372: 037 RAR ; .
    005373: 167 MOV M, A ; w
    005374: 054 INR L ; ,
    005375: 176 MOV A, M ; ~
    005376: 037 RAR ; .
    005377: 167 MOV M, A ; w
    005400: 054 INR L ; ,
    005401: 176 MOV A, M ; ~
    005402: 037 RAR ; .
    005403: 167 MOV M, A ; w
    005404: 153 MOV L, E ; k
    005405: 311 RET ; .

    005406: 135 MOV E, L ; ]
    005407: 150 MOV L, B ; h
    005410: 054 INR L ; ,
    005411: 054 INR L ; ,
    005412: 176 MOV A, M ; ~
    005413: 153 MOV L, E ; k
    005414: 054 INR L ; ,
    005415: 054 INR L ; ,
    005416: 206 ADD M ; .
    005417: 167 MOV M, A ; w
    005420: 150 MOV L, B ; h
    005421: 054 INR L ; ,
    005422: 176 MOV A, M ; ~
    005423: 153 MOV L, E ; k
    005424: 054 INR L ; ,
    005425: 216 ADC M ; .
    005426: 167 MOV M, A ; w
    005427: 150 MOV L, B ; h
    005430: 176 MOV A, M ; ~
    005431: 153 MOV L, E ; k
    005432: 216 ADC M ; .
    005433: 167 MOV M, A ; w
    005434: 311 RET ; .

    005435: 257 XRA A ; .
    005436: 167 MOV M, A ; w
    005437: 054 INR L ; ,
    005440: 167 MOV M, A ; w
    005441: 054 INR L ; ,
    005442: 167 MOV M, A ; w
    005443: 055 DCR L ; -
    005444: 055 DCR L ; -
    005445: 311 RET ; .

    005446: 135 MOV E, L ; ]
    005447: 054 INR L ; ,
    005450: 054 INR L ; ,
    005451: 176 MOV A, M ; ~
    005452: 150 MOV L, B ; h
    005453: 054 INR L ; ,
    005454: 054 INR L ; ,
    005455: 226 SUB M ; .
    005456: 153 MOV L, E ; k
    005457: 054 INR L ; ,
    005460: 054 INR L ; ,
    005461: 167 MOV M, A ; w
    005462: 055 DCR L ; -
    005463: 176 MOV A, M ; ~
    005464: 150 MOV L, B ; h
    005465: 054 INR L ; ,
    005466: 236 SBB M ; .
    005467: 153 MOV L, E ; k
    005470: 054 INR L ; ,
    005471: 167 MOV M, A ; w
    005472: 055 DCR L ; -
    005473: 176 MOV A, M ; ~
    005474: 150 MOV L, B ; h
    005475: 236 SBB M ; .
    005476: 153 MOV L, E ; k
    005477: 167 MOV M, A ; w
    005500: 311 RET ; .

    005501: 054 INR L ; ,
    005502: 054 INR L ; ,
    005503: 054 INR L ; ,
    005504: 176 MOV A, M ; ~
    005505: 346 177 ANI 177 ; ..
    005507: 306 150 ADI 150 ; .h
    005511: 356 100 XRI 100 ; .@
    005513: 311 RET ; .

    005514: 135 MOV E, L ; ]
    005515: 150 MOV L, B ; h
    005516: 315 101 013 CALL 013101 ; .A.
    005521: 153 MOV L, E ; k
    005522: 137 MOV E, A ; _
    005523: 315 101 013 CALL 013101 ; .A.
    005526: 055 DCR L ; -
    005527: 055 DCR L ; -
    005530: 055 DCR L ; -
    005531: 127 MOV D, A ; W
    005532: 311 RET ; .

    005533: 315 114 013 CALL 013114 ; .L.
    005536: 127 MOV D, A ; W
    005537: 223 SUB E ; .
    005540: 027 RAL ; .
    005541: 172 MOV A, D ; z
    005542: 311 RET ; .

    005543: 026 100 MVI D, 100 ; .@
    005545: 315 237 013 CALL 013237 ; ...
    005550: 076 000 MVI A, 000 ; >.
    005552: 315 230 013 CALL 013230 ; ...
    005555: 076 377 MVI A, 377 ; >.
    005557: 267 ORA A ; .
    005560: 311 RET ; .

    005561: 026 077 MVI D, 077 ; .?
    005563: 315 237 013 CALL 013237 ; ...
    005566: 076 377 MVI A, 377 ; >.
    005570: 315 230 013 CALL 013230 ; ...
    005573: 076 177 MVI A, 177 ; >.
    005575: 267 ORA A ; .
    005576: 311 RET ; .

    005577: 026 077 MVI D, 077 ; .?
    005601: 315 237 013 CALL 013237 ; ...
    005604: 076 377 MVI A, 377 ; >.
    005606: 315 230 013 CALL 013230 ; ...
    005611: 076 077 MVI A, 077 ; >?
    005613: 267 ORA A ; .
    005614: 311 RET ; .

    005615: 054 INR L ; ,
    005616: 054 INR L ; ,
    005617: 054 INR L ; ,
    005620: 066 100 MVI M, 100 ; 6@
    005622: 257 XRA A ; .
    005623: 315 230 013 CALL 013230 ; ...
    005626: 267 ORA A ; .
    005627: 311 RET ; .

    005630: 055 DCR L ; -
    005631: 167 MOV M, A ; w
    005632: 055 DCR L ; -
    005633: 167 MOV M, A ; w
    005634: 055 DCR L ; -
    005635: 167 MOV M, A ; w
    005636: 311 RET ; .

    005637: 054 INR L ; ,
    005640: 054 INR L ; ,
    005641: 054 INR L ; ,
    005642: 176 MOV A, M ; ~
    005643: 346 200 ANI 200 ; ..
    005645: 262 ORA D ; .
    005646: 167 MOV M, A ; w
    005647: 311 RET ; .

    005650: 135 MOV E, L ; ]
    005651: 151 MOV L, C ; i
    005652: 315 177 013 CALL 013177 ; ...
    005655: 153 MOV L, E ; k
    005656: 311 RET ; .

    005657: 135 MOV E, L ; ]
    005660: 151 MOV L, C ; i
    005661: 315 215 013 CALL 013215 ; ...
    005664: 153 MOV L, E ; k
    005665: 311 RET ; .

    005666: 315 101 013 CALL 013101 ; .A.
    005671: 376 077 CPI 077 ; .?
    005673: 312 166 013 JZ 013166 ; .v.
    005676: 127 MOV D, A ; W
    005677: 024 INR D ; .
    005700: 303 306 013 JMP 013306 ; ...

    005703: 054 INR L ; ,
    005704: 054 INR L ; ,
    005705: 054 INR L ; ,
    005706: 076 177 MVI A, 177 ; >.
    005710: 242 ANA D ; .
    005711: 127 MOV D, A ; W
    005712: 176 MOV A, M ; ~
    005713: 346 200 ANI 200 ; ..
    005715: 262 ORA D ; .
    005716: 167 MOV M, A ; w
    005717: 055 DCR L ; -
    005720: 055 DCR L ; -
    005721: 055 DCR L ; -
    005722: 257 XRA A ; .
    005723: 311 RET ; .

    005724: 315 101 013 CALL 013101 ; .A.
    005727: 376 300 CPI 300 ; ..
    005731: 312 150 013 JZ 013150 ; .h.
    005734: 127 MOV D, A ; W
    005735: 025 DCR D ; .
    005736: 303 306 013 JMP 013306 ; ...

    005741: 135 MOV E, L ; ]
    005742: 151 MOV L, C ; i
    005743: 176 MOV A, M ; ~
    005744: 267 ORA A ; .
    005745: 153 MOV L, E ; k
    005746: 311 RET ; .

    005747: 135 MOV E, L ; ]
    005750: 151 MOV L, C ; i
    005751: 026 002 MVI D, 002 ; ..
    005753: 176 MOV A, M ; ~
    005754: 153 MOV L, E ; k
    005755: 242 ANA D ; .
    005756: 311 RET ; .

    005757: 135 MOV E, L ; ]
    005760: 151 MOV L, C ; i
    005761: 167 MOV M, A ; w
    005762: 153 MOV L, E ; k
    005763: 311 RET ; .

    005764: 176 MOV A, M ; ~
    005765: 135 MOV E, L ; ]
    005766: 150 MOV L, B ; h
    005767: 276 CMP M ; .
    005770: 153 MOV L, E ; k
    005771: 300 RNZ ; .
    005772: 054 INR L ; ,
    005773: 176 MOV A, M ; ~
    005774: 150 MOV L, B ; h
    005775: 054 INR L ; ,
    005776: 276 CMP M ; .
    005777: 153 MOV L, E ; k
    006000: 300 RNZ ; .
    006001: 054 INR L ; ,
    006002: 054 INR L ; ,
    006003: 176 MOV A, M ; ~
    006004: 150 MOV L, B ; h
    006005: 054 INR L ; ,
    006006: 054 INR L ; ,
    006007: 276 CMP M ; .
    006010: 153 MOV L, E ; k
    006011: 311 RET ; .

    006012: 315 351 012 CALL 012351 ; ...
    006015: 332 027 014 JC 014027 ; ...
    006020: 315 364 013 CALL 013364 ; ...
    006023: 322 027 014 JNC 014027 ; ...
    006026: 311 RET ; .

    006027: 315 046 013 CALL 013046 ; .&.
    006032: 135 MOV E, L ; ]
    006033: 151 MOV L, C ; i
    006034: 054 INR L ; ,
    006035: 054 INR L ; ,
    006036: 176 MOV A, M ; ~
    006037: 306 001 ADI 001 ; ..
    006041: 167 MOV M, A ; w
    006042: 153 MOV L, E ; k
    006043: 311 RET ; .

    006044: 026 004 MVI D, 004 ; ..
    006046: 151 MOV L, C ; i
    006047: 176 MOV A, M ; ~
    006050: 153 MOV L, E ; k
    006051: 167 MOV M, A ; w
    006052: 014 INR C ; .
    006053: 034 INR E ; .
    006054: 025 DCR D ; .
    006055: 302 046 014 JNZ 014046 ; .&.
    006060: 173 MOV A, E ; {
    006061: 326 004 SUI 004 ; ..
    006063: 137 MOV E, A ; _
    006064: 171 MOV A, C ; y
    006065: 326 004 SUI 004 ; ..
    006067: 117 MOV C, A ; O
    006070: 311 RET ; .

    006071: 315 114 013 CALL 013114 ; .L.
    006074: 223 SUB E ; .
    006075: 303 104 014 JMP 014104 ; .D.

    006100: 315 114 013 CALL 013114 ; .L.
    006103: 203 ADD E ; .
    006104: 376 100 CPI 100 ; .@
    006106: 332 123 014 JC 014123 ; .S.
    006111: 376 200 CPI 200 ; ..
    006113: 332 133 014 JC 014133 ; .[.
    006116: 376 300 CPI 300 ; ..
    006120: 332 142 014 JC 014142 ; .b.
    006123: 135 MOV E, L ; ]
    006124: 151 MOV L, C ; i
    006125: 127 MOV D, A ; W
    006126: 315 303 013 CALL 013303 ; ...
    006131: 153 MOV L, E ; k
    006132: 311 RET ; .

    006133: 135 MOV E, L ; ]
    006134: 151 MOV L, C ; i
    006135: 315 161 013 CALL 013161 ; .q.
    006140: 153 MOV L, E ; k
    006141: 311 RET ; .

    006142: 135 MOV E, L ; ]
    006143: 151 MOV L, C ; i
    006144: 315 143 013 CALL 013143 ; .c.
    006147: 153 MOV L, E ; k
    006150: 311 RET ; .

    006151: 315 171 014 CALL 014171 ; .y.
    006154: 253 XRA E ; .
    006155: 315 161 014 CALL 014161 ; .q.
    006160: 311 RET ; .

    006161: 135 MOV E, L ; ]
    006162: 151 MOV L, C ; i
    006163: 054 INR L ; ,
    006164: 054 INR L ; ,
    006165: 054 INR L ; ,
    006166: 167 MOV M, A ; w
    006167: 153 MOV L, E ; k
    006170: 311 RET ; .

    006171: 135 MOV E, L ; ]
    006172: 150 MOV L, B ; h
    006173: 054 INR L ; ,
    006174: 054 INR L ; ,
    006175: 054 INR L ; ,
    006176: 176 MOV A, M ; ~
    006177: 346 200 ANI 200 ; ..
    006201: 153 MOV L, E ; k
    006202: 137 MOV E, A ; _
    006203: 054 INR L ; ,
    006204: 054 INR L ; ,
    006205: 054 INR L ; ,
    006206: 176 MOV A, M ; ~
    006207: 346 200 ANI 200 ; ..
    006211: 055 DCR L ; -
    006212: 055 DCR L ; -
    006213: 055 DCR L ; -
    006214: 311 RET ; .

    006215: 135 MOV E, L ; ]
    006216: 150 MOV L, B ; h
    006217: 054 INR L ; ,
    006220: 054 INR L ; ,
    006221: 054 INR L ; ,
    006222: 176 MOV A, M ; ~
    006223: 153 MOV L, E ; k
    006224: 054 INR L ; ,
    006225: 054 INR L ; ,
    006226: 054 INR L ; ,
    006227: 167 MOV M, A ; w
    006230: 153 MOV L, E ; k
    006231: 311 RET ; .

    006232: 175 MOV A, L ; }
    006233: 151 MOV L, C ; i
    006234: 066 000 MVI M, 000 ; 6.
    006236: 054 INR L ; ,
    006237: 167 MOV M, A ; w
    006240: 054 INR L ; ,
    006241: 160 MOV M, B ; p
    006242: 054 INR L ; ,
    006243: 115 MOV C, L ; M
    006244: 157 MOV L, A ; o
    006245: 174 MOV A, H ; |
    006246: 315 210 016 CALL 016210 ; ...
    006251: 315 046 016 CALL 016046 ; .&.
    006254: 107 MOV B, A ; G
    006255: 346 200 ANI 200 ; ..
    006257: 302 031 015 JNZ 015031 ; ...
    006262: 170 MOV A, B ; x
    006263: 346 100 ANI 100 ; .@
    006265: 170 MOV A, B ; x
    006266: 312 302 014 JZ 014302 ; ...
    006271: 037 RAR ; .
    006272: 346 177 ANI 177 ; ..
    006274: 366 100 ORI 100 ; .@
    006276: 167 MOV M, A ; w
    006277: 303 306 014 JMP 014306 ; ...

    006302: 037 RAR ; .
    006303: 346 177 ANI 177 ; ..
    006305: 167 MOV M, A ; w
    006306: 151 MOV L, C ; i
    006307: 171 MOV A, C ; y
    006310: 306 004 ADI 004 ; ..
    006312: 117 MOV C, A ; O
    006313: 174 MOV A, H ; |
    006314: 315 210 016 CALL 016210 ; ...
    006317: 171 MOV A, C ; y
    006320: 326 004 SUI 004 ; ..
    006322: 157 MOV L, A ; o
    006323: 101 MOV B, C ; A
    006324: 306 010 ADI 010 ; ..
    006326: 117 MOV C, A ; O
    006327: 315 137 012 CALL 012137 ; ._.
    006332: 171 MOV A, C ; y
    006333: 326 010 SUI 010 ; ..
    006335: 117 MOV C, A ; O
    006336: 326 002 SUI 002 ; ..
    006340: 157 MOV L, A ; o
    006341: 156 MOV L, M ; n
    006342: 174 MOV A, H ; |
    006343: 315 210 016 CALL 016210 ; ...
    006346: 171 MOV A, C ; y
    006347: 306 010 ADI 010 ; ..
    006351: 157 MOV L, A ; o
    006352: 101 MOV B, C ; A
    006353: 306 004 ADI 004 ; ..
    006355: 117 MOV C, A ; O
    006356: 315 134 011 CALL 011134 ; .\.
    006361: 175 MOV A, L ; }
    006362: 326 004 SUI 004 ; ..
    006364: 107 MOV B, A ; G
    006365: 326 004 SUI 004 ; ..
    006367: 117 MOV C, A ; O
    006370: 315 000 011 CALL 011000 ; ...
    006373: 315 046 016 CALL 016046 ; .&.
    006376: 326 001 SUI 001 ; ..
    006400: 346 177 ANI 177 ; ..
    006402: 167 MOV M, A ; w
    006403: 171 MOV A, C ; y
    006404: 326 003 SUI 003 ; ..
    006406: 157 MOV L, A ; o
    006407: 106 MOV B, M ; F
    006410: 004 INR B ; .
    006411: 160 MOV M, B ; p
    006412: 170 MOV A, B ; x
    006413: 376 005 CPI 005 ; ..
    006415: 302 306 014 JNZ 014306 ; ...
    006420: 151 MOV L, C ; i
    006421: 055 DCR L ; -
    006422: 116 MOV C, M ; N
    006423: 054 INR L ; ,
    006424: 174 MOV A, H ; |
    006425: 315 210 016 CALL 016210 ; ...
    006430: 311 RET ; .

    006431: 151 MOV L, C ; i
    006432: 315 215 013 CALL 013215 ; ...
    006435: 303 021 015 JMP 015021 ; ...

    006440: 315 332 012 CALL 012332 ; ...
    006443: 302 070 015 JNZ 015070 ; .8.
    006446: 014 INR C ; .
    006447: 014 INR C ; .
    006450: 151 MOV L, C ; i
    006451: 315 215 013 CALL 013215 ; ...
    006454: 315 031 016 CALL 016031 ; ...
    006457: 054 INR L ; ,
    006460: 054 INR L ; ,
    006461: 054 INR L ; ,
    006462: 054 INR L ; ,
    006463: 257 XRA A ; .
    006464: 167 MOV M, A ; w
    006465: 303 227 015 JMP 015227 ; ...

    006470: 126 MOV D, M ; V
    006471: 054 INR L ; ,
    006472: 106 MOV B, M ; F
    006473: 054 INR L ; ,
    006474: 136 MOV E, M ; ^
    006475: 054 INR L ; ,
    006476: 176 MOV A, M ; ~
    006477: 014 INR C ; .
    006500: 014 INR C ; .
    006501: 151 MOV L, C ; i
    006502: 162 MOV M, D ; r
    006503: 054 INR L ; ,
    006504: 160 MOV M, B ; p
    006505: 054 INR L ; ,
    006506: 163 MOV M, E ; s
    006507: 054 INR L ; ,
    006510: 107 MOV B, A ; G
    006511: 346 177 ANI 177 ; ..
    006513: 167 MOV M, A ; w
    006514: 376 100 CPI 100 ; .@
    006516: 312 125 015 JZ 015125 ; .U.
    006521: 326 001 SUI 001 ; ..
    006523: 346 100 ANI 100 ; .@
    006525: 007 RLC ; .
    006526: 054 INR L ; ,
    006527: 167 MOV M, A ; w
    006530: 170 MOV A, B ; x
    006531: 315 031 016 CALL 016031 ; ...
    006534: 056 235 MVI L, 235 ; ..
    006536: 315 172 016 CALL 016172 ; .z.
    006541: 315 046 016 CALL 016046 ; .&.
    006544: 107 MOV B, A ; G
    006545: 346 100 ANI 100 ; .@
    006547: 170 MOV A, B ; x
    006550: 312 156 015 JZ 015156 ; .n.
    006553: 076 200 MVI A, 200 ; >.
    006555: 220 SUB B ; .
    006556: 376 022 CPI 022 ; ..
    006560: 372 174 015 JM 015174 ; .|.
    006563: 315 054 016 CALL 016054 ; .,.
    006566: 306 005 ADI 005 ; ..
    006570: 167 MOV M, A ; w
    006571: 303 141 015 JMP 015141 ; .a.

    006574: 056 241 MVI L, 241 ; ..
    006576: 315 172 016 CALL 016172 ; .z.
    006601: 315 046 016 CALL 016046 ; .&.
    006604: 376 001 CPI 001 ; ..
    006606: 362 222 015 JP 015222 ; ...
    006611: 315 054 016 CALL 016054 ; .,.
    006614: 306 001 ADI 001 ; ..
    006616: 167 MOV M, A ; w
    006617: 303 201 015 JMP 015201 ; ...

    006622: 376 007 CPI 007 ; ..
    006624: 362 211 015 JP 015211 ; ...
    006627: 151 MOV L, C ; i
    006630: 055 DCR L ; -
    006631: 055 DCR L ; -
    006632: 066 005 MVI M, 005 ; 6.
    006634: 137 MOV E, A ; _
    006635: 315 377 015 CALL 015377 ; ...
    006640: 376 012 CPI 012 ; ..
    006642: 362 122 016 JP 016122 ; .R.
    006645: 315 303 015 CALL 015303 ; ...
    006650: 315 327 015 CALL 015327 ; ...
    006653: 315 303 015 CALL 015303 ; ...
    006656: 302 250 015 JNZ 015250 ; ...
    006661: 076 305 MVI A, 305 ; >.
    006663: 315 060 000 CALL 000060 ; .0.
    006666: 315 107 016 CALL 016107 ; .G.
    006671: 107 MOV B, A ; G
    006672: 315 031 016 CALL 016031 ; ...
    006675: 170 MOV A, B ; x
    006676: 346 077 ANI 077 ; .?
    006700: 315 151 016 CALL 016151 ; .i.
    006703: 306 260 ADI 260 ; ..
    006705: 315 050 000 CALL 000050 ; .(.
    006710: 151 MOV L, C ; i
    006711: 055 DCR L ; -
    006712: 055 DCR L ; -
    006713: 176 MOV A, M ; ~
    006714: 376 005 CPI 005 ; ..
    006716: 076 256 MVI A, 256 ; >.
    006720: 314 060 000 CZ 000060 ; .0.
    006723: 126 MOV D, M ; V
    006724: 025 DCR D ; .
    006725: 162 MOV M, D ; r
    006726: 311 RET ; .

    006727: 036 001 MVI E, 001 ; ..
    006731: 315 377 015 CALL 015377 ; ...
    006734: 151 MOV L, C ; i
    006735: 055 DCR L ; -
    006736: 171 MOV A, C ; y
    006737: 306 011 ADI 011 ; ..
    006741: 117 MOV C, A ; O
    006742: 174 MOV A, H ; |
    006743: 315 210 016 CALL 016210 ; ...
    006746: 171 MOV A, C ; y
    006747: 326 011 SUI 011 ; ..
    006751: 117 MOV C, A ; O
    006752: 036 002 MVI E, 002 ; ..
    006754: 151 MOV L, C ; i
    006755: 055 DCR L ; -
    006756: 315 003 016 CALL 016003 ; ...
    006761: 151 MOV L, C ; i
    006762: 171 MOV A, C ; y
    006763: 306 012 ADI 012 ; ..
    006765: 107 MOV B, A ; G
    006766: 315 006 013 CALL 013006 ; ...
    006771: 055 DCR L ; -
    006772: 176 MOV A, M ; ~
    006773: 150 MOV L, B ; h
    006774: 055 DCR L ; -
    006775: 216 ADC M ; .
    006776: 311 RET ; .

    006777: 151 MOV L, C ; i
    007000: 055 DCR L ; -
    007001: 257 XRA A ; .
    007002: 167 MOV M, A ; w
    007003: 035 DCR E ; .
    007004: 370 RM ; .
    007005: 054 INR L ; ,
    007006: 054 INR L ; ,
    007007: 054 INR L ; ,
    007010: 176 MOV A, M ; ~
    007011: 027 RAL ; .
    007012: 167 MOV M, A ; w
    007013: 055 DCR L ; -
    007014: 176 MOV A, M ; ~
    007015: 027 RAL ; .
    007016: 167 MOV M, A ; w
    007017: 055 DCR L ; -
    007020: 176 MOV A, M ; ~
    007021: 027 RAL ; .
    007022: 167 MOV M, A ; w
    007023: 055 DCR L ; -
    007024: 176 MOV A, M ; ~
    007025: 027 RAL ; .
    007026: 303 002 016 JMP 016002 ; ...

    007031: 346 200 ANI 200 ; ..
    007033: 076 240 MVI A, 240 ; >.
    007035: 312 042 016 JZ 016042 ; .".
    007040: 076 255 MVI A, 255 ; >.
    007042: 315 060 000 CALL 000060 ; .0.
    007045: 311 RET ; .

    007046: 151 MOV L, C ; i
    007047: 054 INR L ; ,
    007050: 054 INR L ; ,
    007051: 054 INR L ; ,
    007052: 176 MOV A, M ; ~
    007053: 311 RET ; .

    007054: 315 107 016 CALL 016107 ; .G.
    007057: 137 MOV E, A ; _
    007060: 105 MOV B, L ; E
    007061: 004 INR B ; .
    007062: 151 MOV L, C ; i
    007063: 171 MOV A, C ; y
    007064: 306 011 ADI 011 ; ..
    007066: 117 MOV C, A ; O
    007067: 173 MOV A, E ; {
    007070: 346 200 ANI 200 ; ..
    007072: 312 114 016 JZ 016114 ; .L.
    007075: 315 137 012 CALL 012137 ; ._.
    007100: 171 MOV A, C ; y
    007101: 115 MOV C, L ; M
    007102: 157 MOV L, A ; o
    007103: 174 MOV A, H ; |
    007104: 315 210 016 CALL 016210 ; ...
    007107: 151 MOV L, C ; i
    007110: 054 INR L ; ,
    007111: 303 047 016 JMP 016047 ; .'.

    007114: 315 000 011 CALL 011000 ; ...
    007117: 303 100 016 JMP 016100 ; .@.

    007122: 315 151 016 CALL 016151 ; .i.
    007125: 107 MOV B, A ; G
    007126: 315 107 016 CALL 016107 ; .G.
    007131: 137 MOV E, A ; _
    007132: 346 200 ANI 200 ; ..
    007134: 312 145 016 JZ 016145 ; .e.
    007137: 035 DCR E ; .
    007140: 163 MOV M, E ; s
    007141: 170 MOV A, B ; x
    007142: 303 253 015 JMP 015253 ; ...

    007145: 034 INR E ; .
    007146: 303 140 016 JMP 016140 ; .`.

    007151: 036 377 MVI E, 377 ; ..
    007153: 034 INR E ; .
    007154: 326 012 SUI 012 ; ..
    007156: 362 153 016 JP 016153 ; .k.
    007161: 306 012 ADI 012 ; ..
    007163: 107 MOV B, A ; G
    007164: 173 MOV A, E ; {
    007165: 315 303 015 CALL 015303 ; ...
    007170: 170 MOV A, B ; x
    007171: 311 RET ; .

    007172: 171 MOV A, C ; y
    007173: 306 005 ADI 005 ; ..
    007175: 117 MOV C, A ; O
    007176: 076 016 MVI A, 016 ; >.
    007200: 315 210 016 CALL 016210 ; ...
    007203: 171 MOV A, C ; y
    007204: 326 005 SUI 005 ; ..
    007206: 117 MOV C, A ; O
    007207: 311 RET ; .

    007210: 104 MOV B, H ; D
    007211: 147 MOV H, A ; g
    007212: 176 MOV A, M ; ~
    007213: 054 INR L ; ,
    007214: 126 MOV D, M ; V
    007215: 054 INR L ; ,
    007216: 136 MOV E, M ; ^
    007217: 054 INR L ; ,
    007220: 156 MOV L, M ; n
    007221: 140 MOV H, B ; `
    007222: 105 MOV B, L ; E
    007223: 151 MOV L, C ; i
    007224: 167 MOV M, A ; w
    007225: 054 INR L ; ,
    007226: 176 MOV A, M ; ~
    007227: 162 MOV M, D ; r
    007230: 054 INR L ; ,
    007231: 163 MOV M, E ; s
    007232: 054 INR L ; ,
    007233: 160 MOV M, B ; p
    007234: 311 RET ; .
    ;
    ;------------------ Error: Powers of ten
    ;
    007235: 303 120 000 JMP 000120 ; .P.

    007240: 021 240 000 LXI D, 000240 ; ...
    007243: 000 NOP ; .
    007244: 004 INR B ; .
    ;
    ;------------------
    ;
    007245: 076 277 MVI A, 277 ; >.
    007247: 315 060 000 CALL 000060 ; .0.
    007252: 076 240 MVI A, 240 ; >.
    007254: 315 060 000 CALL 000060 ; .0.
    007257: 303 272 016 JMP 016272 ; ...

    007262: 105 MOV B, L ; E
    007263: 171 MOV A, C ; y
    007264: 306 017 ADI 017 ; ..
    007266: 157 MOV L, A ; o
    007267: 160 MOV M, B ; p
    007270: 014 INR C ; .
    007271: 014 INR C ; .
    007272: 076 272 MVI A, 272 ; >.
    007274: 315 060 000 CALL 000060 ; .0.
    007277: 315 305 017 CALL 017305 ; ...
    007302: 054 INR L ; ,
    007303: 167 MOV M, A ; w
    007304: 315 142 017 CALL 017142 ; .b.
    007307: 376 376 CPI 376 ; ..
    007311: 312 034 017 JZ 017034 ; ...
    007314: 376 025 CPI 025 ; ..
    007316: 312 061 017 JZ 017061 ; .1.
    007321: 376 360 CPI 360 ; ..
    007323: 302 245 016 JNZ 016245 ; ...
    007326: 315 253 017 CALL 017253 ; ...
    007331: 315 107 016 CALL 016107 ; .G.
    007334: 346 177 ANI 177 ; ..
    007336: 137 MOV E, A ; _
    007337: 346 100 ANI 100 ; .@
    007341: 007 RLC ; .
    007342: 267 ORA A ; .
    007343: 107 MOV B, A ; G
    007344: 173 MOV A, E ; {
    007345: 312 353 016 JZ 016353 ; ...
    007350: 076 200 MVI A, 200 ; >.
    007352: 223 SUB E ; .
    007353: 200 ADD B ; .
    007354: 167 MOV M, A ; w
    007355: 056 235 MVI L, 235 ; ..
    007357: 315 172 016 CALL 016172 ; .z.
    007362: 315 107 016 CALL 016107 ; .G.
    007365: 346 077 ANI 077 ; .?
    007367: 376 005 CPI 005 ; ..
    007371: 372 005 017 JM 017005 ; ...
    007374: 315 054 016 CALL 016054 ; .,.
    007377: 326 005 SUI 005 ; ..
    007401: 167 MOV M, A ; w
    007402: 303 365 016 JMP 016365 ; ...

    007405: 056 241 MVI L, 241 ; ..
    007407: 315 172 016 CALL 016172 ; .z.
    007412: 315 107 016 CALL 016107 ; .G.
    007415: 346 077 ANI 077 ; .?
    007417: 267 ORA A ; .
    007420: 312 257 017 JZ 017257 ; ...
    007423: 315 054 016 CALL 016054 ; .,.
    007426: 326 001 SUI 001 ; ..
    007430: 167 MOV M, A ; w
    007431: 303 015 017 JMP 017015 ; ...

    007434: 151 MOV L, C ; i
    007435: 055 DCR L ; -
    007436: 055 DCR L ; -
    007437: 066 000 MVI M, 000 ; 6.
    007441: 315 245 017 CALL 017245 ; ...
    007444: 137 MOV E, A ; _
    007445: 151 MOV L, C ; i
    007446: 055 DCR L ; -
    007447: 055 DCR L ; -
    007450: 106 MOV B, M ; F
    007451: 315 107 016 CALL 016107 ; .G.
    007454: 160 MOV M, B ; p
    007455: 173 MOV A, E ; {
    007456: 303 314 016 JMP 016314 ; ...

    007461: 315 253 017 CALL 017253 ; ...
    007464: 315 257 017 CALL 017257 ; ...
    007467: 315 305 017 CALL 017305 ; ...
    007472: 315 142 017 CALL 017142 ; .b.
    007475: 376 360 CPI 360 ; ..
    007477: 302 245 016 JNZ 016245 ; ...
    007502: 151 MOV L, C ; i
    007503: 054 INR L ; ,
    007504: 054 INR L ; ,
    007505: 176 MOV A, M ; ~
    007506: 346 037 ANI 037 ; ..
    007510: 107 MOV B, A ; G
    007511: 054 INR L ; ,
    007512: 176 MOV A, M ; ~
    007513: 267 ORA A ; .
    007514: 170 MOV A, B ; x
    007515: 372 123 017 JM 017123 ; .S.
    007520: 076 000 MVI A, 000 ; >.
    007522: 220 SUB B ; .
    007523: 054 INR L ; ,
    007524: 206 ADD M ; .
    007525: 167 MOV M, A ; w
    007526: 171 MOV A, C ; y
    007527: 306 015 ADI 015 ; ..
    007531: 157 MOV L, A ; o
    007532: 156 MOV L, M ; n
    007533: 174 MOV A, H ; |
    007534: 315 210 016 CALL 016210 ; ...
    007537: 303 331 016 JMP 016331 ; ...

    007542: 315 333 000 CALL 000333 ; ...
    007545: 376 240 CPI 240 ; ..
    007547: 312 142 017 JZ 017142 ; .b.
    007552: 376 255 CPI 255 ; ..
    007554: 302 170 017 JNZ 017170 ; .x.
    007557: 151 MOV L, C ; i
    007560: 054 INR L ; ,
    007561: 054 INR L ; ,
    007562: 054 INR L ; ,
    007563: 066 200 MVI M, 200 ; 6.
    007565: 303 142 017 JMP 017142 ; .b.

    007570: 376 253 CPI 253 ; ..
    007572: 312 142 017 JZ 017142 ; .b.
    007575: 326 260 SUI 260 ; ..
    007577: 370 RM ; .
    007600: 376 012 CPI 012 ; ..
    007602: 360 RP ; .
    007603: 137 MOV E, A ; _
    007604: 315 277 017 CALL 017277 ; ...
    007607: 163 MOV M, E ; s
    007610: 315 327 015 CALL 015327 ; ...
    007613: 267 ORA A ; .
    007614: 300 RNZ ; .
    007615: 315 277 017 CALL 017277 ; ...
    007620: 151 MOV L, C ; i
    007621: 054 INR L ; ,
    007622: 054 INR L ; ,
    007623: 206 ADD M ; .
    007624: 167 MOV M, A ; w
    007625: 055 DCR L ; -
    007626: 176 MOV A, M ; ~
    007627: 316 000 ACI 000 ; ..
    007631: 167 MOV M, A ; w
    007632: 055 DCR L ; -
    007633: 176 MOV A, M ; ~
    007634: 316 000 ACI 000 ; ..
    007636: 167 MOV M, A ; w
    007637: 330 RC ; .
    007640: 055 DCR L ; -
    007641: 055 DCR L ; -
    007642: 106 MOV B, M ; F
    007643: 004 INR B ; .
    007644: 160 MOV M, B ; p
    007645: 315 333 000 CALL 000333 ; ...
    007650: 303 175 017 JMP 017175 ; .}.

    007653: 151 MOV L, C ; i
    007654: 303 325 012 JMP 012325 ; ...

    007657: 171 MOV A, C ; y
    007660: 306 015 ADI 015 ; ..
    007662: 157 MOV L, A ; o
    007663: 136 MOV E, M ; ^
    007664: 153 MOV L, E ; k
    007665: 054 INR L ; ,
    007666: 161 MOV M, C ; q
    007667: 151 MOV L, C ; i
    007670: 113 MOV C, E ; K
    007671: 174 MOV A, H ; |
    007672: 315 210 016 CALL 016210 ; ...
    007675: 117 MOV C, A ; O
    007676: 311 RET ; .

    007677: 171 MOV A, C ; y
    007700: 306 016 ADI 016 ; ..
    007702: 157 MOV L, A ; o
    007703: 176 MOV A, M ; ~
    007704: 311 RET ; .

    007705: 151 MOV L, C ; i
    007706: 257 XRA A ; .
    007707: 167 MOV M, A ; w
    007710: 054 INR L ; ,
    007711: 167 MOV M, A ; w
    007712: 054 INR L ; ,
    007713: 167 MOV M, A ; w
    007714: 054 INR L ; ,
    007715: 167 MOV M, A ; w
    007716: 311 RET ; .

    Ok
    system

    A>That's all, folks!


    EOF

  11. Re: Lawrence Livermore Laboratory Floating-Point Package Pseudo-PRN File

    French Luser wrote:
    >
    > Ok. Now that we have poked in RAM the values of the Lawrence
    > Livermore Laboratory Floating-Point Package, how do we check
    > that it corresponds, EXACTLY, to what the old photocopy of the
    > source code contains?
    >


    Hey Luser, what part of my previous post did you
    *not* understand??? I found a .ARK file online
    that *contains* the LLL Floating Point source code.

    Here is the information again:


    VOLUME 2 LAWRENCE LIVERMORE BASIC AND DISK TINY BASIC

    2.1 84K LLLBASIC.ASM LLLBASIC INTERPRETER SOURCE
    2.2 38K LLLBASIC.COM SIMPLE PATCHED COM FOR CP/M
    2.3 2K LLLBASIC.DOC NOTES ON LLLBASIC
    2.4 61K LLLFP.ASM FLOATING-POINT PACKAGE FOR LLLBASIC
    2.5 2K LLLMON.ASM KLUGE MONITOR TO TEST LLL IN LLLBASIC.COM
    2.6 2K STARTREK.DOC COMMENTS ON STARTREK.TBI
    2.7 6K STARTREK.TBI TINY BASIC LOADABLE STARTREK
    2.8 3K TINYBAS.COM SHERRY version WANG PALO ALTO TINY
    BASIC,
    2.9 13K TINYBAS.DOC FULL INSTRUCTIONS FOR TINYBAS


    This can be downloaded as an .ARK file from:


    http://www.retroarchive.org/cpm/cdro...G/CPMUG002.ARK



    The LLLFP.ASM is the source file I think that you are inputting
    by hand/finger.


    --
    +----------------------------------------------------------------+
    | Charles and Francis Richmond richmond at plano dot net |
    +----------------------------------------------------------------+

  12. MAC and M80 Macros Compared


    LLLMAC.TXT
    ----------

    "MAC and M80 macros compared"

    The source code of the Lawrence Livermore Laboratory
    Floating-Point Package contains, page 12, a macro.

    I have no idea which assembler was used at LLL in 1975. All I
    know is that it was an absolute octal macro assembler.

    Today, 30 years later, under CP/M, the standard 8080 absolute
    macro assembler is MAC, and the standard Z-80 relocatable macro
    assembler is M80 (which, by default, also assembles 8080 code).

    So, just to be sure, and because there has been very, very
    little published on this subject in the comp.os.cpm Newsgroup, I
    decided to check what both produced. Fortunately, the code
    involved is confined to 2 subroutines just below the macro
    invocations.

    If you want to learn more about macros, the best text that I
    know is the "MAC User's Guide" (later published under the title
    "Programmer's Utilities Guide", when RMAC was introduced to be
    the default assembler of PL/I-80).

    If you want to practice a little, disassemble UNLOAD V2.0, then
    re-read the "MAC User's Guide". Can you see any similarity with
    the SEQIO library? Then, you are beginning to see the light.
    Notice how much shorter, and more high-level, the program is,
    with macros. (Too bad CP/M-86 has no macro assembler.)

    Let us just reminds what the BASIC "List Intel 8080 opcodes in
    octal" (LISTIOCT.BAS) program generated:

    147543: 026 100 MVI D, 100 ; .@
    147545: 315 237 013 CALL 013237 ; ...
    147550: 076 000 MVI A, 000 ; >.
    147552: 315 230 013 CALL 013230 ; ...
    147555: 076 377 MVI A, 377 ; >.
    147557: 267 ORA A ; .
    147560: 311 RET ; .

    147561: 026 077 MVI D, 077 ; .?
    147563: 315 237 013 CALL 013237 ; ...
    147566: 076 377 MVI A, 377 ; >.
    147570: 315 230 013 CALL 013230 ; ...
    147573: 076 177 MVI A, 177 ; >.
    147575: 267 ORA A ; .
    147576: 311 RET ; .

    147577: 026 077 MVI D, 077 ; .?
    147601: 315 237 013 CALL 013237 ; ...
    147604: 076 377 MVI A, 377 ; >.
    147606: 315 230 013 CALL 013230 ; ...
    147611: 076 077 MVI A, 077 ; >?
    147613: 267 ORA A ; .
    147614: 311 RET ; .


    Since M80 has a switch to produce an octal listing, we start
    with it. The only difference between the two files (M80 wants a
    MAC filetype, while MAC uses an ASM filetype) is that the MAC
    file contains an additional ASEG pseudo-op, because I don't like
    listing with lots of single quotes.

    wflt MACRO vmant,vchar,vflag,label
    MVI D,vchar
    CALL wchar
    label: MVI A,vmant
    CALL wmant
    MVI A,vflag
    ORA A
    RET
    ENDM
    ;
    ;--------------------------------
    000000' ASEG
    ORG 5543Q
    ;--------------------------------
    ;
    005543 026 100 wund: MVI D,40H
    005545 315 005711 CALL wchar
    005550 076 000 MVI A,00H
    005552 315 005702 CALL wmant
    005555 076 377 MVI A,0FFH
    005557 267 ORA A
    005560 311 RET
    ;
    005561 wund2: wflt 00H,40H,0FFH,uflwi
    005561 026 100 + MVI D,40H
    005563 315 005711 + CALL wchar
    005566 076 000 + uflwi: MVI A,00H
    005570 315 005702 + CALL wmant
    005573 076 377 + MVI A,0FFH
    005575 267 + ORA A
    005576 311 + RET
    ;
    ;--------------------------------
    ;
    005577 026 077 wovr: MVI D,3FH
    005601 315 005711 CALL wchar
    005604 076 377 MVI A,0FFH
    005606 315 005702 CALL wmant
    005611 076 177 MVI A,7FH
    005613 267 ORA A
    005614 311 RET
    ;
    005615 wovr2: wflt 0FFH,3FH,7FH,oflwi
    005615 026 077 + MVI D,3FH
    005617 315 005711 + CALL wchar
    005622 076 377 + oflwi: MVI A,0FFH
    005624 315 005702 + CALL wmant
    005627 076 177 + MVI A,7FH
    005631 267 + ORA A
    005632 311 + RET
    ;
    ;--------------------------------
    ;
    005633 026 077 wind: MVI D,3FH
    005635 315 005711 CALL wchar
    005640 076 377 MVI A,0FFH
    005642 315 005702 CALL wmant
    005645 076 077 MVI A,3FH
    005647 267 ORA A
    005650 311 RET
    ;
    005651 wind2: wflt 0FFH,3FH,3FH,indfi
    005651 026 077 + MVI D,3FH
    005653 315 005711 + CALL wchar
    005656 076 377 + indfi: MVI A,0FFH
    005660 315 005702 + CALL wmant
    005663 076 077 + MVI A,3FH
    005665 267 + ORA A
    005666 311 + RET
    ;
    ;--------------------------------
    ;
    005667 054 wzer: INR L
    005670 054 INR L
    005671 054 INR L
    005672 066 100 MVI M,40H
    005674 257 XRA A
    005675 315 005702 CALL wmant
    005700 267 ORA A
    005701 311 RET
    ;
    ;--------------------------------
    ;
    005702 055 wmant: DCR L
    005703 167 MOV M,A
    005704 055 DCR L
    005705 167 MOV M,A
    005706 055 DCR L
    005707 167 MOV M,A
    005710 311 RET
    ;
    ;--------------------------------
    ;
    005711 054 wchar: INR L
    005712 054 INR L
    005713 054 INR L
    005714 176 MOV A,M
    005715 346 200 ANI 80H
    005717 262 ORA D
    005720 167 MOV M,A
    005721 311 RET
    ;
    ;--------------------------------
    ;
    END


    As you can see, the code produced by the macros follows quite
    closely the one found in the old photocopy. As already
    explained, M80 does funny things with 16-bit quantities, that he
    displays differently than other assemblers. As a result, you
    can no longer check with the original assembler used at LLL.
    For more info, read about "octal" and "split octal". But the
    macros are generating the same code as the one gotten from the
    disassembly.

    Now, let us turn to MAC. MAC has no provision for producing
    listing in octal, so we are going to see what are going to be
    the hex values in the future recreated full source code.

    WFLT MACRO VMANT,VCHAR,VFLAG,LABEL
    MVI D,VCHAR
    CALL WCHAR
    LABEL: MVI A,VMANT
    CALL WMANT
    MVI A,VFLAG
    ORA A
    RET
    ENDM
    ;
    ;--------------------------------
    0B63 ORG 5543Q
    ;--------------------------------
    ;
    0B63 1640 WUND: MVI D,40H
    0B65 CDC90B CALL WCHAR
    0B68 3E00 MVI A,00H
    0B6A CDC20B CALL WMANT
    0B6D 3EFF MVI A,0FFH
    0B6F B7 ORA A
    0B70 C9 RET
    ;
    WUND2: WFLT 00H,40H,0FFH,UFLWI
    0B71+1640 MVI D,40H
    0B73+CDC90B CALL WCHAR
    0B76+3E00 UFLWI: MVI A,00H
    0B78+CDC20B CALL WMANT
    0B7B+3EFF MVI A,0FFH
    0B7D+B7 ORA A
    0B7E+C9 RET
    ;
    ;--------------------------------
    ;
    0B7F 163F WOVR: MVI D,3FH
    0B81 CDC90B CALL WCHAR
    0B84 3EFF MVI A,0FFH
    0B86 CDC20B CALL WMANT
    0B89 3E7F MVI A,7FH
    0B8B B7 ORA A
    0B8C C9 RET
    ;
    WOVR2: WFLT 0FFH,3FH,7FH,OFLWI
    0B8D+163F MVI D,3FH
    0B8F+CDC90B CALL WCHAR
    0B92+3EFF OFLWI: MVI A,0FFH
    0B94+CDC20B CALL WMANT
    0B97+3E7F MVI A,7FH
    0B99+B7 ORA A
    0B9A+C9 RET
    ;
    ;--------------------------------
    ;
    0B9B 163F WIND: MVI D,3FH
    0B9D CDC90B CALL WCHAR
    0BA0 3EFF MVI A,0FFH
    0BA2 CDC20B CALL WMANT
    0BA5 3E3F MVI A,3FH
    0BA7 B7 ORA A
    0BA8 C9 RET
    ;
    WIND2: WFLT 0FFH,3FH,3FH,INDFI
    0BA9+163F MVI D,3FH
    0BAB+CDC90B CALL WCHAR
    0BAE+3EFF INDFI: MVI A,0FFH
    0BB0+CDC20B CALL WMANT
    0BB3+3E3F MVI A,3FH
    0BB5+B7 ORA A
    0BB6+C9 RET
    ;
    ;--------------------------------
    ;
    0BB7 2C WZER: INR L
    0BB8 2C INR L
    0BB9 2C INR L
    0BBA 3640 MVI M,40H
    0BBC AF XRA A
    0BBD CDC20B CALL WMANT
    0BC0 B7 ORA A
    0BC1 C9 RET
    ;
    ;--------------------------------
    ;
    0BC2 2D WMANT: DCR L
    0BC3 77 MOV M,A
    0BC4 2D DCR L
    0BC5 77 MOV M,A
    0BC6 2D DCR L
    0BC7 77 MOV M,A
    0BC8 C9 RET
    ;
    ;--------------------------------
    ;
    0BC9 2C WCHAR: INR L
    0BCA 2C INR L
    0BCB 2C INR L
    0BCC 7E MOV A,M
    0BCD E680 ANI 80H
    0BCF B2 ORA D
    0BD0 77 MOV M,A
    0BD1 C9 RET
    ;
    ;--------------------------------
    ;
    0BD2 END


    Again, the code produced by the macro is preceded by a "+" and,
    again, it is the same as the one produced 30 years ago at LLL.
    That's the beauty of working with well-defined things like
    assembler. We are now sure that those macros work the same under
    MAC and M80, and produce the same stuff as 30 years ago.

    Now, we have seen the output of M80 in octal, and the output of
    MAC in hex. But are they the same? The only way to know is to
    compare both outputs. To be in the same radix, we re-assemble
    with M80 without the octal switch, then run TYPEATWO (which was
    published in the comp.os.cpm Newsgroup), but modified just to
    show the code generated.

    run"typeatwo

    Type 2 ASCII files side-by-side.

    Enter 1st filename.typ: ? lllmac.prn
    2nd filename.typ: ? lllm80.prn

    0B63 1640 0B63 16 40
    0B65 CDC90B 0B65 CD 0BC9
    0B68 3E00 0B68 3E 00
    0B6A CDC20B 0B6A CD 0BC2
    0B6D 3EFF 0B6D 3E FF
    0B6F B7 0B6F B7
    0B70 C9 0B70 C9

    0B71+1640 0B71 16 40
    0B73+CDC90B 0B73 CD 0BC9
    0B76+3E00 0B76 3E 00
    0B78+CDC20B 0B78 CD 0BC2
    0B7B+3EFF 0B7B 3E FF
    0B7D+B7 0B7D B7
    0B7E+C9 0B7E C9

    0B7F 163F 0B7F 16 3F
    0B81 CDC90B 0B81 CD 0BC9
    0B84 3EFF 0B84 3E FF
    0B86 CDC20B 0B86 CD 0BC2
    0B89 3E7F 0B89 3E 7F
    0B8B B7 0B8B B7
    0B8C C9 0B8C C9

    0B8D+163F 0B8D 16 3F
    0B8F+CDC90B 0B8F CD 0BC9
    0B92+3EFF 0B92 3E FF
    0B94+CDC20B 0B94 CD 0BC2
    0B97+3E7F 0B97 3E 7F
    0B99+B7 0B99 B7
    0B9A+C9 0B9A C9

    0B9B 163F 0B9B 16 3F
    0B9D CDC90B 0B9D CD 0BC9
    0BA0 3EFF 0BA0 3E FF
    0BA2 CDC20B 0BA2 CD 0BC2
    0BA5 3E3F 0BA5 3E 3F
    0BA7 B7 0BA7 B7
    0BA8 C9 0BA8 C9

    0BA9+163F 0BA9 16 3F
    0BAB+CDC90B 0BAB CD 0BC9
    0BAE+3EFF 0BAE 3E FF
    0BB0+CDC20B 0BB0 CD 0BC2
    0BB3+3E3F 0BB3 3E 3F
    0BB5+B7 0BB5 B7
    0BB6+C9 0BB6 C9

    Now that all doubts regarding the macros have been cleared, all
    that remains to do is work on the full source code.

    A>That's all, folks!


    EOF



  13. Re: Lawrence Livermore Laboratory Floating-Point Package Pseudo-PRN File

    "Charles Richmond" wrote:

    > I found a .ARK file online that *contains* the LLL Floating Point source
    > code.


    Well, on my trip to the cybercafe, I happen to have the beginning of a file
    that I wanted to write tonight, after re-reading what you have posted, just
    to be sure. But, since you are restless, I will publish it as is.

    Please read the following.

    Yours Sincerely,
    "French Luser"

    LLLDIF.TXT
    ----------

    Ok, so several people, having a long memory, mentioned that the
    LLLBASIC interpreter, originating, like the Floating-Point
    Package under discussion in this thread, from the Lawrence
    Livermore Laboratory, had a file named "LLLFP.ASM"...

    At first sight, the ORG is different. Changing it, we still get
    an unusually big file. Investigating, we find a "jump block"
    located at the very end of the file, preceded by another ORG.

    Commenting out all those novelties, we finally get:

    A>mac lllfp
    CP/M MACRO ASSEM 2.0
    0F94
    008H USE FACTOR
    END OF ASSEMBLY

    Ok, but what are the "characteristics" of the photocopied source
    code?

    A>mac toto
    CP/M MACRO ASSEM 2.0
    0FCF
    008H USE FACTOR
    END OF ASSEMBLY

    Argh! It is longer...

    So, the LLFP.ASM contained with LLLBASIC is 59 bytes shorter
    than the photocopy of the source code.

    Now, all that remains to do is to find what is the difference.


    EOF



  14. Re: MAC and M80 Macros Compared


    French Luser wrote:
    > with macros. (Too bad CP/M-86 has no macro assembler.)


    ..IF. you don't mind cross development..
    NASM, the Netwide Assembler, has strong macro capabilities. You can
    use it to program for CP/M-86. See the example: PRGMHEAD.NSM which
    uses BINCMD.MAC [Binary output to .CMD form] Macros to generate the
    PRGMHEAD.CMD example for CP/M-86.

    lookin:

    ftp://project001.serveftp.net/cpm86/NASM4CPM86/

    PRGMHEAD.CMD is an example stub program which just conout's the message
    :
    --Normal Program Exit--
    and it shows the BINCMD Macros invocation. The command line to nasm to
    assemble prgmhead.nsm is in the source, and for reference, is:

    NASM -f bin -o prgmhead.cmd -l prgmhead.lst prgmhead.nsm

    NASM.EXE works fine under msDos, DRDos. As well as under Win95, Win
    98, and XP, most easily by setting up a shortcut to nasm.exe with the
    cmdline parameter: [current path]\NASM.EXE ? This is setup in the
    'Shortcut to NASM.EXE Properties' box.

    The '?' cmdline parameter to the shortcut forces a dosbox query for the
    parameter list for nasm. You would enter: '-f bin -o prgmhead.cmd -l
    prgmhead.lst prgmhead.nsm' there.

    There other ways to set this up, as NASM will take a makefile as
    cmdline parameter.

    As is typical in cross development, you need to transfer to CP/M-86
    media using DISK22, for example.

    Steve


  15. Re: How to poke Octal values in biased locations in RAM?

    Errata to POCTAL.BAS:

    To be able to address the whole 64KB memory of the 8080, change the "4" to "6"
    in line 90:

    > 90 PRINT OCT$ (oa, 4) ": " OCT$ (PEEK (sa), 3) " " ;


    Yours Sincerely,
    "French Luser"



  16. Re: MAC and M80 Macros Compared

    Steve Dubrovich wrote (among other things):

    > (...) The command line to nasm to
    > assemble prgmhead.nsm is in the source, and for reference, is:
    >
    > NASM -f bin -o prgmhead.cmd -l prgmhead.lst prgmhead.nsm


    Gasp!

    We are a very, very long way from:

    A>mac filename

    This must be progress?

    Yours Sincerely,
    "French Luser"




  17. Re: LLNL Library

    Searching for more about the LLLFPP, I found the following, written 2002 by
    one "Kai Ruottu":

    " What could be hoped is that the people who work hard with GCC and
    need soft-float, could implement the basic float operations in the
    best possible algorithms for each CPU, in optimized assembly. In the
    'assembly-age' in 70's and early 80's almost every "How to write
    embedded apps"-book included these routines for the processors of
    that age: '8080/85', 'z80', '8088/86',... But no implementations
    for H8/300, AVR, MSP430, MN10200 etc. CPUs of this age can be seen.

    (...)

    The 8- and 16-bit processors really are not aimed for 'number
    crunching', but sometimes someone however wants to do this in
    some device. My estimate to the work to write soft-float routines
    in assembly for H8/300 for instance, could be one week, for a
    person who knows that CPU and has programmed in assembly for it
    a year or more... A total novice can spend half an year learning
    the processor, assembly, soft-float algorithms and such while
    writing the routines and reporting what was done. I remember one
    student in early 80's doing soft-float routines for z80 as his
    diploma-work (for a MSc-level examination) and the estimate for
    these is half-an-year... The person really didn't know much about
    these things when starting. Another earlier example was the Lawrence
    Livermore Laboratory's Public Domain BASIC-interpreter (LLLBASIC) for
    8080. It's soft-float implementation is one of the weirdest I have
    seen. Ok, it was done in Moscow (Idaho), and when all the 8-bit GCC
    implementations (AVR, MSP430,...) seem to have something to do with
    the 'other' Moscow or StPetersburg, maybe this problem can get some
    help from there ;-)

    Can we blame the university professors about this condition now?
    Why writing soft-float routines into the AVR, MSP430, H8/300 etc.
    wouldn't be good 'practice' nowadays for the students graduating
    in computer architectures, embedded systems and such?

    In the H8/300 case it probably could help if every company which
    thinks that it is a good idea to better the soft-float routines in
    this architecture with GCC, would use $100 and give it to the Kpit
    (www.kpit.com) in India... If even 100 companies could do this, the
    $10.000 could enable them to put a guy or gal to think this thing
    for a couple of months...

    Cheers, Kai"

    Well, it just confirm my feeling, that the Newbies no longer understand the
    incredible number of pitfalls in any FP package. IEEE-754 is the only FP
    standard that has ever been adopted. So, anybody with a clear understanding of
    this matter (FP) would choose to implement it on his system, rather than
    "re-invent the wheel". One could then write an extensive library of checks,
    showing all the pitfalls that any computation using FP can generate (and that
    99.99% of people don't realize: for them, it is "natural" that a computer can
    compute correct result, while the fundamental problem is that computers use a
    binary system while humans use a decimal system, and FP only makes the matter
    much, much worse).

    (Personally, now that I have recreated the source code of 4 or 5 FP packages,
    I wish that I had enough time and/or money to do one. I like technical stuff.
    In English, they say: "Art for art's sake".)

    Yours Sincerely,
    "French Luser"




  18. Re: LLNL Library

    (The following remarks will be published in the next release of Sun's
    Numerical Computation Guide as an addendum to Appendix D, David Goldberg's
    "What Every Computer Scientist Should Know About Floating-Point Arithmetic".)

    Many programmers like to believe that they can understand the semantics of a
    program and prove that it will work correctly without reference to the
    compiler that compiles it or the computer that runs it. In many ways,
    supporting this belief is a worthwhile goal for the designers of computer
    systems and programming languages. Unfortunately, when it comes to
    floating-point arithmetic, the goal is virtually impossible to achieve. The
    authors of the IEEE standards knew that, and they didn't attempt to achieve
    it. As a result, despite nearly universal conformance to (most of) the IEEE
    754 standard throughout the computer industry, programmers of portable
    software will have to continue to cope with unpredictable floating-point
    arithmetic for the foreseeable future.
    Yours Sincerely,

    "French Luser"





  19. Re: LLNL Library

    Charles "Restless" Richmond wrote triumphally, saying that he
    had found a copy of the Lawrence Livermore Laboratory
    Floating-Point Package (that I was just trying to recreate
    logically, step by step, from a bad photocopy).

    Well, Charles, your message got me thinking.

    Could you be right?

    Consider:

    1) the length of your file and mine disagree

    2) the last page of the photocopy happens to be the "symbol
    table" of the LLLFPP.

    One very simple way to know for sure if you are right would be
    to assemble your file, then compare it with the "symbol table"
    (that you would have printed: it is only one page long).

    In case you wonder, me, I get:

    Symbols:
    005064 ABCH 005757 ACPR 007145 ADD1
    004737 ADD2 004726 ADDZ 006306 AGN4
    006421 ALDN 005741 AORS 007353 APLS
    005075 BBCH 005342 BCHK 006215 BCTL
    005042 BMIN 006104 CCHK 005533 CCMP
    005514 CFCHE 005026 COM1 005050 COM2
    007172 COPT 007210 COPY 004515 CRIN
    006151 CSIGN 006161 CSTR 007151 CTWO
    006440 CVRT 005406 DADD 005435 DCLR
    005764 DCMP 007434 DECPT 005724 DECR
    005316 DFXL 006703 DIGO 007114 DIVIT
    005351 DLST 005370 DRST 006232 DSQRT
    005446 DSUB 004422 DTST2 006020 ENT1
    006012 ENT2 007645 EP1 006302 EPOS
    004634 EQ02 007245 ERR 006431 ERSQ
    007140 FINIT 007100 FINUP 005325 FLOAT
    007653 FLTSGN 005263 FXL2 005501 GCHAR
    007046 GCHR 007047 GETA 007107 GETEX
    007677 GETN 007542 GNUM 004473 GOON
    006556 GOTV 005666 INCR 005706 INCR2
    005703 INCR3 005604 INDF1 005650 INDFC
    007461 INEXP 000333 INP 006653 INPOP
    007262 INPUT 007415 INT1 007365 INT5
    005177 INTR 005106 L000 005110 L001
    005037 L002 005113 L003 005116 L128
    005121 L129 005124 L131 004534 LADD
    004542 LADS 005002 LASD 006071 LDCP
    004400 LDIV 004577 LLTB 005127 LMCM
    006100 LMCP 005137 LMUL 007153 LOOP
    006777 LSFT 004540 LSUB 006044 LXFR
    005244 MADD 004757 MANT 000077 MAXCH
    006611 MDGN 006627 MDSKP 000300 MINCH
    007054 MORD 006171 MSFH 006727 MULTT
    004604 NCHK 006470 NNZRO 005255 NORM
    004652 NOT0 006525 NZRO 005566 OFLW1
    006133 OFLWC 006622 OK1 000060 OUTR
    006027 OVER 007042 PLSV 006650 POPD
    007272 PRMT 004447 REP3 006046 REP5
    005271 REP6 007657 SAVEN 007331 SCALE
    005722 SCCFG 005313 SCHAR 004614 SH10
    007031 SIGN 006123 STORC 004671 SUBZ
    007241 TEN 007235 TEN5 007002 TLOOP
    007003 TLP2 006574 TRY1 007570 TRYP
    007405 TRYTN 006601 TST1 006541 TSTB
    007314 TSTEX 007575 TSTN 005747 TSTR
    007122 TWOD 005550 UFLW1 006142 UFLWC
    007523 USEIT 005637 WCHAR 005577 WIND
    005630 WMANT 005561 WOVR 005543 WUND
    005615 WZER 005657 WZERC 005332 ZCHK
    005332 ZMCHK 007705 ZROIT

    (The "symbol table" has the following particularities:

    1) it contains the values of the registers...

    2) there are 4 labels that are not, in practice, used

    3) the value of the WFLT macro is included in the "symbol
    table", while M80 puts it aside, in a macro section.)

    Hope it helps... Good luck!

    (Apparently, "There is no royal way to the source code.")

    Yours Sincerely,
    "French Luser"


    EOF



  20. Re: LLNL Library

    LLLERR.TXT
    ----------

    Erratas

    Now that I have an ASM file that assembles correctly, and
    generates the same "symbol table" as the one contained in the
    old photocopy, I "closed the loop" by comparing the COM file
    produced with the COM file containing the BIN file of LLLPPP.

    It turns out that, while poking the octal values, I saved a
    portion with 00H bytes, instead of 1D-0B (hex) pairs. So,
    everytime you see 000 000 below, poke instead 1D and 0B.

    005137: 315 151 014 CALL 014151 ; .i.
    005142: 315 332 012 CALL 012332 ; ...
    005145: 312 257 013 JZ 013257 ; ...
    005150: 315 342 012 CALL 012342 ; ...
    005153: 312 257 013 JZ 013257 ; ...
    005156: 135 MOV E, L ; ]
    005157: 151 MOV L, C ; i
    005160: 315 000 000 CALL 000000 ; ...
    005163: 153 MOV L, E ; k
    005164: 026 044 MVI D, 044 ; .$
    005166: 315 000 000 CALL 000000 ; ...
    005171: 332 000 000 JC 000000 ; ...
    005174: 175 MOV A, L ; }
    005175: 151 MOV L, C ; i
    005176: 117 MOV C, A ; O
    005177: 315 000 000 CALL 000000 ; ...
    005202: 175 MOV A, L ; }
    005203: 151 MOV L, C ; i
    005204: 117 MOV C, A ; O
    005205: 025 DCR D ; .
    005206: 302 000 000 JNZ 000000 ; ...
    005211: 315 000 000 CALL 000000 ; ...
    005214: 372 000 000 JM 000000 ; ...
    005217: 135 MOV E, L ; ]
    005220: 151 MOV L, C ; i
    005221: 315 000 000 CALL 000000 ; ...
    005224: 153 MOV L, E ; k
    005225: 315 000 000 CALL 000000 ; ...
    005230: 203 ADD E ; .
    005231: 376 040 CPI 040 ; .
    005233: 312 000 000 JZ 000000 ; ...
    005236: 326 001 SUI 001 ; ..
    005240: 315 000 000 CALL 000000 ; ...
    005243: 311 RET ; .

    005244: 175 MOV A, L ; }
    005245: 151 MOV L, C ; i
    005246: 117 MOV C, A ; O
    005247: 315 000 000 CALL 000000 ; ...
    005252: 303 177 012 JMP 012177 ; ...

    Later, I made 3 typos.

    1) At 005331, I saw a 312 when it was a 012 (in hex: replace CA
    by 0A at 01D9).

    2) At 5510, I saw a 150 when it was a 100 (in hex: replace 68 by
    40 at 0248).

    3) At 6706, I saw a 050 when it was a 060 (in hex: replace 28 by
    30 at 04C6).

    (If in doubt, compare with the LLLFP.ASM file contained with the
    source code of LLLBASIC in the Volume 2 of the CP/M User Group.
    This version does not contain the square root routine.)

    You should now have a recreated source code the Lawrence
    Livermore Laboratory Floating-Point Package: Enjoy!

    Yours Sincerely,
    "French Luser"


    EOF



+ Reply to Thread
Page 1 of 2 1 2 LastLast