home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Reverse Code Engineering RCE CD +sandman 2000
/
ReverseCodeEngineeringRceCdsandman2000.iso
/
RCE
/
Gthorne
/
reopsahl
/
howtotsr.txt
< prev
next >
Wrap
Text File
|
2000-05-25
|
35KB
|
792 lines
[The 80x86Assembly Page]
(this image was created by Dima Samsonov, the greatest guy in the world !)
You are visitor number: 107734 since September 17th 1995, welcome !
[Image] [The freaks use it...AsmEdit !]
[Image]
In this document: (Click here to see the table of contents completely !)
These are sections of this same document and thus already loaded and
quickly accesable.
[Image] Me [Image] My own creations
[Image] How to browse this page [Image] Sources
[Image] What's [ NEW ] ? [Image] Books
[Image] Beginners corner [Image] Protected Mode [ NEW ]
[Image] Questions & Answers [Image] Links
[Image] How To ... [Image] Windows without GUI [ NEW ]
[Image] Contributing [Image] Thanks to...
Also take a look at:
These are some external, but related. documents, which may take some longer
to load.
[Image] The load statistics of this page [Image] My (useless)
Porsche page
[Image] The Professional Programmers' Pages
[Image] Maarten's Home Page
(Asm, vb and Pascal)
[---------------]
Back to the top
[---------------]
Me
[Image] Hi !
I'm Jannes Faber, student Computer Science at the University of Utrecht in
the Netherlands (Europe !). As a job, I'm a programmer, mainly Assembly and
some Basic. My greatest hobby (besides programming) is Quaking (used to be
DooMing) !
You can mail me at Faber@fys.ruu.nl
You can also try to talk to me, if I'm on-line, using: talk
faber@ruunat.fys.ruu.nl. I'm now OFFLINE !
---------------------------------------------------------------------------
[Back to the top]
---------------------------------------------------------------------------
Mail Me
[Image]Before you really mail me, please note the following:
[Image]Have you seen Tore's Assembly Tutorial yet ? (for all your
graphics stuff too !!!)
[Image]Do not mail me with questions about graphics programming or
protected mode things ! I simply don't know much about them !
[Image]I get too much mail, so make sure you check the following thing
before you ask me ! Don't think 'what the fuck, I'll just ask him,
that's much easier !'.
[Image]It can take up till a month or so before you get a reply !
[Image]I don't do your homework and I'm real good at spotting homework
assignments, so don't even think about it !
[Image]Make sure that the reply address in your browser is set to your
email address ! In NetScape for example, check
Options|Preferences|Mail and News ! I get quite a lot of mail with
an invalid return address !
[Image]Please also include your address in the mail itself, just to make
sure !
[Image]If you have anything to contribute, please read this first !
[Image]If you have some question, please read my How To get technical
info section first !
[Image]Before you ask me something about interrupts or hardware, make
sure you have checked HelpPC and The Interrupt List of Ralph Brown
(see the Links section) ! (and if you don't have them yet, just
get them anyway, no real programmer can live without them !!)
[Image] Thank you kindly for all your reactions !
If you've read the stuff above, you can mail me at: faber@fys.ruu.nl
---------------------------------------------------------------------------
[Back to the top]
---------------------------------------------------------------------------
Contributing
Do you have:
[Image] Sources
[Image] Technical information
[Image] Addresses of other WWW pages or FTP-sites
[Image] .... ?
Please let me know ! I will put it on my page, with your name and email
address and a link to your own WWW-page if you like.
[How To Upload Stuff] [How To Contact Me]
---------------------------------------------------------------------------
[Back to the top]
---------------------------------------------------------------------------
[Image]What's new ?
[Image] I get way too much mail, so I have changed a few things in the
conditions in which you can mail me. So please read them carefully before
you mail me !
New/updated sections
[Image] The Mail Me section has been updated, since I get too much
mail !
[Image] I set up a Mailing List on Protected Mode ! Join now !
[Image] Updated some info in the Books section.
New/updated sources
New/updated links
[Image] Link to The AsmEdit page
[Image] Link to Pentium Optimization page
New/updated other things
[Image] New header image (made by Dima Samsonov !) and some other
minor improvements.
My plans for the near future !
[Image] I'm thinking about a total redesign for my page, adding a lot
more info, links etc.
---------------------------------------------------------------------------
[Back to the top]
---------------------------------------------------------------------------
How to browse this page
Screen resolution
o Made in: 1024x768x256
o Checked and approved: 800x600 and 1024x768
o Also possible (not as good!): 640x480
Number of colors
o Best: 256 colors; all real images are in 256 colors (not more!).
Only some dummy images are 16 colors to make them smaller and
thus faster to load. If you really wanna use 16 colors, you
better switch off the background picture !
Which browser
o Made using: Netscape 1.2b6 for Windows95
o Adviced: Netscape 1.2 or newer
o Probably bad results: Mosaic, Cello, lynx (text based)
o Why: I used special html-codes (table e.g.) and Netscape is much
faster loading and easier to use.
o Text mode: So far I haven't put any effort in trying to make it
look acceptable in text mode, I think I will someday. Let me know
if you want it !
How to read this page
I decided to put (almost) all information in one document, for ease of
use and higher performance. Although loading such a large document,
with all its' images at once, takes some time, in the end you will
find it much quicker and easier.
Every time you click a link to another document, all sorts of
communication is required with the host. And even if the document and
its' images are in cache, the whole document needs to be rebuild. By
combining everything in one document, the only thing you essentially
do is scrolling up and down.
I did provide a way to quickly jump from section to section though:
o After the initial load, you start at the top with the
Assembly-image. Click on 'In this document' to make the screen
scroll down a little. You now have 'In this document' as the
first line and beneath it the complete table of contents.
o Choose the section you would like to see, you will jump right to
it (no extra loading). If the section you chose wasn't loaded
yet, you will end up at the start of the document. Simply press
'In this document' again and choose another section or try again.
o Read the section, scrolling down somewhat when needed.
o Clicking 'Back to the top' (beneath every section) brings you
back in the table of contents (again, no loading).
Do not press the back-button of NetScape ! This
[Image]will cause the document to be rebuild completely
(from cache or not), which is much slower !
---------------------------------------------------------------------------
[Back to the top]
---------------------------------------------------------------------------
Questions & Answers
In this sections I'll put all interesting questions and, as soon as I have
them, the answers to them. If you have a question or an answer, please mail
me: faber@fys.ruu.nl.
Question Answer
I think this would be a nice thing to keep endless
Now that discussions about. My opinion (and you may disagree if
Windows95 is you want !) is that Assembly certainly not dead yet ! I
available, is don't think DOS is dead yet either. It probably won't
Assembly language take much longer now, but it really isn't yet ! And
still useful ? then there will be the possibility to write Assembly
routines for Windows-programs, although I have no
experience with that !
---------------------------------------------------------------------------
[Back to the top]
---------------------------------------------------------------------------
Books
This section contains information on lots of books (for beginners
and more advanced programmers !). I read some of them, others I
only have heared about. Of course I'm not responsible for any
[Image]mistakes, but if you find one, please let me know !
If you know any good books, please let me know ! Please mail me a
somewhat detailed description.
For Beginners
The Waite Group's Microsoft Macro Assembler Bible 2nd edition by Barkakati
and Hyde.
ISBN: 0-672-30155-5
Descr.: instructions (+ encoding & timing), MASM 6.0. Basicly:beginners
course on Assembly
Assembly Language Programming and Organization of the IBM PC by Ytha Yu,
Charles Marut
ISBN: 0-07-072692-2
Mitchell-McGraw Hill, 1992
Descr.: A very very basic guide to Assembler of the 80x86.
Jeff Duntemann "ASSEMBLY LANGUAGE Step By Step"
If you haven't programmed before this is a great book. Jeff assumes you
don't know anything and give you the basics, starting with how computers
think and then going into the numbering systems. He has a very good
approach, with a slight bent toward humor, making for an interesting
learning experience. (Steve Fox)
ISBN: 0-471-57814-2 (paper : alk. paper)
Publisher: John Wiley & Sons, Inc.
For intermediate and advanced programmers:
Programmer's technical reference: The processor and coprocessor by R.L.
Hummel.
ISBN:1-56276-016-5
Descr.: architecture and programming of intel's 80x86 and 80x87 (not
pentium), 32-bit mode, complete instruction sets.
Assembly language for real programmers only ! by M. Johnson (SAMS
publishing).
ISBN: 0-672-48470-6
Descr.: Windows programming, 32-bit prot.mode, CodeView etc., MASM 6.1
C programmer's guide to serial communications 2nd edition by J. Campbell
ISBN: 0-672-30286-1
Descr.: contains 2 parts: 1st part is serial comm. in general (no C yet!),
2nd part contains C sample programs.
PCintern by Micheal Tischer (Abacus)
ISBN: 1-55755-145-6
Descr.: covers writing TSRs, device drivers, multitasking, DPMI/VCPI,
programming network-applications.
PCintern 4 by Micheal Tischer (Abacus) (I only know about the Dutch version
!!!)
ISBN: 90-5167-027-3
Descr.: Systeem programmeren: TSRs, device drivers, multitasken, DPMI/VCPI,
netwerken, CDROM, Soundblaster.
PC INTERN Edition 5 by Michael Tischer
ISBN: 1-55755-282-7
Price: $59.95 USA (including CD ROM)
Descr.: unknown (same as above, just newer/more ?)
Pentium Processor optimization tools by Michael L. Schmit, published by AP
Professional
ISBN: 0-12-627230-1
Descr.: The book (primarily) contains info on how to optimize code for the
Pentium (also the 486). The disk includes a copy of PentOpt, a Pentium
optimization tool, DEBUG32 (a DPMI debugger) and a library of routines for
timing your code.
Descr. by: Mike Schmit himself !
UNDOCUMENTED DOS by Andrew Shulman, Raymond J. Michaels, Jim Kyle, Tim
Patterson, David Maxey, and Ralf Brown. 1990, Addison-Wesley Publishing
Company, Inc.
ISBN: 0-201-57064-5
Descr.: a Programmer's Guide to reserved MS-DOS functions and Data
Structures (Covers DOS 5) .
ADVANCED MS-DOS PROGRAMMING, Second Edition by Ray Duncan. 1988, Microsoft
press
ISBN 1-55615-157-8
Descr.: The Microsoft Guide for Assembly Language and C Programmers.
Developing your own 32-bit Operating System by Richard A. Burgess (SAMS
publishing)
ISBN: 0-672-30655-7
Descr.: Very detailed log of how he wrote his own OS, includes a CDROM with
(C and ASM) source etc.
PC UNDERGROUND by: B. Bertelsons & M. Rasch
ISBN: 1-55755-275-4
Price: $34.95 USA (includes CD ROM)
Descr.: unknown
The PC programmers bible by Peter Norton, Peter Aitken and Richard Wilton
ISBN: 1-55615-555-7
Price: around $30 (USA)
Descr.: Covers 8088 - Pentium
EISA and Micro Channel
Sound Cards, Modems, Net Adapters, and Printers
MS-DOS 6.0, MS Windows 3.1, and NT, OS/2 2.0
Books and/or description unknown to me:
Zen of code optimization by Michael Abrash
Programmers Guide to the IBM PC by Peter Norton
80386 Programming Guide by Lance Leventhal
C with Assembly Language by Steven Holzner (beginner !)
For more information on a lot of books check out the Macmillan Information
SuperLibrary and another Assembly site, that also contains (among other
things) book info.
---------------------------------------------------------------------------
[Back to the top]
---------------------------------------------------------------------------
My own creations
Here are the sources and executables of programs and routines that I wrote.
See also: 'Sources'
Name KBDescription
Hercules.zip 28Some great Hercules routines that allow you to use 2
monitors at the same time ! Great for debugging etc. !
TraceInt.zip 1 Sample program that uses my Hercules routines to trace
ints (simple TSR).
Program that continually copies the VGA
VGAColor.zip 1 color-attribute-bytes onto the Hercules screen as
characters (simple TSR).
cdrom.zip 3 Little program that opens and closes your cd-rom from the
command line.
newcdrom.zip 2 Newer version of the cdrom-program above (auto-detects
cdrom-driver name).
cdrom3.asm 2 Version 3: smaller, better programmed and compiles with
MASM and TASM !
TSRsampl.zip 1 Sample program of how to make a TSR. Also see How To make
a TSR..
---------------------------------------------------------------------------
[Back to the top]
---------------------------------------------------------------------------
[Image] Links
The following table contains all kinds of links related to Assembly
programming. Please tell me if you have an URL or FTP-address that could be
of interest to the others reading this page !
Other Assembly World Wide Web pages
The Assembly pages of rrose Another Assembly page Great site with a lot of link of
Arzie !
DOS and BIOS clones, with source Operating Systems Web site of NuMega (great debuggers!)
Randall Hyde Plug & Play BIOS specification 1.0a Joe's Assembly Language Links Page
Chris' Programming Page Tore's Assembly Tutorial Peter's PMode Page
Cameron's Programming Pages A complete Asm course ! Ard Oerlemans' Assembly Page !
Yahoo's(the search engine) 80x86 Assembly
Page A complete Assembly book online !! The AsmEdit page
Pentium Optimization Page
News groups
alt.msdos.programmer comp.lang.asm.x86 comp.os.msdos.programmer
comp.os.ms-windows.programmer comp.os.ms-windows.programmer.controlscomp.os.ms-windows.programmer.drivers
comp.os.ms-windows.programmer.graphics comp.os.ms-windows.programmer.memory comp.os.ms-windows.programmer.misc
comp.os.ms-windows.programmer.multimedia comp.os.ms-windows.programmer.networkscomp.compilers
comp.compression.research comp.os.msdos.desqview comp.programming
comp.os.ms-windows.programmer.ole comp.os.ms-windows.programmer.tools comp.os.ms-windows.programmer.win32
comp.os.ms-windows.programmer.winhelp rec.games.programmer
FAQ's
FAQ of newsgroup comp.os.msdos.programmer comp.os.ms-windows.programmer.vxd FAQ x86 Assembly Language FAQ
ftp sites with lots of Assembly directories
Macmillan Information SuperLibrary ftp.cdrom.com x2ftp.oulu.fi
zfja-gate.fuw.edu.pl/user/net/ka9q/guest/
Technical docs and info
Ralph Brown's Interrupt List A list of all possible ints !
HelpPC A very complete technical info database
Intel Secrets What Intel Doesn't Want You To Know !
---------------------------------------------------------------------------
[Back to the top]
---------------------------------------------------------------------------
Sources
This section contains the sources of programs of several contributors. See
also: 'My Own Creations'
Name KB Description
Chk_Date.zip 2 Little routine to let programs only run once a dat
in batch files !
xms.zip 15 Example of how to use xms-memory in Assembly.
dos.zip 3 A few great routines to use in your VBDOS
programs. From one of my contributors.
key_code.zip 2 Little tool that tells you the scancodes with the
key you pressed.
dialer.zip 18 GREAT resident phone dialer, includes complete
database. Only 4.5 K when resident !.
envfind.zip 2 Great little util for searching files !.
helloos2.zip 2 Example of making an OS/2 application using MASM
6.11.
qcopy.zip 11 Fast diskcopy program (written in Pascal !).
qb_ipx.zip 100Not assembly, but it explains a lot about using
IPX (network protocol).
df.zip 12 Not assembly, but shows how to format disks in C
and Pascal (from the book PC Intern 4).
bootsec.zip 2 Describes how to create your own bootsector code.
win95ex.zip 27 Sample of making Win95 programs in Assembly.
dma_info.zip 10 Information on DMA programming !
TSR and EXEC sample program, not finished yet,
[Image]savscrn.zip 13 download it if you think you can help the maker !!
(includes asm source!)
---------------------------------------------------------------------------
[Back to the top]
---------------------------------------------------------------------------
How To ?
programing stuff my page internet
How to make a TSR How to browse this page How to find technical
information
Run Windows without
GUI How to contact me Find files on the Net
How to send me
sources/info etc.
---------------------------------------------------------------------------
[Back to the top]
---------------------------------------------------------------------------
How to make a TSR
Making a TSR (Terminate and Stay Resident) program is somewhat
different than making a normal program. It isn't very difficult though
! In this section I'll try to explain the basics of a TSR.
A TSR program is basicly just a piece of code that remains in memory
when the program is terminated. 'But when is it executed if the
program already quit', you might ask. The main program has set up
(before it quit) the Interrupt Vector Table (IVT) so that one (or
more) of the interrupts points towards the piece of resident code.
This way every time that interrupt occurs, your piece of code (the
Interrupt Service Routine or ISR !) gets executed.
Interrupts can be generated in two ways: by hardware or by software.
An example of an hardware interrupt is the one from a serial port or
from the keyboard. The ISR is responsible for handling the cause that
generated the interrupt (receiving a byte e.g.). Software interrupts
are for example interrupts to BIOS or DOS routines, you probably use
them all the time in your programs by using the INT instruction.
Hoe do we set the IVT ? The IVT is just a piece of memory at address
0000:0000 (with 256 4-byte FAR pointers to ISRs) in memory and you
could just alter the values there. Another (more compatible) way is to
use the DOS routines for it. See my example code lateron.
What to do when my ISR is executed ? What you exactly do in your ISR
depends on which interrupt you hook on to, but there are a few general
guide lines:
o The interrupt-flag is normally disabled (preventing other
interrupts to occur) at beginning of your ISR. Good behaviour
tells you to enable it ASAP (using the STI-instruction).
o Save all registers you're planning to use on the stack, unless
you really want them to be changed after you ISR is done. When
you have hooked a hardware interrupt, you definitely don't want
to change any registers.
o You do not need to save the FLAGS-register, this was
automatically done when the interrupt occured. Just use IRET to
exit your ISR instead of the normal RET. You can also use RET 2
(for skipping 2 bytes on the stack, the FLAGS-bytes !) when you
do want to change the FLAGS ! Again, you can't do that in a
hardware ISR !
o Remember that you do not really know when and where the interrupt
occured, so the only register you know is CS. This is not really
true in software interrupts, you could demand the caller to setup
some registers as parameters. But do not use DS if you thinks it
points towards your own DATA (or CODE)-segment. If you need data
in your own segment, use MOV AX, CS and MOV DS, AX (after PUSHing
AX) or: PUSH CS and POP DS.
o Very often you need to call the old ISR (the one that was
installed before yours was !) when you're done, or the interrupt
was not mend for you. Thus you need to remember the old address
before you install your own ISR and use CALL CS:OldHandler to
call the old one.
o Remember when you're pushing things on the stack, you're not
working on your own stack, but on the stack of the program that
was running when the interrupt occured ! Do not push more than a
few registers !
o Another tricky thing about TSRs: you probably can't call DOS and
BIOS routines because they are not reentrant (can be active only
once at a time) and suppose the interrupt just interrupted one of
these routines ! If you really do need to calll a DOS or BIOS
routine, also hook those interrupts and maintain a flags for when
they're active and when not.
Time for an example ! (You can also download this example by cliking
on this word !)
; This sample code will hook the timer interrupt (hardware, called 18.2 times a sec.).
.MODEL TINY
.386
.CODE
.STARTUP
jmp Install ; Jump over data and resident code
; Data must be in code segment so it won't be thrown away with Install code.
OldHandler DWORD ? ; Address of original timer routine
NewHandler PROC FAR
push bx ; these two registers will be changed
push ds
mov bx, 0B800h ; 0B800h is the address of the VGA display
mov ds, bx
mov bx, 1 ; the color attirbute of the first character of the screen
inc [bx] ; increase it (color will change 18.2 times a sec.)
pop ds ; restore the registers
pop bx
jmp cs:OldHandler ; this is the same as CALL CS:OldHandler + IRET
NewHandler ENDP
Install PROC
mov ax, 351Ch ; Request function 35h
int 21h ; Get vector for timer (interrupt 08)
mov WORD PTR OldHandler[0], bx ; Store address of original
mov WORD PTR OldHandler[2], es ; timer interrupt
mov ax, 251Ch ; Request function 25h
mov dx, OFFSET NewHandler ; DS:DX points to new timer handler
int 21h ; Set vector with address of NewHandler
mov dx, OFFSET Install ; DX = bytes in resident section
mov cl, 4
shr dx, cl ; Convert to number of paragraphs
inc dx ; plus one
mov ax, 3100h ; Request function 31h, error code=0
int 21h ; Terminate-and-Stay-Resident
Install ENDP
END
The only way to really learn TSR programming is to just experiment a
lot. If you want to see more samples, check out My Own Creations and
Sources.
[Back to How To index] [Back to Top]
How to run Windows without GUI
Running Windows (3.x or 95) gives you a great DOS-multitasker without
the boot-time and overhead (on CPU, memory, disk, VGA-adaptor etc) of
graphics. To see how to start Windows without the GUI, check this
dedicated page.
[Back to How To index] [Back to Top]
How to find technical information
[Image] See these sections of my page: 'My Own Creations', Sources',
'Question & Answers', 'Links', 'Books' and 'How To'.
[Image] Download HelpPC and The Interrupt List, these are really great
databases full of tech info !!! See the Links section.
[Image] Use various search engines on the WWW (click Directory |
Internet Search in Netscape). Other great search engines: Alta Vista
or Yahoo.
[Image] Take a look at the FAQ's that are in my Links-section.
[Image] Use FTP and look in directories like
/pub/msdos/programming/.....
[Image] Ask me
[Back to How To index] [Back to Top]
How to send me sources/info etc.
If you have sources or other files that you want to send to me so that I
can put them on my page, you can do that in several ways:
[Image] Upload it using FTP to ruunat.fys.ruu.nl place it in the /uploads/
directory and then mail me telling me the name of the file(s) you just
uploaded.
[Image] Attach the file(s) to an email (please, only do this if you cannot
use FTP!).
Anyway, always include a description of the files, your email address and
the URL of your home page (if you have one and want a link to it on my
page).
[Back to How To index] [Back to Top]
How to find files on the Net
You want to search for a specific file somewhere on one of the billion
ftp-sites ? That's what archie is for ! Type in (part of) the name of the
file you need and press Enter to get a list of all ftp-sites that have such
a file.
Try this online Archie Gateway [SORRY ! This CGI-script seems to be
disabled, I'm working on this !].
You can also try to find some info at Search engines like:
o Alta Vista
o Yahoo
o Infoseek
[Back to How To index] [Back to Top]
---------------------------------------------------------------------------
[Back to the top]
---------------------------------------------------------------------------
Protected Mode
And finally it's here ! The Protected Mode Mailing List !
I set up a free mailing list on protected mode programming and everything
that has anything to do with it. The list depends on people like you that
are interested in the subject. You ask a question others try to help you on
it. Someone else asks a question, you try to help him/her !
I do need to warn you: personally I do not know enough about protected mode
to really answer questions or ask them. I will try to keep the list alive
and I'm the one that set it up and maintains it (in my free time, so no
complaints ! :). I need you to really give the list a meaning !
If you want to subscribe simply send an email to majordomo@fys.ruu.nl with
the following in the body:
subscribe pmode-l
(this is PMODE-L, not pmode-1 !!) Send it from your own email account, so
that the majordomo scripts can get your email address. You'll automatically
get an email saying you you are subscribed.
---------------------------------------------------------------------------
A little tutor (which is not mine) !
[Image] NEW: I created a page on how to start MS Windows without the GUI,
and thus use it as DOS-multitasker !
[Image] NEW TOO: Check out Peter's PMode Page !
---------------------------------------------------------------------------
[Back to the top]
---------------------------------------------------------------------------
Beginners corner
Welcome Assembly novice !
Assembly language programming is programming the computer at the lowest
level possible, it is essentially writing direct processor instructions.
Unlike in other programming languages, where you write a series of commands
(often multiple on a single line) and then let the compiler translate your
program into machine code (where every high-level-command is often hundreds
of actual processor instructions). Assembly language is a literal
translation of real machine code (series of bytes) in a more readable (to
humans!) form.
Assembly programming is often found more difficult than high-level
programming, because you have to think like the computer and need a lot of
instructions for a simple task. This also makes maintaining or even
understanding the code difficult. But why do people still program in
Assembly language then ? That's because, when you program right, you can
get the fastest and/or smallest code possible and you can simply program
everything that can be done with a computer.
But there is a way to combine the advantages of both Assembly and
high-level languages: use only small Assembly routines that are used by the
body of the high-level program. These Assembly routines perform tasks that
really need to be fast or just can't be done from within the high-level
language, but the main part of the program is in plain and simple high
level language. If you rewrite a high-level routine, that takes about 90%
of the running time, into Assembly and thereby triple its execution speed,
you get a program that runs well over twice as fast ! This is of course a
little rare example, but it does illustrate my point.
An often used routine, for example, is one that writes a string directly to
the screen (also see my own Hercules routines for an example !), instead of
via the DOS or BIOS routines (that most high-level languages use). Those
DOS and BIOS routines are quite slowly: keeping a simple counter on the
screen may slow down the process significantly, try it ! The solution is
making a routine that simply places the characters of the string directly
in the video memory (somewhere in RAM). This is really a lot quicker and
can significantly speed up programs with a lot screen output. This method
does make your program a little less compatible, but it'll still work on
normal PC's (about 99.99 %!). Of course there are some disadvantages, for
one: you loose the ability to redirect the output (MYPROG > OUTPUT.TXT),
but in todays programs that's hardly a breakdown !
I get questions from people that want to learn or just start experimenting
with Assembly quite often. Here are the Frequently Asked Questions (FAQ):
I need to make executable files out of my assembly sources, how do I do
that ?
What you need is an Assembler, a program that translates your Assembly
source into real processor instructions.
Where do I get an Assembler ?
There are a lot of Assembler in use to day. You have the choice
between a commercial, a shareware or a freeware Assembler.
Commercial Assemblers: Microsoft Macro Assembler (MASM), Borland Turbo
Assembler (TASM). There are more though !
Shareware Assemblers: A86 (and its debugger D86). See 'Links' to find
some ftp-sites where you can get them.
Freeware Assemblers:
Where do I find a tutoral or a good book on Assembly ?
I give some information on good books in the section 'books'. Tutorals
and helpfiles can be found on several ftp-sites and BBSes, I have some
links to several of them in the 'Links' section.
I need a complete overview of all available interrupts and instructions !
There are several technical databases available on the Net (The
Interrupt List from Ralph Brown and HelpPC e.g.), check out the
section 'Links'.
I need information on how to program '....' (the mouse e.g.) !
See the section 'Links' for information on The Interrupt List and
HelpPC (technical databases) and links to ftp-sites with sample codes.
Maybe I have one or more sample programs on this, see the section
'Sources', 'My Own Creations', 'Questions & Answers' and 'Books'.
I'm having trouble writing a TSR !
See the section 'How To program a TSR'.
I wish you lots of luck with Assembly-programming !
---------------------------------------------------------------------------
[Back to the top]
---------------------------------------------------------------------------
Thanks to...
At this point I would like to thank (in random order):
* [Image] Dima Samsonov for the header image !
* all contributors that have given me a lot of sources, tips, info etc.
* you for visiting my page !
Put on the web: September 1st 1995 (updated a lot since!)
Created by: Jannes Faber
Email: faber@fys.ruu.nl
URL: http://www.fys.ruu.nl/~faber/Amain.html
Copyright ⌐ 1995, 1996 by: Jannes Faber
Thank you for: dropping by, please do it again sometime !
---------------------------------------------------------------------------
[Back to the top]
---------------------------------------------------------------------------