ForthNet@willett.UUCP (ForthNet articles from GEnie) (01/05/90)
Date: 12-30-89 (01:42) Number: 117 To: JOHN SOMERVILLE Refer#: 108 From: RAY DUNCAN Read: NO Subj: UR/FORTH ASSEMBLER Status: PUBLIC MESSAGE The system may be clobbering BX, SI, or BP, which as is documented in the manual must be preserved across code defs. Try this: CODE HAPPY-FACE SI PUSH BP PUSH BX PUSH AH, # 2 MOV DL, # 1 MOV 21 INT BX POP BP POP SI POP NEXT, END-CODE ----- This message came from GEnie via willett through a semi-automated program. Report problems to: 'uunet!willett!dwp' or 'willett!dwp@gateway.sei.cmu.edu'
ForthNet@willett.UUCP (ForthNet articles from GEnie) (01/05/90)
Date: 12-30-89 (01:44) Number: 118 To: JOHN SOMERVILLE Refer#: 108 From: RAY DUNCAN Read: NO Subj: UR/FORTH ASSEMBLER Status: PUBLIC MESSAGE Also, make sure you are in HEX when the CODE definition is assembled; a decimal 21 INT would do something else altogether (I have no idea what). ----- This message came from GEnie via willett through a semi-automated program. Report problems to: 'uunet!willett!dwp' or 'willett!dwp@gateway.sei.cmu.edu'
ForthNet@willett.UUCP (ForthNet articles from GEnie) (01/05/90)
Date: 12-31-89 (03:25) Number: 119 To: JOHN SOMERVILLE Refer#: 108 From: RAY DUNCAN Read: NO Subj: UR/FORTH ASSEMBLER Status: PUBLIC MESSAGE Finally, I should point out that the word INT86 in PC/FORTH and UR/FORTH makes CODE definitions for most BIOS and DOS interface functions unnecessary. For example you could code your "happy face" as follows: HEX : HAPPY-FACE 1 regDX ! 0200 regAX ! 21 INT86 ; The INT86 word takes care of saving and restoring all necessary registers and makes it possible to write portable code for most DOS and BIOS stuff (portable across LMI systems anyway). ----- This message came from GEnie via willett through a semi-automated program. Report problems to: 'uunet!willett!dwp' or 'willett!dwp@gateway.sei.cmu.edu'
ForthNet@willett.UUCP (ForthNet articles from GEnie) (01/05/90)
Date: 12-31-89 (21:39) Number: 120 To: RAY DUNCAN Refer#: 119 From: JOHN SOMERVILLE Read: NO Subj: UR/FORTH ASSEMBLER Status: PUBLIC MESSAGE Thanks Ray. I had tried several pushes, obviously incorrectly, and nearly had a disaster; at that point I decided to let things alone. . Why are these pushes necessary or desirable? Other Forths have eliminated the need for them. regards john NET/Mail : British Columbia Forth Board - Burnaby BC - (604)434-5886 ----- This message came from GEnie via willett through a semi-automated program. Report problems to: 'uunet!willett!dwp' or 'willett!dwp@gateway.sei.cmu.edu'
ForthNet@willett.UUCP (ForthNet articles from GEnie) (01/06/90)
Date: 01-02-90 (02:03) Number: 122
To: JOHN SOMERVILLE Refer#: 120
From: RAY DUNCAN Read: NO
Subj: UR/FORTH ASSEMBLER Status: PUBLIC MESSAGE
>Other Forths have eliminated the need for them
Huh? All Forths that don't run on stack machines (like the Harris
RTX2000) are really languages implemented on top of virtual machines
that are in turn implemented on the real machine. The virtual machine
must dedicate several registers in the real machine for its own
purposes. These must always be protected in CODE definitions, either by
not touching them, or by saving and restoring them.
If you are telling me that some Forths automatically take care of saving
and restoring these registers in CODE definitions, then each to his own,
but I think this is a bad practice. People who don't understand the
virtual machine architecture probably shouldn't be writing CODE
definitions anyway; such automatic protection of registers won't keep
them out of trouble in other areas, and it will get in the way of
writing CODE definitions that do *useful* things with the virtual
machine registers.
-----
This message came from GEnie via willett through a semi-automated program.
Report problems to: 'uunet!willett!dwp' or 'willett!dwp@gateway.sei.cmu.edu'