Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!willett!ForthNet From: ForthNet@willett.UUCP (ForthNet articles from GEnie) Newsgroups: comp.lang.forth Subject: Advanced Beginners Message-ID: <537.UUL1.3#5129@willett.UUCP> Date: 23 Feb 90 23:19:19 GMT Organization: Latest link in the ForthNet chain. (Pgh, PA) Lines: 49 Date: 02-22-90 (10:15) Number: 2948 (Echo) To: IAN GREEN Refer#: 2605 From: MICHAEL HOBSON Read: 02-22-90 (20:20) Subj: FORTH Status: PUBLIC MESSAGE > Thanks, for the clarification. I assume that the address can be a >symbol like 'HERE' or 'THERE' or 'CONTAINER' etc. As an extremely crude >example, lets try the following. > >CONSTANT UARTBASE 3F8 ; > >: CLR8250 6 FOR UARTBASE + 0 ! NEXT; > >Is this correct, the logic I am attempting to do is to write 0's to eac This example should be more like the following: HEX ( Set Base to Hexadecimal ) 3F8 CONSTANT UARTBASE ( CONSTANT expects a value on the stack. No semicolon is needed here, because the text scan for the constant's name terminates with at the first whitespace character ) : CLR8250 6 ( # of registers to clear ) FOR 0 ( value to store must be pushed first ) UARTBASE I + ( add loop index to base address ) ! ( write zero to port address ) NEXT ; ( semi-colon is a WORD and MUST be separated by whitespace, the open-paren for defining these comments is also a WORD and MUST be separated by whitespace. ) Of course, the 8250 base address will be whatever you decide to decode from the RTX 2001A address lines, so substitute as appropriate. I hope this helps somewhat. "The Elf" [^]-[^] \---/ Elf - A wise and helpful variety of magical being. NET/Mail : British Columbia Forth Board - Burnaby BC - (604)434-5886 ----- This message came from GEnie via willett through a semi-automated process. Report problems to: 'uunet!willett!dwp' or 'willett!dwp@gateway.sei.cmu.edu'