Changeset 3106


Ignore:
Timestamp:
Aug 1, 2012, 6:34:49 AM (3 years ago)
Author:
wmb
Message:

Marvell TIM compiler - accept either 4 ASCII or 3 ASCII plus decimal for ID values.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpu/arm/marvell/tim.fth

    r3090 r3106  
    7979;
    8080: id,  ( -- )
    81    get-word                                   ( adr len )
    82    \ Convert trailing number to binary byte value - e.g. NAN'6 -> NAN(06)
    83    2dup [char] ' left-parse-string 2drop      ( adr len tail$ )
    84    push-decimal $number pop-base  abort" Bad number"  ( adr len n )
    85    nip  over 3 + c!  4                                ( adr 4 )
     81   get-word                                     ( adr len )
     82   \ The ID can either be a 4 bytes of ASCII, e.g. OLPC,
     83   \ or 3 ASCII plus a decimal number, e.g. SPI'10
     84   2dup [char] ' left-parse-string              ( adr len tail$ head$ )
     85   nip  4 =  if                                 ( adr len tail$ )
     86      \ No ' character in string; use verbatim
     87      2drop
     88   else                                         ( adr len tail$ )
     89      \ Convert trailing number to binary byte value - e.g. NAN'6 -> NAN(06)
     90      push-decimal $number pop-base  abort" Bad number"  ( adr len n )
     91      nip  over 3 + c!  4                                ( adr 4 )
     92   then
    8693   4c,
    8794;
Note: See TracChangeset for help on using the changeset viewer.