[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inverse Problem on Contiki - website updated



>>>>> "MJM" == Michael J Mahon <mjmahon@aol.com> writes:

MJM> For example, if C uses an embedded control character in a string
MJM> to shift from normal to inverse text, independent of case, then
MJM> your library patch sounds right. If the C programmer is expected
MJM> to call auxiliary routines to switch character sets, then that's
MJM> the way to go.

conio uses the revers() call to enable or disable reverse printing.

MJM> A related example is the "high ASCII" issue. If the C programmer
MJM> expects low ASCII for portable code, then the apple2 library
MJM> should OR on the high bit (perhaps based on a character set mode
MJM> variable).

cc65 translates C source ascii strings into whatever the target plat-
form expects (e.g. PETSCII for CBM machines). If the translation for
reverse Apple II characters is broken, take a look at:

  cc65/libsrc/apple2/cputc.s

and in particular:

putchar:
        ora     #$80            ; Turn on high bit
        and     TEXTTYP         ; Apply normal, inverse, flash
        ldy     CH
        ldx     RD80COL         ; In 80 column mode?
        bpl     col40           ; No, in 40 cols
        pha
        tya
        lsr                     ; Div by 2
        tay
        pla
        bcs     col40           ; odd cols go in 40 col memory
        sta     PG2ON
col40:  sta     (BASL),Y
        sta     PG2OFF
        rts 

and send Uz a patch to fix it.

-- 
    ___          .     .  .         .       . +  .         .      o   
  _|___|_   +   .  +     .     +         .  Per Olofsson, arkadspelare
    o-o    .      .     .   o         +          MagerValp@cling.gu.se
     -       +            +    .     http://www.cling.gu.se/~cl3polof/