Loading ...
Sorry, an error occurred while loading the content.
 

TinyELF 1.10 Release Pending

Expand Messages
  • druske
    I m preparing to release an updated version of TinyELF for the Palm OS. I resolved keyboard/Graffiti support by adding a Graffiti preference that can be
    Message 1 of 13 , May 5, 2003
      I'm preparing to release an updated version of TinyELF for the Palm
      OS. I resolved keyboard/Graffiti support by adding a Graffiti
      preference that can be toggled between Hexpad and ASCII.

      In Hexpad mode, entering characters in Graffiti or a Palm keyboard
      results in hex characters being entered as though keyed into the hex
      keypad; additionally, "R", "L", and "M" flip the Run, Load, and Memory
      Protect toggles and the "Enter" key pulses the hexpad's "I" button.
      The hexpad is still wired as on the Netronics ELF II (input port 4 and
      EF4). Very slick when used with a Palm keyboard...

      In ASCII mode, keyboards varied a bit. I've opted to simulate a
      parallel keyboard in TinyELF. But what to tie it to? Port 1 is used to
      turn on the 1861, and port 4 is used by the hexpad; likewise, EF1 is
      used for 1861 status and EF4 reflects the state of the hexpad's "I"
      button. Reasoning that nobody else was going to be wiring in a
      peripheral, I'm inputting ASCII characters simultaneously on parallel
      ports 2, 3, 5, 6, and 7, and strobing on both EF2 and EF3 --- truly a
      "parallel" keyboard if there ever was one!

      Other changes range from the obscure (IDL interrupt behavior fixed,
      warning if loading a program past the end of memory) to the obvious
      (the "Classic" skin now uses 5x7 dot matrix displays instead of 7
      segment).

      I'd like to include a few more canned programs with the new release.
      In particular, I'm wondering if anyone has a build of Tiny BASIC that
      uses the 1861 for display and a parallel keyboard with EF strobe for
      input. If I can recover the cassette, I have a build of figForth that
      meets these requirements.

      I've also keyed in an old kaleidoscope program written by V. G. Cayer;
      rather slow on TinyELF, but if speed were the point why would anyone
      emulate an 1802 on a Palm handheld? :)

      Does anyone else have an 1802 program that might be worth distributing
      with TinyELF?

      Thanks,
      Dave
    • erd_6502
      ... Cool. How s it look on B&W Palms? (I have a III and a Vx) ... Good idea. ... Can t help you with BASIC... all of my 1802 stuff is for the 256 byte Elf
      Message 2 of 13 , May 5, 2003
        --- In cosmacelf@yahoogroups.com, "druske" <dave@r...> wrote:
        > I'm preparing to release an updated version of TinyELF for the Palm
        > OS...

        Cool. How's it look on B&W Palms? (I have a III and a Vx)

        > I'd like to include a few more canned programs with the new release.

        Good idea.

        > In particular, I'm wondering if anyone has a build of Tiny BASIC
        > that uses the 1861 for display and a parallel keyboard...

        Can't help you with BASIC... all of my 1802 stuff is for the 256 byte
        Elf and the VIP.

        > Does anyone else have an 1802 program that might be worth
        > distributing with TinyELF?

        I have some noddy ones for the Elf (blink Q - speed determined by
        switches; count on displays, echo input switches on displays). I
        did a bunch of stuff for the VIP, but what I have of that is on
        a cassette tape (and is probably a copy of CHIP-8 and a bunch of
        progs out of the manual).

        Do you need some <32 byte toy programs that would run on an
        unexpanded Elf?

        -ethan
      • Dave Ruske
        TinyELF works fine on monochrome Palms... it was actually developed on a Vx. I m not sure if it works properly on the newest ARM based Palms with OS 5.0,
        Message 3 of 13 , May 6, 2003
          TinyELF works fine on monochrome Palms... it was actually developed on
          a Vx. I'm not sure if it works properly on the newest ARM based Palms
          with OS 5.0, though: it's written in Quartus Forth, and there've been
          some reports of Quartus having problems on 5.0.

          Some smaller programs could be useful, and are always good for people
          just learning the 1802 (and I get email now and then from people doing
          just that). Programs using the 1861 can be fun, but ISRs are difficult
          to understand when you've just been exposed to hexadecimal! I'd
          encourage you to either upload the files to the message board or email
          them to me if you prefer. I'll credit you as the program's author
          unless you specify otherwise.

          Thanks,
          Dave

          On Tuesday, May 6, 2003, at 12:45 AM, erd_6502 wrote:
          > Cool. How's it look on B&W Palms? (I have a III and a Vx)
          > [...]
          > Do you need some <32 byte toy programs that would run on an
          > unexpanded Elf?
        • Lee Hart
          ... Tiny BASIC should be patch-able to use any input and output device. ... I sent you my work-in-progress on Tom Pittman s The First Book of Tiny BASIC
          Message 4 of 13 , May 6, 2003
            Dave Ruske wrote:
            > I'm preparing to release an updated version of TinyELF for the
            > Palm OS. I'd like to include a few more canned programs with the
            > new release.
            >
            > In particular, I'm wondering if anyone has a build of Tiny BASIC
            > that uses the 1861 for display and a parallel keyboard.

            Tiny BASIC should be patch-able to use any input and output device.

            > Does anyone else have an 1802 program that might be worth
            > distributing with TinyELF?

            I sent you my work-in-progress on Tom Pittman's "The First Book of Tiny
            BASIC Programs", didn't I? It has quite a few good ones.
            --
            Lee A. Hart Ring the bells that still can ring
            814 8th Ave. N. Forget your perfect offering
            Sartell, MN 56377 USA There is a crack in everything
            leeahart_at_earthlink.net That's how the light gets in - Leonard Cohen
          • druske
            TinyELF can be patched to use any input and output devices, true, but I thought perhaps someone had a copy with Pittman s DOTS program built-in. I wrote a
            Message 5 of 13 , May 6, 2003
              TinyELF can be patched to use any input and output devices, true, but
              I thought perhaps someone had a copy with Pittman's DOTS program
              built-in. I wrote a generic 1861 TVT some years back that I used with
              figForth (and that's one thing I'm hoping to recover), but I thought
              Pittman's variable width characters might make for something more
              readable.
            • Lee Hart
              ... I have the source for both Pittman s Tiny BASIC and DOTS program, but haven t gotten around to trying them both out together. I ve just been using the Q
              Message 6 of 13 , May 6, 2003
                druske wrote:
                > TinyELF can be patched to use any input and output devices, true, but
                > I thought perhaps someone had a copy with Pittman's DOTS program
                > built-in. I wrote a generic 1861 TVT some years back that I used with
                > figForth (and that's one thing I'm hoping to recover), but I thought
                > Pittman's variable width characters might make for something more
                > readable.

                I have the source for both Pittman's Tiny BASIC and DOTS program, but
                haven't gotten around to trying them both out together. I've just been
                using the Q and EF4 lines to talk to a serial terminal.
                --
                Lee A. Hart Ring the bells that still can ring
                814 8th Ave. N. Forget your perfect offering
                Sartell, MN 56377 USA There is a crack in everything
                leeahart_at_earthlink.net That's how the light gets in - Leonard Cohen
              • cdp1861
                Hi, I have been somewhat busy in the last months and just dropped by. ... that ... for ... In the dark ages I used to have a copy from Netronics for the Elf II
                Message 7 of 13 , May 7, 2003
                  Hi,

                  I have been somewhat busy in the last months and just dropped by.

                  > In particular, I'm wondering if anyone has a build of Tiny BASIC
                  that
                  > uses the 1861 for display and a parallel keyboard with EF strobe
                  for
                  > input.>

                  In the dark ages I used to have a copy from Netronics for the Elf II
                  with 1661 Text output (terrible!) and parallel ASCII Keyboard as
                  input device. Perhaps I will find it.

                  > Does anyone else have an 1802 program that might be worth
                  distributing
                  > with TinyELF?

                  I wanted to convert all old tapes, but I did not get to it yet.
                  There should be a few interesting things. Isn't my old Star Wars
                  program where you have to shoot the imperial walkers somewhere
                  around still? We had it running on Bill Rowes's emulator.

                  Richard
                • bill_rowe_ottawa
                  Lee: Could you post the DOTS program or tell me where to find it? (I assume this is the code used to generate the dot matrix 1861 output from Tiny Basic -
                  Message 8 of 13 , May 13, 2003
                    Lee: Could you post the DOTS program or tell me where to find it? (I
                    assume this is the code used to generate the dot matrix 1861 output
                    from Tiny Basic - right?)


                    > I have the source for both Pittman's Tiny BASIC and DOTS program,
                    but
                    > haven't gotten around to trying them both out together. I've just
                    been
                    > using the Q and EF4 lines to talk to a serial terminal.
                    > --
                    > Lee A. Hart Ring the bells that still can ring
                    > 814 8th Ave. N. Forget your perfect offering
                    > Sartell, MN 56377 USA There is a crack in everything
                    > leeahart_at_earthlink.net That's how the light gets in - Leonard
                    Cohen
                  • Lee Hart
                    ... Right! Here it is. (I hope a 20k file isn t too big). -- Lee A. Hart Ring the bells that still can ring 814 8th Ave. N. Forget
                    Message 9 of 13 , May 14, 2003
                      bill_rowe_ottawa wrote:
                      > Lee: Could you post the DOTS program or tell me where to find it? (I
                      > assume this is the code used to generate the dot matrix 1861 output
                      > from Tiny Basic - right?)

                      Right! Here it is. (I hope a 20k file isn't too big).
                      --
                      Lee A. Hart Ring the bells that still can ring
                      814 8th Ave. N. Forget your perfect offering
                      Sartell, MN 56377 USA There is a crack in everything
                      leeahart_at_earthlink.net That's how the light gets in - Leonard Cohen

                      ----------

                      ;-----------------------------------------------;
                      ; ;
                      ; DDDD OOOOOO TTTTTT SSSS ;
                      ; DD DD OO OO TT SS ;
                      ; DD DD OO OO TT SS ;
                      ; DD DD OO OO TT SS ;
                      ; DDDD OOOOOO TT SSSS ;
                      ; ;
                      ; A text generator for the RCA 1861 ;
                      ; Written by Tom Pittman Aug 1, 1978 ;
                      ; Entered by Lee A. Hart Feb 4, 2002 ;
                      ;-----------------------------------------------;
                      ;
                      ; Register Assignments
                      ;
                      ; 0 ; R0 = DMA buffer pointer
                      ; 1 ; R1 = Interrupt PC
                      ; 2 ; R2 = Stack pointer
                      ; 3 ; R3 = Main PC
                      ; 4 ; R4 = CALL PC
                      ; 5 ; R5 = EXIT PC
                      ; 6 ; R6 = return address (not used)
                      ; 7 ; R7 = PAGE0 FETCH PC
                      BP: EQU 8 ; R8 = software buffer pointer
                      BC: EQU 9 ; R9 = bit counter
                      SH: EQU 10 ; RA = shift & decrement PC
                      ; 11 ; RB = (not used)
                      ; 12 ; RC = (not used)
                      PZ: EQU 13 ; RD = PAGE0 address pointer
                      U: EQU 14 ; RE = Low byte is temp
                      X: EQU 15 ; RF = scratch
                      ;
                      ; EQUATES
                      ;
                      LDI0: EQU 97H ; GHI R7 - CLEAR ACCUM. MACRO (from Tiny BASIC)
                      ; (was GHI R13 in Tom Pittman's code)
                      FECH: EQU 0D7H ; SEP R7 - PAGE 0 MACRO
                      ;
                      ; Page 0 RAM allocation - all are offsets above PAGE0 base address
                      ;
                      TVXY: EQU +8 ; 1861 cursor position & bit pointer (3 bytes)
                      PSTK: EQU +0BH ; pixel stack pointer
                      MASK: EQU +0CH ; temporary storage for bit mask
                      TIME: EQU +0DH ; interrupt counter (3 bytes)
                      ; (real time clock when when display is on)
                      BS: EQU +13H ; backspace
                      CANC: EQU +14H ; cancel
                      ;
                      ; Other RAM allocations
                      ;
                      ORG 160
                      ;
                      ; Turn on TV display
                      ;
                      TVON: LDI LOW INTS ; setup interrupt service routine
                      PLO R1
                      LDI HIGH INTS
                      PHI R1
                      B1 $ ; loop until EF1 goes false
                      ; (EF1 brackets the 1861 interrupt request)
                      INP 1 ; turn on 1861
                      SEX R3
                      RET ; enable interrupts
                      EXIT ; return
                      ;
                      ; Keyboard driver - for parallel keyboard on port 7, strobe on EF3
                      ;
                      BLNK: DB FECH,LOW TIME+2 ; look at timer
                      SHL
                      SHL
                      SHL
                      BNZ KEYN+3
                      SHLC ; every half second,
                      CALL TVD ; toggle the cursor
                      KEYN: CALL TVON ; turn display on
                      BN3 BLNK ; wait for KEYIN
                      DB LDI0
                      CALL TVD ; turn cursor off
                      INP 7 ; get KEYIN
                      ;
                      ; Display driver for Tiny BASIC
                      ;
                      DISP: CALL TVD ; display char
                      PLO U
                      XRI 0AH ; if <LF>,
                      BZ HOLD ; yes
                      B4 HOLD ; also hold on EF4
                      GLO U
                      EXIT
                      ;
                      HOLD: CALL TVON ; turn display on
                      LDI 12 ; delay some
                      PHI X
                      DEC X
                      GHI X
                      BNZ $-2
                      B4 $ ; then wait for /4
                      SEX R3
                      OUT 1 ; turn display off
                      DB 0
                      GLO U
                      DIS
                      EXIT
                      ;
                      ; (ORG in last 40 bytes of page)
                      ;
                      ; Character Formatter - ASCII character in ACC.
                      ;
                      TVD: ANI 7FH ; set high bit to 0
                      PLO U ; save for exit
                      SEX R2 ; save registers
                      GLO SH
                      STXD
                      GHI SH
                      STXD
                      GLO BC
                      STXD
                      GHI BC
                      STXD
                      GLO BP
                      STXD
                      GHI BP
                      STXD
                      LDI LOW SHFT ; set up shift PC
                      PLO SH
                      LDI HIGH SHFT
                      PHI SH
                      DB FECH,TVXY ; get pointer
                      PHI BP ; which is cursor
                      LDA PZ
                      PLO BP
                      LDA PZ ; and bit pointer
                      ANI 7 ; (only want low 3 bits)
                      PHI BC
                      DB FECH,LOW BS; is this cancel?
                      GLO U
                      XOR ; (at BS:+1=CANC:)
                      ADI 0FFH ; C=0 if so..
                      LDI 7FH
                      BNF CHAR+1 ; ..yes
                      DEC PZ
                      GLO U ; is this backspace?
                      XOR
                      BZ BAX ; ..yes
                      GLO U
                      SMI 7FH ; ignore <DEL>=7Fh (i.e. rubout),
                      BZ EXIT
                      ADI 5FH
                      BDF CHAR ; is it printable?
                      ADI 13H
                      BZ CR ; is it <CR>=0Dh?
                      ADI 1
                      BZ FF ; is if <Formfeed>=0Ch (= home cursor)?
                      ADI 2
                      BZ LF ; is it <LF>=0Ah?
                      ADI 9
                      BZ SOH ; <SOH>=01h turns dot on
                      BNF NUL ; <NULL>=00h turns dot off
                      EXIT: DB FECH,TVXY+1; save new cursor
                      GHI BC
                      STXD
                      GLO BP
                      STXD
                      GHI BP
                      STXD
                      INC R2 ; recover saved registers
                      LDA R2
                      PHI BP
                      LDA R2
                      PLO BP
                      LDA R2
                      PHI BC
                      LDA R2
                      PLO BC
                      LDA R2
                      PHI SH
                      LDN R2
                      PLO SH
                      GLO U ; get saved character
                      EXIT ; and return to caller
                      ;
                      ; <NULL> = 00h Clear current pixel
                      ;
                      NUL: LDI 80H ; point to bit
                      SEP SH
                      XRI 0FFH ; make and mask
                      AND
                      BR SOH+4
                      ;
                      ; <SOH> = 01h Set current pixel
                      ;
                      SOH: LDI 80H ; point to bit
                      SEP SH
                      OR ; turn it on
                      STR BP
                      BR EXIT
                      ;
                      ; <FF> = 0Ch Formfeed: clear screen
                      ;
                      FF: LDI LOW BUFX-1 ; point BP to end of buffer
                      PLO BP
                      LDI HIGH BUFX
                      PHI BP
                      SEX BP ; repeat..
                      CLRS: DB LDI0 ; clear byte
                      STXD ; decrement pointer
                      GLO BP
                      SMI LOW BUFF ; has pointer reached
                      GHI BP ; start of buffer?
                      SMBI HIGH BUFF
                      BDF CLRS ; ..until done
                      IRX ; continue to <CR>
                      ;
                      ; <CR> = 0Dh Carriage return: move cursor to left end of current line
                      ;
                      CR: DC LDI0 ; left end of line
                      PHI BC
                      GLO BP
                      ANI 0F8H ; of byte * 8
                      PLO BP ; can't backspace from here
                      BR NOB
                      ;
                      ; <LF> = 0Ah Line feed: go down 6 pixels
                      ;
                      LF: GLO BP ; to cursor position
                      ADI 48 ; add 6 lines of 8 bytes/line
                      PLO BP
                      GHI BP
                      ADCI 0 ; carry to upper bit
                      PHI BP
                      NOB: DB FECH,PSTK-1
                      LDI LOW BSTK ; vacate backspace stack
                      SSTK: STR PZ
                      PLO X
                      LDI HIGH BSTK
                      PHI X
                      GHI BC ; new bit pointer
                      ANI 7
                      STR X
                      ;
                      SCRL: GLO BP ; test for scrolling
                      SMI LOW BUFE
                      GHI BP
                      SMBI HIGH BUFE
                      BNF EXIT ; not done
                      LDI LOW BUFF ; yes
                      PLO X ; move buffer up
                      GLO BP
                      ADI LOW BUFF ; by amount of overshoot
                      ANI 0F8H
                      PLO SH ; (this is available)
                      LDI HIGH BUFF
                      PHI X
                      ADCI 0
                      PHI SH
                      MOVE: LDA SH ; loop here
                      STR X
                      INC X
                      GLO X
                      SMI LOW BUFE ; check for end
                      GHI X
                      SMBI HIGH BUFE
                      BNF MOVE ; there is more
                      GLO X
                      SMI LOW BUFX
                      DB LDI0 ; then clear rest
                      BNF MOVE+1
                      GLO BP ; move cursor up
                      ANI 7 ; to next-to-last line
                      PLO BP
                      LDI HIGH (BUFE-8)
                      PHI BP
                      BR EXIT
                      ;
                      ; Backspace: depends on stack
                      ;
                      BAX: DB FECH,PSTK ; get size of backspace stack
                      PLO X
                      XRI LOW BSTK ; if 0 (stack empty)
                      BZ EXIT ; then can't backspace, exit
                      DEC X
                      GLO X ; else pop the stack
                      DEC PZ
                      STR PZ
                      LDI HIGH BSTK ; see how much
                      PHI X
                      SEX X
                      GHI BC ; same word?
                      SM
                      BDF BSW ; yes
                      DB LDI0 ; no, clear this word
                      PHI BC
                      SEP SH
                      DB LDI0
                      STR BP
                      SEP SH
                      BDF $-4 ; 6 lines
                      GLO BP ; is this a line edge?
                      ANI 7
                      BNZ BSW-1 ; no
                      GLO BP ; yes
                      SMI 40 ; go back 5 pixel lines
                      PLO BP
                      GHI BP
                      SMBI 0
                      PHI BP
                      DEC BP ; now back one word
                      BSW: LDN X ; get new byte pointer
                      ANI 7 ; (could be vandalized)
                      PHI BC
                      LDI 0FFH ; clear right end
                      SEP SH
                      XRI 0FFH ; convert to AND mask
                      AND ; (=BP)
                      STR BP
                      SEP SH
                      BDF $-8 ; six lines
                      BR EXIT
                      ;
                      ; Printable character
                      ;
                      CHAR: GLO U ; get character
                      SHL ; index into character table
                      ADI LOW (CTBL-64)
                      PLO X
                      DB LDI0
                      ADCI HIGH (CTBL-64)
                      PHI X
                      DB FECH,MASK-1
                      LDA X ; get bit mask
                      STR PZ ; save it
                      LDA X
                      ADI LOW DOTS
                      PLO X ; point to dot matrix
                      DB LDI0
                      ADCI HIGH DOTS
                      PHI X
                      GHI BC ; save cursor position
                      STR R2
                      DEC R2
                      LDN PZ ; position bit mask
                      ANI 7
                      PHI BC
                      LDN PZ
                      ANI 0F8H ; it is left 5 bits
                      SEP SH
                      INC SH ; cancel 2nd co-call
                      INC SH
                      PLO BC ; save mask
                      INC R2
                      SEX R2 ; prepare to find relative shift
                      LDN PZ
                      ANI 7
                      SD ; (X=2)
                      PHI BC
                      GLO BC ; save new mask
                      STR PZ
                      CHRL: LDA X ; get some dots
                      SEX PZ
                      AND ; mask into this character
                      SEP SH ; shift it
                      OR ; insert into buffer
                      STR BP
                      SEP SH ; up to next line
                      BDF CHRL
                      LDN PZ ; check for split word
                      SEP SH
                      INC SH ; (don't want counter)
                      INC SH
                      BNF CUPD ; not split
                      DEC X ; back up dot pointer
                      DEC X
                      DEC X
                      DEC X
                      DEC X
                      DEC X
                      INC BP ; point to next word
                      GLO BP
                      ANI 7
                      BNZ CFIX
                      GLO BP ; oops, next line
                      ADI 40 ; go down 5 rows
                      PLO BP
                      GHI BP
                      ADCI 0
                      PHI BP
                      CFIX: GHI BC ; convert to left shift
                      ORI 0F8H
                      PHI BC
                      BR CHRL ; go do it again
                      CUPD: ORI 80H
                      SKP ; find right edge
                      INC BC
                      SHR
                      BNF $-2 ; of mask
                      GLO BC
                      SDI 9 ; any left?
                      PHI BC
                      SMI 8
                      BNF CSTK ; yes
                      PHI BC ; no, advance word
                      INC BP
                      GLO BP
                      ANI 7
                      BNZ CSTK
                      LDI 50H ; next line, actually,
                      PHI BC ; so drop down
                      DEC SH ; five more pixels
                      DEC SH
                      SEP SH
                      CSTK: DB FECH,PSTK ; update backspace stack
                      BNZ $+5
                      LBR NOB ; oops, stack no good
                      ADI 1 ; by pushing
                      DEC PZ
                      NOP ; (to cancel LBR)
                      LBR SSTK ; go store
                      ;
                      ; Shift mask right (+) or left (-)
                      ;
                      SEP R3 ; < exit:
                      SHFT: STR R2 ; > enter: save bits to shift
                      GLO BP ; note if address is outside display
                      SMI LOW BUFF
                      GHI BP ; only worry about too low
                      SMBI HIGH BUFF
                      DB LDI0 ; if so, return 0
                      BNF SHN+1 ; so program isn't destroyed
                      GHI BC ; look at counter
                      ANI 87H ; mask out word counter
                      PLO BC
                      BZ SHN-1 ; no shift
                      SHL
                      BDF SHLF ; left
                      SHRL: LDN R2 ; shift right once
                      SHR
                      STR R2
                      DEC BC
                      GLO BC
                      BNZ SHRL ; repeat N times
                      BR SHN ; done
                      ;
                      SHLF: SHR ; left shift:
                      SDI 8 ; set up counter
                      PLO BC
                      SHLL: LDN R2 ; do it
                      SHL
                      STR R2
                      DEC BC
                      GLO BC
                      BNZ SHLL ; repeat
                      SHL ; clear carry
                      SHN: LDN R2 ; get bits
                      SEX BP
                      SEP R3 ; exit, C=shift off right
                      BR $+4 ; > second entry point
                      BR SHFT ; optional reruns
                      ;
                      ; Count words, moving pointer up
                      ;
                      GHI BC
                      ADI 18H ; convert if negative, add 1
                      BNF $+4
                      ORI 80H ; (restore sign)
                      ANI 0F7H
                      PHI BC
                      SHL ; sign in C
                      ANI 0E0H ; is this end?
                      XRI 0C0H
                      BNZ SHNN ; no
                      GHI BC ; yes, restore original
                      ANI 7
                      BNF $+4
                      ORI 0F8H ; (negative)
                      PHI BC
                      GLO BP ; bump BP back to bottom
                      ADI 40
                      PLO BP
                      GHI BP
                      ADCI 0
                      PHI BP
                      BR SHFT-1 ; C=0
                      ;
                      SHNN: GLO BP ; go to next line up
                      SMI 8
                      PLO BP
                      GHI BP
                      SMBI 0
                      PHI BP
                      BR SHFT-1 ; C=1
                      ;
                      ; Interrupt service routine for 1861
                      ;
                      INTX: SEX R2
                      LDA R2 ; recover carry
                      SHL
                      LDA R2 ; recover A
                      RET ; < exit
                      INTS: NOP ; > entry
                      DEC R2
                      SAV ; save T
                      DEC R2
                      STXD ; save A
                      LDI HIGH BUFF
                      PHI R0 ; set up R0 for DMA
                      LDI LOW BUFF
                      PLO R0
                      B1 $ ; synchronize
                      LOOP: GLO R0 ; start display DMA
                      DEC R0
                      PLO R0
                      SEX R0 ; not a NOP
                      DEC R0
                      PLO R0 ; three lines per pixel
                      GHI R0 ; last line
                      XRI HIGH BUFE ; is new page
                      BNZ LOOP
                      PHI R0
                      LDI LOW TIME+2 ; now update clock
                      PLO R0
                      SHRC ; save carry
                      STR R2
                      LDX
                      ADI 1 ; increment frame count
                      STR R0
                      SMI 61 ; one second?
                      BNF INTX ; not yet
                      STXD ; if yes,
                      LDX ; bump seconds
                      ADI 1
                      STXD
                      LDX
                      ADCI 0 ; in 16-bit seconds counter
                      STR R0
                      BR INTX
                      ;
                      ; Character index and mask table
                      ;
                      M1 EQU 080H ; 1-dot wide
                      M2 EQU 0C0H ; 2-dots
                      M3 EQU 0E0H ; 3
                      M4 EQU 0F0H ; 4
                      M5 EQU 0F8H ; 5
                      ;
                      ; 1st byte: Character width mask + #bits the character bit pattern
                      ; is shifted to the right in the DOTS table byte.
                      ; 2nd byte: Offset from start of DOTS table. Points to bottom row
                      ; of pixels for the character.
                      ;
                      CTBL: DB M1+6,8 ; <space>
                      DB M1+2,10 ; !
                      DB M3+5,8 ; "
                      DB M5+0,35 ; #
                      DB M3+4,53 ; $
                      DB M3+5,90 ; %
                      DB M4+4,35 ; &
                      DB M2+2,0 ; '
                      DB M2+1,17 ; (
                      DB M2+2,17 ; )
                      DB M3+0,60 ; *
                      DB M3+5,71 ; +
                      DB M2+3,7 ; ,
                      DB M2+4,65 ; -
                      DB M1+4,7 ; .
                      DB M3+5,41 ; /
                      DB M3+1,17 ; 0
                      DB M3+2,67 ; 1
                      DB M3+4,79 ; 2
                      DB M3+1,3 ; 3
                      DB M3+0,29 ; 4
                      DB M3+0,66 ; 5
                      DB M3+2,73 ; 6
                      DB M3+0,115 ; 7
                      DB M3+3,3 ; 8
                      DB M3+0,73 ; 9
                      DB M1+3,4 ; :
                      DB M2+3,53 ; ;
                      DB M3+5,65 ; <
                      DB M3+5,3 ; =
                      DB M3+5,23 ; >
                      DB M3+0,90 ; ?
                      DB M3+0,121 ; @
                      DB M3+1,47 ; A
                      DB M3+5,109 ; B
                      DB M3+4,23 ; C
                      DB M3+2,23 ; D
                      DB M3+5,96 ; E
                      DB M3+5,52 ; F
                      DB M3+2,79 ; G
                      DB M3+3,59 ; H
                      DB M3+1,23 ; I
                      DB M3+1,85 ; J
                      DB M3+0,96 ; K
                      DB M3+3,67 ; L
                      DB M5+1,109 ; M
                      DB M4+4,29 ; N
                      DB M3+0,23 ; O
                      DB M3+5,115 ; P
                      DB M3+0,11 ; Q
                      DB M3+5,59 ; R
                      DB M3+0,41 ; S
                      DB M3+0,102 ; T
                      DB M3+2,29 ; U
                      DB M3+3,121 ; V
                      DB M5+3,46 ; W
                      DB M3+2,96 ; X
                      DB M3+2,115 ; Y
                      DB M3+0,53 ; Z
                      DB M2+0,23 ; [
                      DB M3+3,41 ; \
                      DB M2+1,23 ; ]
                      DB M3+2,0 ; ^
                      DB M3+5,7 ; _
                      DB M2+3,0 ; `
                      DB M3+1,132 ; a
                      DB M3+1,127 ; b
                      DB M3+2,127 ; c
                      DB M3+3,12 ; d
                      DB M3+5,18 ; e
                      DB M3+5,102 ; f
                      DB M3+0,80 ; g
                      DB M3+3,86 ; h
                      DB M1+1,7 ; i
                      DB M2+0,7 ; j
                      DB M3+5,12 ; k
                      DB M1+5,12 ; l
                      DB M5+3,132 ; m
                      DB M3+3,132 ; n
                      DB M3+5,127 ; o
                      DB M3+5,117 ; p
                      DB M3+1,61 ; q
                      DB M2+6,137 ; r
                      DB M3+5,137 ; s
                      DB M3+2,104 ; t
                      DB M3+4,137 ; u
                      DB M3+2,137 ; v
                      DB M5+0,137 ; w
                      DB M3+0,61 ; x
                      DB M3+5,85 ; y
                      DB M3+4,127 ; z
                      DB M3+0,17 ; {
                      DB M1+0,2 ; |
                      DB M3+2,17 ; }
                      DB M3+5,0 ; ~
                      DB M4+2,3 ; <DEL>
                      ;
                      ; Packed dot table
                      ;
                      ORG 03B9H
                      DOTS: DW 00000h,08080h
                      DW 0E897h,0A897h
                      DW 06840h,04020h
                      DW 040ADh,0B6ADh
                      DW 04404h,02056h
                      DW 0DD57h,02000h
                      DW 0F4AAh,0A9AAh
                      DW 0F400h,039E9h
                      DW 0ABADh,02900h
                      DW 055FAh,054F8h
                      DW 05400h,0C024h
                      DW 04A91h,0600Ah
                      DW 05575h,05151h
                      DW 02014h,0EC86h
                      DW 04C27h,0E400h
                      DW 01515h,0BE55h
                      DW 0B600h,001C2h
                      DW 03CD2h,091F0h
                      DW 01002h,0572Ah
                      DW 070A0h,05800h
                      DW 0DE68h,0A462h
                      DW 01C06h,02355h
                      DW 01518h,01051h
                      DW 00422h,0A144h
                      DW 000AFh,0ACD6h
                      DW 0ACAFh,00042h
                      DW 0425Fh,052F9h
                      DW 01000h,04645h
                      DW 0566Dh,04600h
                      DW 09494h,0562Dh
                      DW 0EE00h,06894h
                      DW 0B4B4h,05400h
                      DW 0DFA5h,0DF80h
                      DW 08035h,0553Ah
                      DW 00000h,056AAh
                      DW 0AB00h,00000h
                      DW 0,0
                      DB 0
                      ;
                      ; RAM Memory Allocation (video buffers)
                      ;
                      BSTK: EQU $ ; (044Eh) backspace stack - uses space
                      ; from end of program to video buffer
                      ORG (((HIGH $)+1)*256)-80
                      BUFF: EQU $ ; (04B0h) start of video buffer
                      ORG $+40
                      HOME: EQU $ ; not used, but is bottom of 1st line
                      ORG $+304
                      BUFE: EQU $ ; (0608h) used for scrolling by SCRL:
                      ORG $+56
                      BUFX: EQU $ ; (0640h) high end of video buffer

                      END


                      [Non-text portions of this message have been removed]
                    • druske
                      Wow, DOTS is a lovely piece of work! It makes my code look wasteful by comparison. That Pittman is one sharp fellow! Just a reminder - the cosmacelf mailing
                      Message 10 of 13 , May 14, 2003
                        Wow, DOTS is a lovely piece of work! It makes my code look wasteful by
                        comparison. That Pittman is one sharp fellow!

                        Just a reminder - the cosmacelf mailing list / Yahoo group is
                        currently set to strip out attachments. I opted to do this for two
                        reasons: to offer some protection against viruses, and to prevent
                        email subscribers using dialup services from being inconvenienced with
                        large attachments.

                        Photos may be uploaded directly to the Yahoo group at:
                        http://photos.groups.yahoo.com/group/cosmacelf/lst

                        Other binaries may be uploaded to the files area of the group at:
                        http://groups.yahoo.com/group/cosmacelf/files/

                        As a bonus, that makes the files easier for newcomers to find as well.

                        Please let me know if you'd prefer that I enable binary attachments
                        via email. If there's enough interest in doing so, we can put it to a
                        vote.

                        Dave


                        --- In cosmacelf@yahoogroups.com, Lee Hart <leeahart@e...> wrote:
                        > Right! Here it is. (I hope a 20k file isn't too big).
                        > [...]
                        > [Non-text portions of this message have been removed]
                      • Chris Johansen
                        ... Good! ... Much, much easier! Searching the archive for the message with the attached file that you desire can be pretty roundabout. Those are three good
                        Message 11 of 13 , May 14, 2003
                          At 5/14/2003 Wednesday 09:58 AM druske wrote:

                          >Just a reminder - the cosmacelf mailing list / Yahoo group is
                          >currently set to strip out attachments.

                          Good!

                          >I opted to do this for two reasons: to offer some protection against
                          >viruses, and to prevent email subscribers using dialup services from being
                          >inconvenienced with large attachments.
                          >
                          >Photos may be uploaded directly to the Yahoo group at:
                          >http://photos.groups.yahoo.com/group/cosmacelf/lst
                          >
                          >Other binaries may be uploaded to the files area of the group at:
                          >http://groups.yahoo.com/group/cosmacelf/files/
                          >
                          >As a bonus, that makes the files easier for newcomers to find as well.

                          Much, much easier! Searching the archive for the message with the attached
                          file that you desire can be pretty roundabout.

                          Those are three good reasons to keep it as it is.

                          >Please let me know if you'd prefer that I enable binary attachments
                          >via email.

                          No, thank you.

                          >If there's enough interest in doing so, we can put it to a
                          >vote.

                          I vote NO!

                          Now, would you like me to tell you how I _really_ feel? ;-)>

                          Regards,
                          --
                          Chris Johansen {johansen@...}
                        • Lee Hart
                          ... I agree! Another example is the digital clock program he wrote for the ELF with an 1861 in only 256 bytes (it s the example program he uses in A Short
                          Message 12 of 13 , May 14, 2003
                            druske wrote:
                            > Wow, DOTS is a lovely piece of work! It makes my code look wasteful by
                            > comparison. That Pittman is one sharp fellow!

                            I agree! Another example is the digital clock program he wrote for the
                            ELF with an 1861 in only 256 bytes (it's the example program he uses in
                            "A Short Course in Programming", already posted on cosmacelf.com).

                            > Just a reminder - the cosmacelf mailing list / Yahoo group is
                            > currently set to strip out attachments.

                            Did my text-only attachment of DOTS.ASM make it to everyone ok? Or,
                            should I not do even text-mode attachments, and post the source
                            somewhere else?

                            I will confess I hate the Yahoo on-line groups; they are painfully slow,
                            crawling with offensive ads, and it just doesn't work well with my old
                            hardware and software. So, I preferred to attach the source, rather than
                            fight with Yahoo to upload it as a file.
                            --
                            Lee A. Hart Ring the bells that still can ring
                            814 8th Ave. N. Forget your perfect offering
                            Sartell, MN 56377 USA There is a crack in everything
                            leeahart_at_earthlink.net That's how the light gets in - Leonard Cohen
                          • Dave Ruske
                            Feel free to email files to me for posting (dave@ruske.net). The text attachment came through okay for me. Dave [BTW, if the internet ads are too pesky, I
                            Message 13 of 13 , May 14, 2003
                              Feel free to email files to me for posting (dave@...). The text
                              attachment came through okay for me.

                              Dave

                              [BTW, if the internet ads are too pesky, I highly recommend a browser
                              with blocking capabilities, such as the Firebird browser (from
                              http://www.mozilla.org/projects/firebird/ ) for Windows. On the Mac
                              side, Camino ( http://www.mozilla.org/projects/camino/ ) and Safari (
                              http://www.apple.com/safari/download/ ) can at least kill the pop-up
                              ads. ]

                              On Wednesday, May 14, 2003, at 03:40 PM, Lee Hart wrote:
                              > I will confess I hate the Yahoo on-line groups; they are painfully
                              > slow,
                              > crawling with offensive ads, and it just doesn't work well with my old
                              > hardware and software. So, I preferred to attach the source, rather
                              > than
                              > fight with Yahoo to upload it as a file.
                            Your message has been successfully submitted and would be delivered to recipients shortly.