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: forth eng./68hc11 new micros Message-ID: <601.UUL1.3#5129@willett.UUCP> Date: 2 Mar 90 03:56:47 GMT Organization: Latest link in the ForthNet chain. (Pgh, PA) Lines: 38 Date: 03-01-90 (00:53) Number: 406 (Echo) To: ALL Refer#: NONE From: JACK BROWN Read: (N/A) Subj: FORTH SOLUTION TO 1E Status: PUBLIC MESSAGE ( 68hc11 Assembly Language Programming Course ) ( Problem 1e ) ( Write a 68HC11 assembly language program which will do this: ) ( If bit 5 of ;memory location $0020 is set, 1, then clear memory ) ( location $0010. If bit 5 is clear then set it. Note: do not ) ( disturb the state of any of the other bits in the byte. ) ( Solution 1e ) ( We use memory locations $00A0 and $0090 instead of $20 and $10 ) HEX 00A0 CONSTANT BFLAGS 0090 CONSTANT DATA ( Check bit 5 and take appropriate action. This is a bitch for ) ( the Forth assembler as we need to fake a forward reference and ) ( make sure that it is properly resolved. ) CODE BITCH ( -- ) HERE ( dummy address for BRCLR, ) BFLAGS 0020 BRCLR, ( branch if bit 5 clear ) ( IF, ) HERE 1- ( back address for ELSE, ) DATA CLR, ELSE, BFLAGS 0020 BSET, THEN, NEXT END-CODE 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'