F-PC: INT86.seq tinker with interrupts 
Author Message
 F-PC: INT86.seq tinker with interrupts

## Originalempfaenger: /comp/lang/forth


some years ago I wrote this program INT86.seq to tinker with x86  

I never got any comments. Tonite I found a bug in it.

I don't know, if that's the correct name, because I upload the 1st time.  
So if there is any trouble, tell me how to improve/correct it.

Here a short description:

\ int86.seq     HLL interface to '86 interrupts by W.Allinger  ALL0492

        PC/Forth from LMI has a nice HLL interface to the software
        interrupts of the 80x86 processors. So I decided to have
        the same functions in F-PC. and added .REGS, which is not in

        This programm is donated to public domain by

        Dipl.-Ing. Wolfgang Allinger
        Brander Weg 6
        D-42699 SOLINGEN
        voice/FAX: (+49) (+212) 66 8 11

        This HLL interface is very handy for evaluation of DOS
        and BIOS interrupts...

INT86  ( bIR -- )

        A set of variables corresponds to the 16bit registers.
        The machine regs are loaded from this list, the interrupt
        according to bIR=00h..FFh is executed and the regs after
        the return from the interrupt are stored to the same list.

        The regs are named:

        regAX regBX regCX regDX regSI regDI regBP regDS regES and

    |   WARNING:                                                       |
    |                                                                  |
    |   there is NO ERROR CHECKING, unproper use of the                |
    |   registers can have CATASTROPHIC and/or UNPREDICTABLE RESULTS!  |
    |                                                                  |

        Example ( stolen from LMI PC/FORTH manual page VI-170 )

        MS-DOS returns the Version # in AL if AH is set to 30h and
        the interrupt 21h is executed.
        Thus the sequence


        3000 regAX !   21 INT86

        will display the MS-DOS Version # in hex.



                              Fast Good ...pick any two of them
Dipl.-Ing. Wolfgang Allinger
Brander Weg 6                 Voice/FAX [+49] [0] 212 / 66 8 11

## CrossPoint v3.02 R ##

Thu, 02 Jul 1998 03:00:00 GMT  
 F-PC: INT86.seq tinker with interrupts
the wheel is always dicovered twice.
Highlevel access upon registers is available since G.T.Hawkins mad  
ROMBIOS.SEQ, which gaves us those possibilities:

\ ***** examples *****

\ excutes a hardcopy on printer
: prtscr        ( -- )
                5 sbios ;

\ gets and displays timer ticks
: getticks      ( -- ud f )
                0 AX!
                $1A LBIOS       \ get-ticks-Interrupt


: .ticks        getticks drop ud.  ." ticks"



Fotografieren und Forth programmieren
## CrossPoint v3.02 ##

Fri, 03 Jul 1998 03:00:00 GMT  
 F-PC: INT86.seq tinker with interrupts

  >the wheel is always dicovered twice.
  >Highlevel access upon registers is available since G.T.Hawkins mad
  >ROMBIOS.SEQ, which gaves us those possibilities:

I didn't know ROMBIOS.SEQ before, because I didn't expect general 'INT'  
services. If I knew it, I wouldn't have invented mine.  I couldn't find  
out, when it was written and since when it is buried on my disks. However  
I don't want to discuss who was 1st. My program has a name, which  
describes, what it's for ( I hope ). Maybe INT8x86.seq would be a better  
name. According to Leo Brodie, the wording is very important.

INT86 is a general approach to handle all(?) INTs, even MS-DOS, EMS...  



1. try to find descriptive names, so that peoples have a chance to find  
and use the stuff.

2. stamp the files with a release date & time and make revision notes.


I don't want to blame ROMBIOS.SEQ but it has some some drawbacks:

- it's specialized to some BIOS INTs,

- F-PC assumes the direction bit DF=0 and might crash if it's altered via  
the INT service,

- register DS couldn't be used via INTs, e.g. INT $2F will not work.
  However this is not a BIOS IR and 'ROMBIOS' need not handle this,

- the CPU_flags are not returned, so from some BIOS and DOS INTs you will  
not see the flags, e.g. INT $13 function $02 will not work,

- you must figure out, if you use the SBIOS or LBIOS words

All the register access is done via code routines, IMHO this trades too  
much space and complexity to speed improvements for some (interactive)  
access of INTs. BIOS... wastes normaly so much time, IMHO that's not worth  
to save some cycles on calling it. However I don't know for what reason  
George has written his version.


My routine includes .REGS which is a fancy Register Display.

However, I would like some notes on my program, especially need some help  
for TCOMing it. I made some experiments but I'm not quite shure if it  
works under all conditions. Please try and improve it and give me a note.  
If you will use it without TCOM adapt the \fpc \tcom lines and throw away  
my comments which lines work and which didn't work. I let them in to help  
for future improvements.

What me also interests, is if you can load INT86.zip from the server,  
which is mentioned in my original news.

have a happy new year



                              Fast Good ...pick any two of them
Dipl.-Ing. Wolfgang Allinger
Brander Weg 6                 Voice/FAX [+49] [0] 212 / 66 8 11

## CrossPoint v3.02 R ##

Sat, 04 Jul 1998 03:00:00 GMT  
 [ 5 post ] 

 Relevant Pages 

1. Chess1-0.seq for fpc

2. Bug found in F-PC RS232IB.seq

3. ANSI.SEQ: An ANS-Forth compatibility package for F-PC

4. General interrupt routine for FPC

5. Everything you EVER DID is STILL STORED IN YOUR PC ( g029 fs)

6. FPC applications for the PC


8. INT86 and self-modifing code

9. PC 516 interrupt problems Er#10452

10. Writing interrupt rtn in F-PC

11. Servicing hardware interrupts in F-PC

12. GP-M2 int86?


Powered by phpBB® Forum Software