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

Uploaded Forth for ADuC70xx

Expand Messages
  • Peter Jakacki
    Well I ve had my little minikit sitting on my desk for several weeks and I had run little more on it than the simple code examples. I had written a Forth for
    Message 1 of 1 , Aug 13, 2006
    • 0 Attachment
      Well I've had my little minikit sitting on my desk for several weeks and
      I had run little more on it than the simple code examples. I had written
      a Forth for the LPC21xx range and thought I'd have a go at porting it
      across. Well, after struggling through the terse documentation I managed
      to fire it up. Bear in mind it is still a work in progress, however the
      coms receive is fully interrupt driven with XON/XOFF so you can
      paste/transfer text files without any line delays etc.

      Defaults to 115K baud on the internal oscillator..
      > ARM7 IVOS - 1.0b Peter Jakacki (Aug 14 2006-12:47:32)
      > Copyright 2005 Peter Jakacki
      > Target: noPC #0 - ADuC7022

      Try typing lines like this:

      ___________________________________________________
      HELP
      0 100 DUMP
      SEE IDUMP
      : MMRS
      CR ." Dumping MMRs"
      FFFF0000h 1000h WDUMP
      FFFFF000h 20h WDUMP
      FFFFF400h 420h WDUMP
      FFFFFC00h 400h WDUMP
      ;
      MMRS
      HWORDS ADC
      ___________________________________________________

      How about a little D/A generator running in the background...
      ___________________________________________________
      : RAMPGEN
      13h DAC1CON !
      BEGIN
      40h 0 DO I 22d SHL DAC1DAT ! LOOP
      AGAIN
      ;

      1 TIMING // change multitask timebase to 1ms

      // run SINGEN using task RAM at 11E00h as #1 task
      ' RAMPGEN 8 + 11E00h 1 RUN
      ___________________________________________________

      Type HELP to see a glossary of the "words" and any comments etc.

      Have fun

      *Peter*


      ___________________________________________________

      WORDS
      IDUMP cksum SEE+ SEE SEES DescribeCFA ListCode ListForth (NEXT) BLADR
      SEE: ADR>HELP .LIT .NUM BR+- BR- BR+ .TOKEN TKN>CFA .ID .HEAD Separator
      XY XTAB CUR .N ESC HELP WordHelp .ATR HWORDS $HWORDS .HWORD ListAtr
      .NOTE SEARCH$ COMPARE$ $( | BURNCODE BURN (FREEFLASH) ERASEF PROGRAM
      ?FBUSY FEEHIDE FEEPRO FEESIGN FEEADR FEEDAT FEECON FEEMOD FEESTA
      FLASHBASE GP4CLR GP4SET GP4DAT GP3PAR GP3CLR GP3SET GP3DAT GP2CLR
      GP2SET GP2DAT GP1PAR GP1CLR GP1SET GP1DAT GP0PAR GP0CLR GP0SET GP0DAT
      GP4CON GP3CON GP2CON GP1CON GP0CON GPIOBASE PLADLCK PLADOUT PLADIN
      PLAADC PLAIRQ PLACLK PLAELM15 PLAELM14 PLAELM13 PLAELM12 PLAELM11
      PLAELM10 PLAELM9 PLAELM8 PLAELM7 PLAELM6 PLAELM5 PLAELM4 PLAELM3
      PLAELM2 PLAELM1 PLAELM0 PLABASE SPICON SPIDIV SPITX SPIRX SPISTA
      SPIBASE I2C1FSTA I2C1CCNT I2C1ID3 I2C1ID2 I2C1ID1 I2C1ID0 I2C1DIV
      I2C1CFG I2C1ALT I2C1BYTE I2C1ADR I2C1CNT I2C1MTX I2C1MRX I2C1STX
      I2C1SRX I2C1SSTA I2C1MSTA I2C1BASE I2C0FSTA I2C0CCNT I2C0ID3 I2C0ID2
      I2C0ID1 I2C0ID0 I2C0DIV I2C0CFG I2C0ALT I2C0BYTE I2C0ADR I2C0CNT
      I2C0MTX I2C0MRX I2C0STX I2C0SRX I2C0SSTA I2C0MSTA I2C0BASE I2CFSTA
      I2CCCNT I2CID3 I2CID2 I2CID1 I2CID0 I2CDIV I2CCFG I2CALT I2CBYTE
      I2CADR I2CCNT I2CMTX I2CMRX I2CSTX I2CSRX I2CSSTA I2CMSTA I2CBASE
      COMDIV2 COMADR COMIID1 COMIEN1 COMSCR COMSTA1 COMSTA0 COMCON1 COMCON0
      COMIID0 COMDIV1 COMIEN0 COMDIV0 COMRX COMTX UARTBASE DAC3DAT DAC3CON
      DAC2DAT DAC2CON DAC1DAT DAC1CON DAC0DAT DAC0CON DACBASE ADCOF ADCGN
      ADCRST ADCDAT ADCSTA ADCCN ADCCP ADCCON ADCBASE REFCON REFBASE CMPCON
      PSMCON PSMBASE PLLKEY2 PLLCON PLLKEY1 POWKEY2 POWCON POWKEY1 PLLSTA
      PLLBASE T3CLRI T3CON T3VAL T3LD T3BASE T2CLRI T2CON T2VAL T2LD T2BASE
      T1CAP T1CLRI T1CON T1VAL T1LD T1BASE T0CLRI T0CON T0VAL T0LD T0BASE
      RSTCLR RSTSTA REMAP REMAPBASE FIQCLR FIQEN FIQSIG FIQSTA SWICFG IRQCLR
      IRQEN IRQSIG IRQSTA IRQBASE (SDWR) (SDRD) SDCLK SD@ SD! (SD) SDON
      SDCS !SPI RX0@ TX0! TXEN COM0 .TARGET BAUD RESET WDT! TIMEOUT? TIMER
      !MS MS MS! MS@ !TIMER INIT NEW ABORT dseg QUIT ?AUTO ?NEW CRC-32
      CRC-32B ?LINK LINK FINIS SOURCE EVAL UPPER $INTERPRET NUMBER DIGIT?
      BCD>BIN FORTH PRESET TRAP $COMPILE COMPILE> LITERAL COMPILE FORGET
      IS DEFER defer } END ; { DEFINE : OVERT DOES> (DOES>) CREATE CODEORG
      DATAORG VARIABLE words bytes DS32 VALIGN DS8 CONSTANT HEADER COMPO
      IMMEDIATE WORD, $, ] [ $" ." $," (.") $" do$ SILENT ECHO /* ( //
      \ QUERY ACCEPT KTAP TAP ?EMIT MAXLEN LEN TYPE ' PARSE parse FIND$
      FIND CFA>PFA NFA>CFA CFA>TKN CFA>NFA CFA>LFA NFA+ NFA>LFA DB ?, D,
      C, H, , ALLOT HERE RING ok OK PROMPT .VER DU RDUMP WDUMP DUMP .LS
      .S WORDS +WORDS AWORDS ESC? CR CRLF <CR> LF TAB BELL SPACES SPACE
      .D D.D D.DR .H .WORD .BYTE ? U.N . U. U.R .R D. D.R NSTR STR #> SIGN
      #S # HOLD <# DIGIT d h HEX DECIMAL BINARY ALIGN ALIGNED CELLS CELL-
      CELL+ LIT32 LIT16 LIT8 (.") ILOAD AUTOBAUD FLUSH CLS HOME PRTSCN
      BG FG REVERSE BLINK UNDERLINE DIM BOLD PLAIN NUL CON KEY KEY? CMD
      EMIT EMIT? XBIT? XTEST XBIT! XCLR XSET XMASK MASK BIT? TEST CLR SET
      BBIT! BCLR BSET COUNTDOWN? COUNTDOWN C+! +! CMOVE> CMOVE ERASE FILL
      0! C@! NA! NA@ H! H@ C@ C! D@ D! @ ! CASES (CASES) ENDCASE CASE (CASE)
      NEXT FOR (DONEXT) BOUNDS LEAVE +LOOP LOOP DO J I (+LOOP) (LOOP) (DO)
      @EXECUTE EXECUTE CALL AFT WHILE REPEAT AGAIN UNTIL BEGIN ELSE AHEAD
      THEN IF (IFNOT) (IF) (ELSE) (UNTIL) (AGAIN) (BRANCH) SQRT SCALE S>D
      DABS ABS DNEGATE NEGATE WITHIN MIN MAX D= = U< > < 0> 0< 0<> 0= <>
      HILO HI LO ROR SHL SHR SHL8 SHR8 D2/ D2* 2* 2/ / MOD /MOD M/DMOD
      M/MOD UM/MOD U/ D* UDN* M* UM* * U* BITFLIP UM+ D- D+ 2- 2+ 1- 1+
      - + NOT XOR OR AND REGS REG ?STACK TUCK NIP 2DROP DROP -ROT ROT 2SWAP
      SWAP 2OVER OVER 2DUP ?DUP DUP NOP PLACE PICK DEPTH L> >L R@ R> >R
      !LP !RP RP! RP@ !SP SP! SP@ TIB HANDLER PAD cr key emit 'EVAL NTIB
      HLD UNUM DPL numflg DIGITS BASE TEMP LINES ERRORS FLAGS >IN @USER
      UP! AUTO VP NP CP DP CURRENT CONTEXT forth LAST ATRS TCB RAM SYSCONS
      WHITE CYAN MAGENTA BLUE YELLOW GREEN RED BLACK FALSE TRUE OFF ON
      URAM -1 FF BL 0F 0E 0D 0C 0B 0A 9 8 7 6 5 4 3 2 1 0 .REGS TRACE TASKTIMER
      !TASKS TASK# HOLDON PAUSE TIMING GO STOP @TCB RUN$ RUN !TASK -MS
      0EXIT ?EXIT EXIT COLD ok
      _
    Your message has been successfully submitted and would be delivered to recipients shortly.