home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
assemblr
/
disasm
/
bubble
/
read.me
< prev
next >
Wrap
Text File
|
1990-02-18
|
16KB
|
452 lines
The Bubble Chamber Installation
(c) Copyright 1988, 1989
Rh Factor Software
The following files are on the master diskette:
BUBBLE.EXE - Main program file. DOS requires that it be either
in the default directory or in the path.
BUBBLE.DAT - This file contains data critical to the operation of
the program. It will not run without it. If it is
not found in the default directory, the Bubble Chamber
will look for it in the path. Note: All data is
read at startup, this file will not be required
after that.
BUBBLE.HLP - This is the help file. It is not required. The
program will search the path if help is requested.
To install the Bubble Chamber, copy these files using the DOS
Copy command. The program is not copy protected, and requires no
unusual installation.
NOTICE:
This is Beta-ware. You are licensed to use this release for evaluation
only. The beta release, while very functional, does not include all the
advantages of registration.
To receive a copy of The Bubble Chamber, Release 1.2 send $29.00 to:
Rh Factor Software
P.O. Box 6466
Kent, WA 98064-6466
Comments are always welcome.
Registration includes The Bubble Chamber Manual. The manual contains details
on modifying the Bubble Chamber data file, adding macros, command line
options, and other customizing information.
Thank You for trying out the Bubble Chamber!!!
Health and Happiness,
Rh Factor Software
__________________
A brief explanation of the labels:
Jxxxxx: - This line is a destination of a jump instruction.
Dxxxxx - This line starts at an address used in the program.
Note that the address depends upon the setting of the
appropriate segment register, which may not be
correct. Where this label appear in an operand, an
offset directive may be required.
Rxxxxx - A relocation table address was set for this position.
It is considered to be a segment boundary.
xxxxx is hex code for the file position, with
00000 being the first byte in the file.
The labels will not be included if the map is not
properly defined (ie. if a Jxxxxx label is in an
area mapped to ASCII). This should cause an
assembler error, and alert you to the condition.
================================================================
Support is available thru:
GEnie Email address RH-FACTOR.
- or -
Rh Factor Software
P.O. Box 6466
Kent, WA 98064-6466
Thank you.
Health and Happiness,
R.S. Heller
========================================================================
Macros make assembly language programs far easier to write, as well as
to read. They combine many commands into one, and make writing at the
'machine' level more like working in higher level languages. One of the
most useful features of the Bubble Chamber is that it can disassemble
these macros, returning a single command in place of a section of code.
But, it is entirely up to you to 'program' the Bubble Chamber to
recognize the macros you choose. This article is intended to help you
in that regard.
There are two files you should be concerned with: the data file
(BUBBLE.DAT) and the include file (BUBBLE.INC). The data file contains
the actual machine code for the macro, while the include file has the
source code. The Bubble Chamber compares the machine code in the data
file with the program you are disassembling; and when a match is found,
it returns only the macro. The include file provides the detailed
commands to be substituted for the macro during assembly. Even if you
don't intend to reassemble the program your working on, it is a good
idea to keep this file up to date. This will insure that you have a
readable record of the macro commands.
Let's look at some of the most common macros you are likely to see, and
will want to use...
PC & COMPATIBLE ROM-BIOS
The basic I/O system (ROM-BIOS), is a standard set of callable routines
built into your computer's read only memory. Every 100% compatible must
handle this set of calls, and produce a certain result, or it wouldn't
be compatible. Rather than remember the specific codes for these
routines, most programmers set up macros to call them. You will find a
list of these at the end of this article.
The whole function of ROM-BIOS should become more clear as you read this
article, and review the macros. You may also wish to consult one of the
books listed in the bibliography of the Bubble Chamber Manual. An
outside source is especially important if you want to be sure to cover
all the services, as the attached list is not complete. I have
intentionally left off cassette and machine specific services; and there
may be others of which I am not aware.
Using these BIOS services in assembly language involves a four step
process:
1) Move the applicable data to the registers (values
that will be used by the routine).
2) Move the desired service # to AH (ie: MOV AH,01h).
3) Generate the appropriate software interrupt.
4) Act on the results.
Steps 1 and 4 are not always required, and they are not included with
the macros listed. I simplified the list because steps 1 and 4 can add
a great many variations, and it is simply not practical to cover them
all here. I have provided the basic part of each function, it will be
up to you to add the detail. As you will see, the Bubble Chamber can be
modified to 'fit' the program you are working with.
Let's look at the @SetCurSz macro as an example. This routine sets the
video cursor size. The assembler source code for this macro would look
like this:
MOV AH,01 ; Move Service Request #1 (set cursor size)
; to AH register.
INT 10h ; Call BIOS.
The corresponding line for the BUBBLE.DAT file would be:
127, @SerCurSz B4h 01h CDh 10h
which breaks down as follows:
127, - Type code for macros.
@SetCurSz - The name of the macro (you can use
whatever you like).
B4h - The hex code for the command: MOV AH,
01h - Service # for BIOS set cursor size.
CDh - The hex code for the command: INT
10h - The video interrupt number.
You may be wondering how the BIOS function will know what size to set
for the cursor? As I mentioned, step 1 has not been included. Let's
add it for a more complete macro.
Add to BUBBLE.INC:
@SetCurSz MACRO sline, eline
MOV CH, sline
MOV CL, eline
MOV AH, 01h
INT 10h
ENDM
Add to BUBBLE.DAT:
127, @SetCurSz B5h #H1 B1h #H1 B4h 01h CDh 10h;BIOS ...
Step 1 here involves setting the both CH and CL with the starting line
and ending line respectively. Step 4 is not required. You should note
that the ROM-BIOS service does not care in what order the registers are
set. Thus, to be sure you detect every cursor size service call, you
would have to account for AH, CH, and CL being set in any order - six
possible combinations. To make matters worse, anything can go on
between setting the registers and the interrupt; as long as it doesn't
change their values. Fortunately, once you have established a pattern
for the program you are working with (or for a given compiler, or
programmer), it is not likely to change. You may choose to include
every possible combination in your BUBBLE.DAT file, or establish the
pattern for what you're working with. It's up to you.
I should point out that, instead of using the MOV AH,0 command where
appropriate, I have substituted XOR AH,AH. This is the more common
method of zeroing a register. It is slightly faster. The XOR command
includes a direction flag, which further complicates disassembly. The
direction flag is meaningless when a register is both the source and
destination. Set or not, the result is the same. Thus, the hex code
for the command: XOR AH,AH; can be 30h E4h, or 32h E4h. I have taken
this into account for the first occurrence. You may choose to do the
rest, or simply change to the code you find most often.
A final note: You will find that adding macros to the data file slows
down the program. I am working on improvements to speed it up. Until
then, you may want to run The Bubble Chamber the way I do. I build the
map using a bare bones data file (no macros), then when I'm ready to
print a listing, I use a complete set.
Health and Happiness,
Rh-Factor.
///////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
copy to BUBBLE.DAT:
127, @SetVideo 30h E4h CDh 10h ; BIOS Set video mode.
127, @SetVideo 32h E4h CDh 10h ; BIOS Set video mode.
127, @SetCurSz B4h 01h CDh 10h ; BIOS Set cursor size.
127, @SetCurPos B4h 02h CDh 10h ; BIOS Set cursor position.
127, @GetCurPos B4h 03h CDh 10h ; BIOS Get cursor position.
127, @VSetPage B4h 05h CDh 10h ; BIOS Set display page.
127, @ScrollUp B4h 06h CDh 10h ; BIOS Scroll window up.
127, @ScrollDn B4h 07h CDh 10h ; BIOS Scroll window down.
127, @VGetChrA B4h 08h CDh 10h ; BIOS Video get character
& attribute.
127, @VPutChrA B4h 09h CDh 10h ; BIOS Video put character
& attribute.
127, @VPutChr B4h 0Ah CDh 10h ; BIOS Video put character.
127, @SetColor B4h 0Bh CDh 10h ; BIOS Set color palette.
127, @PutPixel B4h 0Ch CDh 10h ; BIOS Set pixel dot.
127, @GetPixel B4h 0Dh CDh 10h ; BIOS Get pixel status.
127, @TTYPutChr B4h 0Eh CDh 10h ; BIOS Put character in TTY
mode.
127, @GetVideo B4h 0Fh CDh 10h ; BIOS Get current video
mode.
127, @GetPhrp CDh 11h ; BIOS Get list of
peripherals.
127, @MemSize CDh 12h ; BIOS Get memory size.
127, @RsetDskt 30h E4h CDh 13h ; BIOS Reset the diskette.
127, @GetDsktSt B4h 01h CDh 13h ; BIOS Get diskette status.
127, @ReadSec B4h 02h CDh 13h ; BIOS Get diskette sector.
127, @WriteSec B4h 03h CDh 13h ; BIOS Put diskette sector.
127, @VfySector B4h 04h CDh 13h ; BIOS Verify diskette
sector.
127, @FmtTrack B4h 05h CDh 13h ; BIOS Format diskette
track.
127, @InitSPort 30h E4h CDh 14h ; BIOS Initialize serial
port.
127, @SPutChr B4h 01h CDh 14h ; BIOS Send character to
serial port.
127, @SGetChr B4h 02h CDh 14h ; BIOS Read character from
serial port.
127, @GetSerSt B4h 03h CDh 14h ; BIOS Get serial port
status.
127, @GetKey 30h E4h CDh 16h ; BIOS Get next keyboard
character.
127, @ChkKey B4h 01h CDh 16h ; BIOS Check for character.
127, @GetSftSt B4h 02h CDh 16h ; BIOS Get keyboard shift
status.
127, @PrintChr 30h E4h CDh 17h ; BIOS Print character.
127, @InitPrint B4h 01h CDh 17h ; BIOS Initialize Printer.
127, @GetPrintSt B4h 02h CDh 17h ; BIOS Get Printer Status.
127, @GetClock 30h E4h CDh 1Ah ; BIOS Get clock count.
127, @SetClock B4h 01h CDh 1Ah ; BIOS Set clock count.
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\//////////////////////////////
//////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
copy to BUBBLE.INC:
@SetVideo MACRO
XOR AH, AH
INT 10h
ENDM
@SetCurSz MACRO
MOV AH, 01h
INT 10h
ENDM
@SetCurPos MACRO
MOV AH, 02h
INT 10h
ENDM
@GetCurPos MACRO
MOV AH, 03h
INT 10h
ENDM
@VSetPage MACRO ; BIOS Set display page.
MOV AH, 05h
INT 10h
ENDM
@ScrollUp MACRO ; BIOS Scroll window up.
MOV AH, 06h
INT 10h
ENDM
@ScrollDn MACRO ; BIOS Scroll window down.
MOV AH, 07h
INT 10h
ENDM
@VGetChrA MACRO ; BIOS Video get character
MOV AH, 08h
INT 10h
ENDM
@VPutChrA MACRO ; BIOS Video put character
MOV AH, 09h
INT 10h
ENDM
@VPutChr MACRO ; BIOS Video put character.
MOV AH, 0Ah
INT 10h
ENDM
@SetColor MACRO ; BIOS Set color palette.
MOV AH, 0Bh
INT 10h
ENDM
@PutPixel MACRO
MOV AH, 0Ch
INT 10h
ENDM
@GetPixel MACRO
MOV AH, 0Dh
INT 10h
ENDM
@TTYPutCHr MACRO
MOV AH, 0Eh
INT 10h
ENDM
@GetVideo MACRO
MOV AH, 0Fh
INT 10h
ENDM
@GetPhrp MACRO
INT 11h
ENDM
@MemSize MACRO
INT 12h
ENDM
@RsetDskt MACRO
XOR AH, AH
INT 13h
ENDM
@GetDsktSt MACRO
MOV AH, 01h
INT 13h
ENDM
@ReadSec MACRO
MOV AH, 02h
INT 13h
ENDM
@WriteSec MACRO
MOV AH, 03h
INT 13h
ENDM
@VfySector MACRO
MOV AH, 04
INT 13h
ENDM
@FmtTrack MACRO
MOV AH, 05h
INT 13h
ENDM
@InitSPort MACRO
XOR AH, AH
INT 14h
ENDM
@SPutChr MACRO
MOV AH, 01h
INT 14h
ENDM
@SGetChr MACRO
MOV AH, 02h
INT 14h
ENDM
@GetSerSt MACRO
MOV AH, 03h
INT 14h
ENDM
@GetKey MACRO
XOR AH,AH
INT 16h
ENDM
@ChkKey MACRO
MOV AH, 01h
INT 16h
ENDM
@GetSftSt MACRO
MOV AH, 02h
INT 16h
ENDM
@PrintChr MACRO
XOR AH, AH
INT 17h
ENDM
@InitPrint MACRO
MOV AH, 01h
INT 17h
ENDM
@GetPrintSt MACRO
MOV AH, 02h
INT 17h
ENDM
@GetClock MACRO
XOR AH,AH
INT 1Ah
ENDM
@SetClock MACRO
MOV AH, 01h
INT 1Ah
ENDM
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\//////////////////////////////