Archive-Name: assembly-language/x86/general/part1
Posting-Frequency: monthly (21st of every month)
Last-modified: 2010/01/24
------------------------------
Subject: 1. Introduction and Intent
This is the x86 Assembly Language FAQ for the comp.lang.asm.x86 and
alt.lang.asm newsgroups. This FAQ is posted monthly on or about the
21st of the month to both newsgroups and news.answers, alt.answers and
comp.answers. It also is archived at the normal FAQ archival site,
ftp://rtfm.mit.edu and to SimTel and its mirror sites in the msdos/info
directory and Garbo and its mirrors in the pc/doc-net directory. When
uploaded to SimTel or Garbo, the filenames are asmxxyyz.zip, where xx is
the two digit year, yy is the number of the month and z is t for text or
h for HTML format. Lastly, the current version is available from my web
page:
http://www.fysnet.net/faq/index.htm
Zipped down as text files:
http://www.fysnet.net/faq/asmfaq.zip
Zipped down as HTML documents:
http://www.fysnet.net/faq/asmfaqh.zip
Currently, this FAQ is broken into six sections. The following are the
section filenames and the scope of each section of the FAQ.
assembly-language/x86/general/part1 - This is the basic portion of the
FAQ that contains information of interest to all assembly language
programmers. In general, the information contained in this portion
of the FAQ is not specific to any particular assembler.
assembly-language/x86/general/part2 - This is a continuation of the
above FAQ.
assembly-language/x86/general/part3 - This is a continuation of the
above FAQ.
assembly-language/x86/microsoft - This portion of the FAQ contains
information specific for the Microsoft MASM.
assembly-language/x86/borland - This portion of the FAQ contains
information specific for the Borland TASM.
assembly-language/x86/a86 - This portion of the FAQ contains information
specific for the Shareware A86 Assembler and D86 Debugger.
The scope and content of this FAQ is to go beyond just answering the
frequently asked questions. I am including pointers to assembly
language treasure troves that are hidden on the Internet. I believe
that this will enhance the FAQ's value not only to the novices but also
to the old hands.
For the ease of determining what has changed since the last FAQ, the
Table of Contents will have "REVISED" at the end of the subject line for
all revised subjects. If more than one FAQ revision has been missed,
the "Last Changed:" entry at the end of each subject can be used to
determine which subjects have been revised during the intervening
period.
The information in this FAQ is free for all to use as long as you
acknowledge the source. This FAQ can be reproduced in part or in its
entirety as long as the copyright is included. This FAQ can be made
available on public servers, like ftp, gopher or WWW servers. Please do
not modify the file, such as converting it into some other format,
without prior permission of the author.
All references to files and locations are in Uniform Resource Locators
(URLs) format. Some web browser will be able to use these URLs directly
as hot links. If the format is not clear to you, get RFC 1738. It is
available from:
http://www.faqs.org/rfcs/rfc1738.html
Suggestions for changes and comments are always welcome. They can be
posted to either newsgroup or e-mailed directly to me.
This FAQ was created and maintained by Raymond Moon before I
took it over. Many thanks to Ray for the effort in creating
this FAQ. Even though most of the links and names have been changed
to mine, the credit still goes to Ray for the work he did. Thanks Ray.
Author: Benjamin David Lunt, fys_at_fysnet.net
Copyright 2010 - Forever Young Software
ALL RIGHTS RESERVED
Last Changed: 24 Jan 2010
Return to the Table Of Contents
------------------------------
Subject: 2. Table of Contents
Part I
1. Introduction and Intent
2. Table of Contents
3. Charters For comp.lang.asm.x86 and alt.lang.asm Newsgroups
4. What is Assembly Language
5. List of x86 OpCodes
6. What is HELPPC and Where It Is Available
7. How To Truncate a File
8. How Can STDERR Be Redirected To a File
9. How To Determine the CPU Type
10. IRQ Assignments
11. Ralf Brown's Interrupt List
12. Using VGA Mode 13h for Fast Graphics
13. Protected Mode Programming
14. Shareware ASM Libraries
Part II
15. Accessing 4 Gegs of Memory in Real Mode
16. What Is Available at developer.intel.com
17. Interrupts and Exceptions
18. ASM Books Available
19. ASM Code Available on Internet
20. How To Commit a File
21. Using Extended Memory Manager
22. EXE2BIN Replacement
23. ASM Tutorials Available on the Internet
24. Shareware/Freeware Assemblers
25. Undocumented OpCodes
Part III
26. WWW Assembly HomePages
27. Common Reason Why Memory Allocation Fails
28. Volume Serial Numbers
29. File Formats Assosiated with ASM
30. Rebooting from Software
31. Other FAQs
32. Pseudo Random Number Generator in Assembly Language
33. Command Line Arguments
34. Free 32-bit and DJGPP
35. TERSE Programming Language
36. Assembly Language IDEs
37. Disassemblers
38. How to Optimize for the Pentium
39. Assembly Language Programming Style Guidelines
40. Other Assembly-Related Newsgroups
41. ZD-86 Debugger
42. Links to x86 Processor Manufacturers
43. Linkers Available
44. ASM Mailing Lists
45. ASM Programming Journal
46. Acknowledgments
47. PC Operating Systems in Assembly
99. Acknowledgments
[General][MASM][TASM][A86/D86]
------------------------------
Subject: 3. Charters For comp.lang.asm.x86 and alt.lang.asm Newsgroups
To know whether or not these newsgroups will meet your needs, the
purpose for which they were created are given below.
3.1 COMP.LANG.ASM.X86 (CLAX)
comp.lang.asm.x86 was created based upon voting on a Request for
Discussion (RFD). The RFD for this newsgroup is:
The moderated newsgroup comp.lang.asm.x86 will be open to discussions on
all topics related to assembly language and low-level programming on any
machine using a x86 processor or its clones. Appropriate topics would
include, but not be limited to:
Assembly language code tips, tricks, and techniques.
MASM, TASM, and other commercial assemblers
NASM, and other non-commercial assemblers
Graphics, sound, and other hardware programming
Assembly language related utilities commercial/share/free-ware
Linking assembly language with other languages
Inline x86 programming utilizing assembly emulators in higher level
languages
Propagation of non-commercial Internet x86 resources
Any question/discussion of the direct programming of the x86
Etc...
Topics that will be filtered are:
Flames about "{Language X} is {better/worse} than ASM"
Flames like "{Assembler 1} is {better/worse} than {Assembler 2}"
Flames, personal attacks, insults, etc.
HLL code, except when used for low-level hardware programming.
Product comparisons except when presented in an unbiased fashion.
Advertisements unrelated to assembly programming or utilities.
Posts in languages other than English will be examined for approval
if any of the moderators can read the language in question. There
is no guarantee of approval for a post in any language other than
English.
Posting to comp.lang.asm.x86, a moderated newsgroup, is not any
different for you as posting to an unmoderated newsgroup. When you are
finished composing your post just send it as you normally do. Your
ISP's news server will send the post to the moderator's e-mail address.
Once approved, the moderator will post it. Therefore, you will not see
your postings immediately in the newsgroup. It should take no longer
than a day or so to see it.
If your ISP does not carry this newsgroup, you can send your post directly
to the email mentioned above using the following address:
clax86-submit@inspiretomorrow.net
3.2 ALT.LANG.ASM
Alt newsgroups are initiated with a Proposal posting to the alt.config
newsgroup. The proposal for alt.lang.asm is:
alt.lang.asm will address the problems of machine language programmers
out there in Internet land. It will be a forum for discussion of coding
techniques and efficiency problems related to machine language. The
scope will be broad. We will not discriminate by machine architecture,
race or sex.
3.3 Posting Guidelines
The following are simple guidelines to help you post to the above
newsgroups. These simple guidelines are just that, simple. They're not
rules written in stone, just guidelines. Please consider them when you
are posting new messages and replying to existing messages.
- Please use a somewhat detailed subject line. A line such as "help me"
is not considered detailed, where as "8086 SALC instruction help"
is detailed. Please note that some newsreaders truncate a long
subject line.
- Please do not place part of the subject on the subject line and
the rest of the subject in the body of the message.
- Please do not ask a question via the subject line.
- If you are replying to a message, please see that only one "re:" is
prefixed to the subject, rather than multiple 're:'s.
- If you are completely changing the subject in the body, please note
in the subject line: re: new subject [was: old subject]"
- Please keep cross posting to a minimum between the two mentioned
groups.
- If you *must* ask for a response by email, please make a follow-up
post.
In this follow-up, please do not just include all original emails,
but make a worth-while response to what the outcome of the responses
brought to you and/or the subject at hand.
- Please do not request that someone do your home work or other work
for you. However, you may ask for help with the particular problem
you are having. When asking for help, always describe what you have
already tried yourself and/or what part of the original problem you
don't understand and need help with.
- Please be advised that most newsreaders cut your lines to about
70 chars per line. If you use more chars per line, you may get
linewrap with out the usual prefix char when replying.
- Please do not post binaries. There are other ways to have people
see your binary. A simple URL in the body of your message is
more appropriate than an attachment. Besides, some news servers
reject postings with binary attachments.
- Please keep your text attachments to a minimum and a minimum size.
If the text attachment is only a few lines, post it directly in your
message at the point of interest. However, if you have a text
attachment of 100 lines or more, you may leave it an attachment or
place it at the end of the message. Some newsreaders treat attachments
differently.
- When replying to larger messages, please cut non associated text
from your reply. If needed, please include quotes of the portion
of the previous post to make the current post in context. For smaller
messages, it is okay to leave all text as is.
- Please do not quote an entire long message just to say "thank you".
Quote a small amount to remind the reader about what you are saying
"thank you" to.
- Please use text format for your messages. HTML formatted messages are
not pleasing to most readers.
- Please keep your signature to about 5 lines including blank lines.
Five does not include the '-- ' line.
- If you would like someone to reply to you via email, please either
leave instructions on manipulating your "anti-spam" reply address,
or leave your actual address. Do not assume the reader will
know how to parse your address for "anti-spam" items.
- Please do not add any text to the "end" of your email address. Many
newsreaders will reject posts that don't have a recognizable ending
component (.com, .org, etc.). It is better to place all your "anti-
spam" text before the "@" symbol or the .com|.org, etc.
- If your message is rejected, moderators will usually send you a
notification by email. If any significant effort is required to
notice and/or fix the anti-spam in your email address, the moderators
may not bother with it.
Contributor: Forever Young Software, fys_at_fysnet.net
Last changed: 24 Jan 2010
Return to the Table Of Contents
------------------------------
Subject: 4. What Is Assembly Language
4.1 WHAT IS MACHINE LANGUAGE?
Although programmers tend to use C, C++ or Pascal these days, the
language closest to the PC hardware is machine language. Not one second
during a PCS powered on lifetime passes where the computer is not
executing machine language.
4.2 ASSEMBLY LANGUAGE OR MACHINE LANGUAGE
To word this simply, you can say that assembly language is a human-readable
text language, and machine language is machine-readable binary code.
When you program in assembly language, you are programming on the
machine language level.
To program directly in machine language is tedious, so you use assembly
language instead, and use an assembler to produce the actual machine
code.
4.3 WHEN TO USE ASSEMBLY LANGUAGE
I personally think that except as a learning exercise it is a waste of
time writing something in ASM that can be written acceptably fast in a
high-level language.
Assembly language fits for the following:
* Low level control. When you need to change the flags, or the
control registers of the processor, as when entering protected
mode.
* Speed. Programs written in machine language execute fast! It can
execute 10-100 times the speed of BASIC, and about twice as fast as
a program written in C or Pascal.
* Time Critical Code. Critical sections of programs written in
higher level languages can be written in assembly to speed up
sections.
* Small program size. When you write a TSR for example this is very
useful. Writing interrupt handlers is where assembly language
shines.
Assembly language is very flexible and powerful; anything that the
hardware of the computer is capable of doing can be done in assembly.
Contributor: Patrik Ohman, patrik@astrakan.hgs.se
Last changed: 03 Mar 2004
Return to the Table Of Contents
------------------------------
Subject: 5. List Of x86 OpCodes
5.1 x86 OPCODES
The best source of OpCodes up to and including the Pentium 4 processor
is in the Intel Architecture Software Developer's Manual, Volume 2:
Instruction Set Reference Manual. It is available in .pdf format from
Intel's Web Site:
http://www.intel.com/Assets/PDF/manual/253666.pdf
5.2 MMX OPCODES
Intel has a chapter covering these new OpCodes in the MMX Technology
Programmer's Reference Manual. This chapter is Chapter Five - Intel
Architecture MMX Instruction Set.
http://myrasoft.host.sk/texts/mmx/prm_chp5.htm
5.3 OTHER SOURCES OF THESE DOCUMENTS
These manuals are available on the Intel Developer's CD-ROM, see Subject
#16. You also can find these manuals at:
-- Intel Architecture (IA-32) Software Developer's Manual, Volume 1: Basic
Architecture (2008) ( 1997 )
http://download.intel.com/design/processor/manuals/253665.pdf
-- Intel Architecture (IA-32) Software Developer's Manual, Volume 2a (A-M):
Instruction Set Reference Manual (2008) ( 1997 )
http://download.intel.com/design/processor/manuals/253666.pdf
-- Intel Architecture (IA-32) Software Developer's Manual, Volume 2b (N-Z):
Instruction Set Reference Manual (2008)
http://download.intel.com/design/processor/manuals/253667.pdf
-- Intel Architecture (IA-32) Software Developer's Manual, Volume 3a (part
1): System Programming Guide (2008) ( 1997 )
http://download.intel.com/design/processor/manuals/253668.pdf
-- Intel Architecture (IA-32) Software Developer's Manual, Volume 3b (part
2): System Programming Guide (2008)
http://download.intel.com/design/processor/manuals/253669.pdf
Update to a few typos and what not to above three items.
http://developer.intel.com/design/processor/specupdt/252046.htm
Contributor: Raymond Moon, raymoon@moonware.dgsys.com
Last changed: 24 Jan 2010
Return to the Table Of Contents
------------------------------
Subject: 6. What Is HELPPC and Where Is It Available
HELPPC is a Quick Reference Utility for the intermediate to advanced
programmer. It is a shareware program written by David Jurgens. The
latest version is 2.10
The topics distributed in an easy database format are:
BIOS interrupts;
DOS interrupts and DOS functions;
EMS and Mouse functions;
BIOS and DOS data structures;
diagnostic codes;
DOS commands;
80x86 assembler instructions;
standard and vendor specific C functions; and
various hardware specifications.
HELPPC is customizable by users. The documentation describes how users
can incorporate their own information into the help file format. These
user help files then can be incorporated into the database and accessed
via HELPPC application.
HELPPC comes in two versions. The first is a DOS command line program.
The second is a TSR. The TSR supports context sensitive help within
many editors. Only 32K are taken by the TSR version.
HELPPC requires:
DOS 2.0 or greater;
64K of RAM for DOS Command Line or 32K for TSR; and
Hard disk recommended.
HELPPC is available from:
ftp://ftp.simtel.net/pub/simtelnet/msdos/info/helppc21.zip
or in web format at:
http://docs.huihoo.com/help-pc/index.html
HELPPC also is available from any site that mirrors the SimTel
directory.
Contributor: Raymond Moon, raymoon@moonware.dgsys.com
Last changed: 24 Jan 2010
Return to the Table Of Contents
------------------------------
Subject: 7. How To Truncate A File
There is not any single DOS Int 21h function that performs this
operation. A file can be truncated using two functions. The procedure
is:
1. Use Int 21h function 42h, Move File Pointer, to move the file
pointer to the position where you want the file to be truncated.
2. Use Int 21h function 40h, Write File or Device, to write zero bytes
to the file.
Execution of the last DOS function will update the directory to the new
file length.
Contributor: Raymond Moon, raymoon@moonware.dgsys.com
Last changed: 03 Mar 2004
Return to the Table Of Contents
------------------------------
Subject: 8. How Can STDERR Be Redirected To A File
I understand that 4DOS has this capability at its command line. If you
are looking in the assembly language FAQ for this information, an
assembly language answer probably is desired. Here it is.
You will need to write a short program that performs the STDERR
redirection before loading and executing the desired program. This
loader program relies upon the fact that a child program inherits all
open files of the parent program unless the parent program opens a file
with the inheritance flag set to no.
Because the full code for such a program is too large for this FAQ, I
will give the salient specifications for such a program.
1. The loader program accepts three command line arguments:
a. The full path and filename of the file into which STDERR is to
be written.
b. The full path and filename of the program to be executed.
c. The command line for the program to be executed (should be
delimited by double quotes to allow multiple arguments). This
argument is optional.
2. Release all memory above the program using Int 21 function 4ah so
that there will be room enough to load and execute the designated
program.
3. Open the file from step 1.a above into which STDERR is to be
written.
4. Duplicate STDERR filehandle, which is 2, using Int 21h function
45h.
5. Using Int 21h function 46h, force STDERR filehandle, again 2, to
have the filehandle of the opened file from step 2.
6. Use Int 21h function 4b00h to load and execute the program from
step 1.a. Use the default environment and the command line from
step 1.c above.
7. Upon return from the function 4b00h, close the file opened in step
2.
8. To restore STDERR, use Int 21h function 46h to force STDERR, again
2, to point to the filehandle saved from step 3 above.
This same technique can be applied to any of the standard devices.
I have written a full featured demonstration program. I believe that
asm programmers will find the source code useful even if they do not
want to redirect stderr to a file. The URL to the file is:
ftp://ftp.simtel.net/pub/simtelnet/msdos/asmutl/stderrf1.zip
Contributor: Raymond Moon, raymoon@moonware.dgsys.com
Last changed: 03 Mar 2004
Return to the Table Of Contents
------------------------------
Subject: 9. How To Determine The CPU Type
9.1 CPUID PROGRAM
The type of processor and math coprocessor can be determined using two
functions that have been provided by Intel. The source code to these
functions can be obtained from Intel by:
ftp://ftp.intel.com/pub/IAL/tools_utils_demos/cpuid3.zip [broken]
Three source files are included in this .zip file.
cpuid3a.asm - This source code file contains two assembly language
functions. One determines the type of cpu from 8088/8086 to
Pentium. The second detects and identifies, if present, the
type of math coprocessor.
cpuid3b.c - a c program that calls the above two functions and
displays the results.
cpuid3c.asm - this is an assembly program equivalent to cpuid3b.c.
There are documents by Intel here:
http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
And AMD here:
http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/25481.pdf
With others here:
http://www.cpuid.com/
9.2 AP-485 INTEL PROCESSOR IDENTIFICATION WITH THE CPUID INSTRUCTION
This Application Note explains how to use the CPUID instruction in
software applications, BIOS implementations, and various processor
tools. By taking advantage of the CPUID instruction, software
developers can create software applications and tools that can execute
compatibly across the widest range of Intel processor generations and
models, past, present, and future.
http://www.intel.com/Assets/PDF/appnote/241618.pdf
9.3 Robert Collins' CPUID.ASM
Robert Collins has written two columns for Dr. Dobb's Journal on this
subject. These articles with source code is available on his web site:
Part 1: http://www.rcollins.org/ddj/Sep96/Sep96.html
Part 2: http://www.rcollins.org/ddj/Nov96/Nov96.html
9.4 Grzegorz Mazur's x86 CPU Identification
Grzegorz has a series of hypertext articles that explain x86 CPU
identification algorithms developed by him. Covered are not only the
Intel chips but also V20, V30 (remember them), and Cyrix. His page is
located:
http://grafi.ii.pw.edu.pl/gbm/x86/ [original link]
http://web.archive.org/web/20080419091140/http://grafi.ii.pw.edu.pl/gbm/x86/
[via WayBackMachine]
Contributor: Raymond Moon, raymoon@moonware.dgsys.com
Last changed: 24 Jan 2010
Return to the Table Of Contents
------------------------------
Subject: 10. IRQ Assignments
A list of IRQ assignments are available in David Jurgens' HELPPC
database. See Subject #6 for details on how to obtain this program.
Contributor: Raymond Moon, raymoon@moonware.dgsys.com
Last changed: 03 Mar 2004
Return to the Table Of Contents
------------------------------
Subject: 11. Ralf Brown's Interrupt List
11.1 FILE AVAILABILITY
The latest version of Ralf Brown's Interrupt List is 61, dated 16 Jul 2000.
The files are available directly from his home page, from SimTel, or
Garbo:
http://www-2.cs.cmu.edu/afs/cs.cmu.edu/user/ralf/pub/WWW/files.html
(currently version 61)
ftp://ftp.simtel.net/pub/simtelnet/msdos/info (currently version 60)
ftp://garbo.uwasa.fi/pc/programming
http://www.ctyme.com/rbrown.htm Online version (recommended)
The files are:
inter61a.zip Comprehensive listing of interrupt calls, 1 of 4
inter61b.zip Comprehensive listing of interrupt calls, 2 of 4
inter61c.zip Comprehensive listing of interrupt calls, 3 of 4
inter61d.zip Comprehensive listing of interrupt calls, 4 of 4
inter61e.zip Utility programs/source code for interrupt list
inter61f.zip Hypertext conversion programs for interrupt list
11.2 DESCRIPTION
The interrupt list is a comprehensive listing of functions available
through interrupt calls and FAR calls, both documented and (officially)
undocumented, plus maps of CMOS and BIOS memory, I/O ports, I2C-bus
devices, and System Management Mode save areas. This release contains
more than 9500 entries and over 5300 tables.
11.3 WHAT IS NEW
New in this release: Start of an FAQ, 400k of additions, including:
AHA-154x commands, ATASPI, more MSRs (including AMD Athlon), lots of
DR-DOS/OpenDOS/PTS-DOS/S-DOS info (with more still to be added), AMIGATSR,
MULTIJOY, USB4DOS, VXDLDR, etc.
INTERxxF and INTERxxG have been merged, and OPCODES.LST has been updated.
11.4 OTHER INCLUDED GEMS
OVERVIEW.LST - A brief description of each of the 256 interrupts.
86BUGS.LST - A list of undocumented and buggy instructions with
descriptions of the x86 Intel processor and compatible
processors. And you thought that the Intel FDIV was the first
bug in a processor!
CMOS.LST - a CMOS memory map.
OPCODE.LST - A list of undocumented instructions and documented
instructions of any last processor.
PORTS.LST - I/O port addresses for XT, AT and PS/2 computers.
GLOSSARY.LST - glossary of PC terms.
MEMORY.LST - The format for various memory locations, such as the
BIOS Data Segment, Interrupt Vector Table, and much, much more.
INTERRUP.PRI - iAPX 86 Interrupt Primer
Contributor: Raymond Moon, raymoon@moonware.dgsys.com
Last changed: 24 Jan 2010
Return to the Table Of Contents
------------------------------
Subject: 12. Using VGA Mode 13h for Fast Graphics
12.1 INTRODUCTION AND PREPARATION
Mode 13h is so widely used for graphics applications in DOS because it
is very easy to use. The screen is constantly being redrawn by the
video card. To affect what the card draws, it is necessary to write to
the screen buffer. The screen buffer in mode 13h is always at
segment:offset = A000:0000. Thus, to set up drawing directly to the
video buffer, this is what you'd most often first do:
;Change the video mode to 13h
xor ah, ah ;VIDEO Function 00h: Change screen
mov al, 13h ;Put the desired graphics mode into AL
int 10h ;Call VIDEO
;Prepare for writing to the video buffer
mov di, 0a000h ;Put the video segment into DI
mov es, di ; so it can easily be put into ES
xor di, di ;Start writing at coordinates (0,0)
12.2 WRITING PIXELS TO THE SCREEN
Why is Mode 13h so popular? To understand, you must know a few basic
facts. In Mode 13h, the screen is 320 by 200, or 320 pixels across and
200 pixels down. In each pixel, there's a possibility of 256 colors,
which can be fit into one byte. Thus, 320*200*1 = 64000 bytes, about
the size of one segment. Think of the screen as an array of colors.
The first row takes up addresses A000:0000 to A000:013F (decimal 319),
the second row takes up addresses A000:0140 to A000:027F (decimal 639),
and so on. To plot a pixel, assuming ES=A000:
;Plot a pixel in video mode 13h, where
;PixelAddress = (320 * Y) + X
mov ax, 320 ; Prepare for the multiplication
mul [Y] ; Assuming that Y is defined in the data segment
; earlier in the program
mov di, ax ; Put in into the pointer to the offset of ES
add di, [X] ; Assuming that X is defined in the data segment
; earlier in the program
mov al, [Color] ; Assuming that Color is defined in the data
; segment earlier in the program
stosb ; Write it to the screen!
See how easy that was? Something to remember is that it is zero-based.
The upper-left corner is (0,0), and the lower-right is (319,199). A
complete TASM Ideal mode procedure might look something like this (it
assumes that the video card is already set to mode 13h):
PROC WritePixel BASIC ; Or whatever language you might want to link
; it to
USES es, di ; It's always a good idea to preserve ES and DI
ARG X:word, Y:word, Color:BYTE
mov di, 0a000h ; Put the video segment into DI
mov es, di ; so it can easily be put into ES
mov ax, 320 ; Prepare for the multiplication
mul [Y] ; Offset pointer by the Y value passed in
mov di, ax ; Put in into pointer to the offset of ES
add di, [X] ; Offset the pointer by the X value passed in
mov al, [Color] ; Put color to be written to the screen in AL
stosb ; Write it to the screen!
ret
ENDP WritePixel
To write a horizontal line, just put the length in CX, and replace the
STOSB with a REP STOSB. Writing a vertical line is only a little
trickier. Observe the following TASM Ideal mode procedure:
PROC VerticalLine BASIC ; Or whatever language you might want to link
; it to
USES es, di ; It's always a good idea to preserve ES and
; DI
ARG X:word, Y:word, Color:BYTE, Length:word
mov di, 0a000h ; Put the video segment into DI
mov es, di ; so it can easily be put into ES
mov ax, 320 ; Prepare for the multiplication
mul [Y] ; Offset the pointer by the Y value passed in
mov di, ax ; Put in into the pointer to the offset of ES
add di, [X] ; Offset the pointer by the X value passed in
mov al, [Color] ; Put the color to be written to the screen
; in AL
mov cx, [Length] ; Prepare for the loop
YLoop:
stosb ; Write it to the screen!
add di, 319 ; Move down one row (DI has already advanced
; once because of the STOSB, thus the 319)
loop YLoop
ret
ENDP VerticleLine
Observe how there is a tight loop that moves DI down one row each
iteration.
In short, the easiest way to write directly to the Mode 13h video buffer
is to think of the screen as just a 320 by 200 array of bytes, starting
at A000:0000.
Author: Michael Averbuch (mikeaver@prairienet.org)
Last changed: 03 Mar 2004
Return to the Table Of Contents
------------------------------
Subject: 13. Protected Mode Programming
13.1 PMODE Tutorials, FAQ, and other reference documentation
Protected Mode Basics by Robert Collins
http://www.rcollins.org/articles/pmbasics/tspec_a1_doc.html
Excellent starting tutorial with source code.
PMODE FAQ
ftp://ftp.simtel.net/pub/simtelnet/msdos/asmutl/pmtut002.zip
Protected Mode Book List
http://www.interactive.net/~viren/Janz/Books/pmode_books.htm [Broken]
Christopher Giese's PMODE Tutorial
http://files.osdev.org/mirrors/geezer/os/pm.htm
HTML format
pmode-l FAQs
http://www.lysator.liu.se/~redhog [Broken]
http://phantom.urbis.net.il/bphantom/pmode-l_FAQ.html [Broken]
13.2 Source code Archives
Walnut Creek PMODE Archives
ftp://ftp.cdrom.com/pub/demos/code/hardware/pmode/ [Broken]
X2FTP.OULU.FI
ftp://x2ftp.oulu.fi/pub/msdos/programming/pmode/00index.html [Broken]
Protected mode utilities and some source code
13.3 PMODE Websites
Peter's PMODE Home Page
http://www.geocities.com/SiliconValley/Peaks/1231/ [Broken]
PMODE tutorials and programming related files
Niko Komin's Assembler for PCs page
http://home.snafu.de/nkomin/html/assembe.htm
Shareware, pmode, x86 mnemonics, ASM related links.
http://www.alaska.net/~zumwalt [Broken]
Archives, Source Code, Technical Documentation, OS Chat Room
and much more
PASS-32, Dieter's Assembler
http://freenet-homepage.de/dieterp/
Debugger and DOS extender also available
Dario Alpern's programs
http://members.tripod.com/~alpertron/ENGLISH2.HTM
PMODE examples
Christopher Giese's Triple Fault Club
http://files.osdev.org/mirrors/geezer/os/index.htm
NASM and DJGPP Code, Protected Mode Code, OS Code
13.4 PMODE Mailing Lists
Protected Mode Mailing list:
To subscribe:
Send: mailto:pmode-l-request@fys.ruu.nl
subject: none
body: subscribe pmode-l email@yourisp.name (Note that is pmode-l
(ell) not pmode-1 (one)
Use pmode-l@fys.ruu.nl to send email to others in the list.
To unsubscribe:
Send: mailto:pmode-l-request@fys.ruu.nl
subject: none
body: unsubscribe pmode-l email@yourisp.name
Contributor: Raymond Moon, raymoon@moonware.dgsys.com
Last changed: 24 Jan 2010
Return to the Table Of Contents
------------------------------
Subject: 14. Shareware ASM Libraries
14.1 ASMLIB PROGRAMMER'S TOOLKIT, VERSION 4.0
Douglas Herr's shareware assembly language library. This library is
available from SimTel.
ftp://ftp.simtel.net/pub/simtelnet/msdos/asmutl/asmlib40.zip
The zip file contains only the medium model of the library. There are
405 assembly subroutines in a .lib file and documentation. Source code
is available with registration and extra fee. The library covers the
following areas:
string/integer data manipulation screen mode subroutines
text-mode multi-window subroutines disk & file subroutines
text-mode video subroutines EMS and XMS subroutines
floating-point subroutines graphics
keyboard input subroutines mathematical solutions
subroutines which determine PC status
asmlib40 also comes with an editor, E16, written entirely with asmlib.
Improvements since version 3.7 is auto-sizing of the near heap in the
startup code. There have been some incremental improvements including
32k-color graphics and virtual graphics screens.
14.2 THE ASSEMBLY WIZARD'S LIBRARY, VERSION 2.1
This is Chris Walker's shareware assembly language library. This
library used to be Thomas Hanlin's.
ftp://ftp.simtel.net/pub/simtelnet/msdos/asmutl/asmwiz21.zip
This library comes with documentation and one .lib file that supports
small and tiny memory models. Source code is available with
registration. The library covers the following areas:
Base Conversions Mouse Services
Exception Handling Sound and Music
Delays and Countdowns String Services
File Handling Telecommunications
Filename Manipulation Time and Date
Keyboard Services Video Services
Long Integer Math Miscellaneous Services
Memory Services
14.3 UCR Standard Library for Assembly Language Programmers
This library is written by Randall Hyde and others. This library is
available from many sites but most of them are seriously out of date.
You can get the latest version at:
http://homepage.mac.com/randyhyde/webster.cs.ucr.edu/HighLevelAsm/HLADoc/HLAStdlib_info.html
Unlike the previous libraries, there are no registration fees and the
included source code is released to the public domain. The author does
request that if you use the library, you contribute at least one routine
to the library.
Standard Input Routines Character Set Routines
Standard Output Routines Memory Management Routines
Conversion Routines String Handling Routines
Utility Routines
14.4 ALIB Version 4.0
ALIB is Jeff Ownens' shareware assembly language library. This library
is available from SimTel.
ftp://ftp.simtel.net/pub/simtelnet/msdos/asmutl/alib40.zip
Similar to the UCR library described above, registration fees are not
requested. The library consists of over 400 assembly source files
covering the following areas:
compress - data compression and expansion
config - program configuration, colors, paths, etc.
compare - compare strings
convert - hex/decimal/ascii conversions
database - simple database functions
disk - disk information, path changes, file searches
display - fast display functions, write to display memory
error - error handlers
float - simple floating point math package
math - dword math, crc, roots
memory - memory manager, extended, xms, ems, conventional
menu - menuing system
message - messages in windows on screen
misc - misc routines
mouse/key - mouse and keyboard functions
parse - extraction of parameters from command line
random - random number generators
search - search for character or string
sort - sort buffer or file
sound - sounds
string - ascii string handling
stdout - characters, strings, spaces to stdout
system - system interrogation and setup
time - time and date conversions
Also included are 15 sample programs.
14.5 FREELIB, Version 3.0
Freelib v3.0 is a library of 200 routines that may be useful for
assembly language programming. Freelib includes routines that do many
of the tasks that make assembly language difficult - like buffered file
I/O, formatted string output, memory allocation, etc. Also includes
16.16bit fixed point arithmetic, text screen output (EGA 80x25 or VGA
90x34), and VGA graphics in both 16 and 256 colors. All routines are
highly optimized for size and speed, and average only 60 bytes each.
Full source code and documentation is included for all routines.
Freelib is public domain software, free for non-commercial use. The
library is available from SimTel:
ftp://ftp.simtel.net/pub/simtelnet/msdos/asmutl/freeli30.zip
Contributor: Raymond Moon, raymoon@moonware.dgsys.com
Last changed: 23 Nov 98
Return to the Table Of Contents
|
|
0
|
|
|
|
Reply
|
Nathan
|
12/15/2010 4:29:18 AM |
|
On Dec 14, 11:29=A0pm, "Nathan Baker"
<nathancba...@nospicedham.gmail.com> wrote:
> Archive-Name: assembly-language/x86/general/part1
>
> =A0 =A0 ------------------------------
> Subject: 2. Table of Contents
> Part I
>
> 1. =A0Introduction and Intent
> 2. =A0Table of Contents
> 3. =A0Charters For comp.lang.asm.x86 and alt.lang.asm Newsgroups
> 4. =A0What is Assembly Language
> 5. =A0List of x86 OpCodes
> 6. =A0What is HELPPC and Where It Is Available
> 7. =A0How To Truncate a File
> 8. =A0How Can STDERR Be Redirected To a File
> 9. =A0How To Determine the CPU Type
> 10. IRQ Assignments
> 11. Ralf Brown's Interrupt List
> 12. Using VGA Mode 13h for Fast Graphics
> 13. Protected Mode Programming
> 14. Shareware ASM Libraries
>
Hmm... 'Part I' has plenty of 16-bit coverage. How 'bout a section
for 64-bit resources?
> Part II
>
> 15. Accessing 4 Gegs of Memory in Real Mode
> 16. What Is Available at developer.intel.com
What is available at AMD.com??
> 17. Interrupts and Exceptions
> 18. ASM Books Available
Add newer books...
> 19. ASM Code Available on Internet
No mention of SourceForge repos??
> 20. How To Commit a File
> 21. Using Extended Memory Manager
> 22. EXE2BIN Replacement
> 23. ASM Tutorials Available on the Internet
> 24. Shareware/Freeware Assemblers
> 25. Undocumented OpCodes
>
> Part III
>
> 26. WWW Assembly HomePages
> 27. Common Reason Why Memory Allocation Fails
> 28. Volume Serial Numbers
> 29. File Formats Assosiated with ASM
> 30. Rebooting from Software
> 31. Other FAQs
> 32. Pseudo Random Number Generator in Assembly Language
Perhaps add a port of George Marsaglia's RNG??
> 33. Command Line Arguments
> 34. Free 32-bit and DJGPP
> 35. TERSE Programming Language
> 36. Assembly Language IDEs
http://sites.google.com/site/highlevelassembly/downloads/hide
http://betov.free.fr/
> 37. Disassemblers
> 38. How to Optimize for the Pentium
> 39. Assembly Language Programming Style Guidelines
> 40. Other Assembly-Related Newsgroups
> 41. ZD-86 Debugger
http://www.ollydbg.de/
> 42. Links to x86 Processor Manufacturers
> 43. Linkers Available
> 44. ASM Mailing Lists
> 45. ASM Programming Journal
New address is:
http://www.codebreakers-journal.com/index.php?option=3Dcom_magazine&func=3D=
show_magazine&id=3D3&Itemid=3D27
> 46. Acknowledgments
> 47. PC Operating Systems in Assembly
Links to OSDev & a.o.d Wikis??
>
> 99. Acknowledgments
>
|
|
0
|
|
|
|
Reply
|
Nathan
|
12/15/2010 8:39:55 AM
|
|
Nathan Baker wrote:
> - Please do not ask a question via the subject line.
Oh really! I wouldn't have guessed that. I think I mostly would have
posted like that. Really? No questions?
> - If you are completely changing the subject in the body, please
> note in the subject line: re: new subject [was: old subject]"
Oh, I bet that one gets strictly followed! ;) I wish it would though, as
it is a good idea (or better yet, start a new thread).
> - Please do not request that someone do your home work or other work
> for you. However, you may ask for help with the particular
> problem you are having.
I have this mole on my back. Is it cancerous?
> When asking for help, always describe
> what you have already tried yourself and/or what part of the
> original problem you don't understand and need help with.
Well, I drink green tea everyday. I don't understand why, if there is a
god, that there is cancer and not world peace. Is there a god?
> - Please do not post binaries.
Someone better tell that Asian TS that.
> There are other ways to have people
> see your binary. A simple URL in the body of your message is
> more appropriate than an attachment.
Eh em, her "body" is her message? (Her message is her body?). His?
> - Please keep your signature to about 5 lines including blank lines.
> Five does not include the '-- ' line.
Or better yet: dispense with that old habit.
Are NNTP's days numbered?
>
> 4.3 WHEN TO USE ASSEMBLY LANGUAGE
>
> I personally think that except as a learning exercise it is a waste of
> time writing something in ASM that can be written acceptably fast in a
> high-level language.
FWIW, I don't view assembly as an application (even part of one)
programming language.
>
> Assembly language fits for the following:
>
> * Low level control. When you need to change the flags, or the
> control registers of the processor, as when entering protected
> mode.
>
> * Speed. Programs written in machine language execute fast! It can
> execute 10-100 times the speed of BASIC, and about twice as fast as
> a program written in C or Pascal.
>
> * Time Critical Code. Critical sections of programs written in
> higher level languages can be written in assembly to speed up
> sections.
>
> * Small program size. When you write a TSR for example this is very
> useful. Writing interrupt handlers is where assembly language
> shines.
Consider adding:
"* As the code generated by a compiler for another language."
> ------------------------------
> Subject: 6. What Is HELPPC and Where Is It Available
> HELPPC is a Quick Reference Utility for the intermediate to advanced
> programmer. It is a shareware program written by David Jurgens. The
> latest version is 2.10
Copyright NINETEEN-NINETY-NINE! As such, consider doing something with
the FAQ that "moves current info toward the top". Perhaps HELPPC should
be in a "Historical Links" section? I mean I like searching through "the
stacks" (reference to university library archives) for foundational and
historical information, and the links should be available, but I don't
think they should be this early in the FAQ (probably last). Also, I think
much less space should be given to... Wait, How many people have actually
asked lately "What is HELPPC?"?
Consider:
"Subject X: Historical Resources" of which HELPPPC would be one entry
with a link and a SHORT description.
(I keep forgetting this is a FAQ and not a foundational "primer".
Assembly language needs a wiki, but I'd prefer an x86 one. Just thinking
out loud as I go through this FAQ.)
> Return to the Table Of Contents
An HTML remnant or the FAQ yet to be in HTML?
> ------------------------------
> Subject: 7. How To Truncate A File
Surely you jest! Subject 7 of the general assembly language FAQ and we're
already doing high-level programming? Suggestion: Reorganize the FAQ or
rebirth it (maybe in another form: web, wiki, etc.).
Why is #5 about opcodes and #25 about opcodes? What is the purpose of
maintaining the list rather than categories? Start from scratch with the
info that is there and remake the FAQ, generously snipping and
abbreviating passages that are begging for it.
Again, just thinking out loud and what I would do and how I would go
about it. (Of course the first questions I would ask are like: "Is a text
FAQ necessary? In how much detail? Who is this for and what are their
needs?"
> Subject: 8. How Can STDERR Be Redirected To A File
The FAQ can't be categorized?
Category: Doing High-Level Things With Assembly Language
Entry 1: Truncating a File
Entry 2: Redirecting STDERR // (Assembly has a stderr huh. I wouldn't
know!)
Not a 2-level FAQ, but a TREE. Flat FAQs suck. Is the definition of "FAQ"
include "flat" in it?
Part I, II, III but they are just a random ordering of topics?
It's looking like, at this point, the FAQ is a real maintenance chore
because of it's organization. Why bother with maintaining a text FAQ?
Create a webpage and write a program to generate the text file from the
web page (or the other way around works also of course). (Oh, sorry, I
forgot, you all only know assembly ;) ).
Did I say "tree"? The assumption was that what the FAQ exists as now is
what is still required. Are NNTP's days numbered? (Rhetorical).
> Subject: 11. Ralf Brown's Interrupt List
There really is no need to have such product-specific descriptions of
these things. A small "elevator description" (as in, you have to be able
to sell yourself/product to a potential client before he gets off the
elevator at his floor) will suffice. The link is there for those who need
more info. For those who need it in text, put it in a separate file
alphabetically or something and have the "advertisers" maintain their own
"ad".
> Subject: 12. Using VGA Mode 13h for Fast Graphics
Category: Interfacing and Controlling Hardware (with assembly can be
assumed)
Subcategory: Legacy hardware.
> 12.1 INTRODUCTION AND PREPARATION
>
Assembly FAQ Part X: How-to ...
Assembly FAQ Part Y: Resources // Should be part of Part A: The 10000 ft
View
Assembly FAQ Part Z: ...
> 12.2 WRITING PIXELS TO THE SCREEN
Lots and lots of stuff that isn't relevant as it was before GUI OS days.
The info shouldn't go away, it just shouldn't be as prominent IMO. It
should be "in the stacks" (university library reference again).
>
> Why is Mode 13h so popular?
I can answer this one! It's not anymore!
> Subject: 13. Protected Mode Programming
Well moving up the timeline now. But still should be in a proper
category. (Remember, I am just thinking out loud as I read and take-in
what is in these FAQs and I don't know what the requirements for these
FAQs are.)
> 13.4 PMODE Mailing Lists
Would you believe that I have never participated in mailing lists? It's
true. How (un)popular are they still today?
(Of course knowing of the multitude of other possible ways to get
information and communicate, my mind keeps saying "isn't this text FAQ
thing so senseless?").
> Douglas Herr's shareware assembly language library. This library is
> available from SimTel.
I still have my SimTel and similar CDs on my bookshelves (not in the
basement! But if they were books they'd be there). While I know there is
some valuable things in there, I don't think I'll ever have time to
consult that avenue again. FWIW, just thinking out loud (can time just
give it <bleep>'n rest already and S-L-O-W the <bleep> down?!) remember.
I think my ACM library is more valueable to me (though not sure if I'll
ever look at those again either).
> 14.2 THE ASSEMBLY WIZARD'S LIBRARY, VERSION 2.1
All these references need dates: Created, last updated.
As well as a relevance qualification of somekind (harder, and maybe Phase
II or never).
>
> This is Chris Walker's shareware assembly language library.
I've hunted for a library to help me implement my compiler but haven't
found anything. Maybe what I need is scattered all over many libraries
like this one, I don't know. Certainly that makes it a chore at best or
useless at worse, especially with assembly, because there are not any
assembly programming standards (which of course is why I like assembly
but having to work with so many styles is a deal-breaker).
There used to be a commercial library called "Assembly Language Toolkit",
and I've looked for it but came up with nothing. This was around 1990 so
it probably just became too useless. It would be nice to have such a
product these days as I think assembly could become more relevant (I
mean, I'm here right? ;)).
>This
> library used to be Thomas Hanlin's.
>
> ftp://ftp.simtel.net/pub/simtelnet/msdos/asmutl/asmwiz21.zip
>
> This library comes with documentation and one .lib file that supports
> small and tiny memory models. Source code is available with
> registration. The library covers the following areas:
>
> Base Conversions Mouse Services
> Exception Handling Sound and Music
> Delays and Countdowns String Services
> File Handling Telecommunications
> Filename Manipulation Time and Date
> Keyboard Services Video Services
> Long Integer Math Miscellaneous Services
> Memory Services
OK, application programming toolkit in assembly. I think that will never
be relevant again. Change the purpose of the toolkit, and it may be a
saleable product.
>
> 14.3 UCR Standard Library for Assembly Language Programmers
>
> This library is written by Randall Hyde and others. This library is
> available from many sites but most of them are seriously out of date.
> You can get the latest version at:
Isn't that written in HLA? I don't consider HLA to be assembly, but
rather another HLL. Oh MACRO assembler... where is the dividing line? I
think HLA is in the HLL category. I have learned a lot from Randall's
books and website. The "Write ... Code" series is GREAT! Some of my
favorite tech books. Thanks Randall!
>
> 14.4 ALIB Version 4.0
>
> ALIB is Jeff Ownens' shareware assembly language library. This
> library
Looks like I'll be investigating some libraries! I have a feeling it's
going to be like revisiting my CUG disks.
> is available from SimTel.
Surely.
>
> ftp://ftp.simtel.net/pub/simtelnet/msdos/asmutl/alib40.zip
>
> Similar to the UCR library described above, registration fees are not
> requested. The library consists of over 400 assembly source files
> covering the following areas:
>
> compress - data compression and expansion
> config - program configuration, colors, paths, etc.
> compare - compare strings
> convert - hex/decimal/ascii conversions
> database - simple database functions
> disk - disk information, path changes, file searches
> display - fast display functions, write to display memory
> error - error handlers
> float - simple floating point math package
> math - dword math, crc, roots
> memory - memory manager, extended, xms, ems, conventional
> menu - menuing system
> message - messages in windows on screen
> misc - misc routines
> mouse/key - mouse and keyboard functions
> parse - extraction of parameters from command line
> random - random number generators
> search - search for character or string
> sort - sort buffer or file
> sound - sounds
> string - ascii string handling
> stdout - characters, strings, spaces to stdout
> system - system interrogation and setup
> time - time and date conversions
Library: good. Selection of functionality: dated.
>
> Also included are 15 sample programs.
>
> 14.5 FREELIB, Version 3.0
>
> Freelib v3.0 is a library of 200 routines that may be useful for
> assembly language programming. Freelib includes routines that do many
> of the tasks that make assembly language difficult - like buffered
> file
> I/O, formatted string output, memory allocation, etc. Also includes
> 16.16bit fixed point arithmetic, text screen output (EGA 80x25 or VGA
> 90x34), and VGA graphics in both 16 and 256 colors. All routines are
> highly optimized for size and speed, and average only 60 bytes each.
> Full source code and documentation is included for all routines.
> Freelib is public domain software, free for non-commercial use. The
> library is available from SimTel:
Lots of same kind of resources. Need there own (sub)category.
**************
Hey hey! I made it to the end of Part I!
|
|
0
|
|
|
|
Reply
|
Tony
|
12/16/2010 7:51:18 AM
|
|
Nathan Baker wrote:
> 3.1 COMP.LANG.ASM.X86 (CLAX)
>
"The friendly and knowledgeable moderators are... and can be contacted at
....."
"Regular participants who wished to be included in this list are: "
"Joe Smith joeace@spam_me_puh_leez.net"
"Joe Smith harkens from far North Saskatchewan where he grows Petit
Verdot grapes (which would be quite a feat for anyone else way up there,
but not for Joe!) when he is not fiddling with his bits on an AST Premium
386/C PC (with 30 MB _SCSI_ hard drive (only the best will do for Joe!))
running MS-DOS 5.0a using assembly language via the assembler he built
from scratch using spare airplane parts which he obtained by shooting
enemy aircraft out of the sky with the Messerschmitt machinegun mounted
on his carbon-fiber-fuselaged-and-winged triplane. He is the resident
expert on (yes, besides everything) nuclear powerplant construction
(using x86 assembly language, duh!) and is the author of numerous books
including the very popular, and now in its 3rd edition, "How To Build
Your Own Nuclear-Powered Carbon-Fiber-Fuselaged -and-Winged War-Ready
Triplane with Forward Mounted Messerscmitt Using Things You Can Get For
Free Anywhere for Dummies". His pet lama's name is LOOPNE, but mostly he
just calls him Slowpoke. Joe's favorite x86 instruction is 'ja', with
'js' being a close second place."
"Kourtney Jester KJB@iamnotaspy.net"
"What can we say about Kourtney (without spending the rest of our days in
Siberia!)..."
|
|
0
|
|
|
|
Reply
|
Tony
|
12/16/2010 11:27:14 AM
|
|
"Tony" <nospam@nospicedham.myisp.net> wrote in message
news:dyjOo.9724$lL1.4644@newsfe21.iad...
>
> Are NNTP's days numbered?
>
Oh, NNTP is DEAD! DEAD I SAY, except maybe c.l.c... The major US ISP's
have all dropped free access. There aren't too many free servers which
carry the major Usenet groups that you can read from anymore. And, all but
a couple of the open postable servers which carry the major Usenet groups
are gone. I'm posting from one. Most of whats left for free are NNTP
newservers which don't carry the major Usenet groups. Or, you can use
Google Groups, or pay for commercial access to get the major Usenet groups.
I've suggested another use for NNTP. It wasn't taken well even in a small
crowd. The were concerned about more "spam" to their newsgroups. But, it
wouldn't need to spam major groups. There are many, many, many more NNTP
servers that don't carry the major groups than those that do, and there are
millions that don't distribute messages at all. They just sit there with
groups no one uses that and don't distribute. All of those other mostly
unused servers can all be used for what I propose:
The bandwidth, distribution, servers, and etc. infrastructure of NNTP could
be used for sending and receiving encrypted email... NNTP message format is
already close to the SMTP format. You could post a message on a server and
the other party could read it later on the same server, or the other party
could wait until it's distributed if that group is distributed, and then
read it from a local server. From the NNTP side, you'd need an open server,
a newsgroup that's not used, read access, post access and optionally a
distributed group. These types of servers with junk groups are all over the
place, since they don't carry the major Usenet groups and usually don't
distribute posts.
On the encryption side and identity confirmation side, there is lots to be
worked out, but I believe it's doable with public key encryption. AIUI, the
initial identity confirmation is an issue with PKE.
Rod Pemberton
|
|
0
|
|
|
|
Reply
|
Rod
|
12/16/2010 9:07:30 PM
|
|
On Dec 16, 2:51=A0am, "Tony" <nos...@nospicedham.myisp.net> wrote:
>
> FWIW, I don't view assembly as an application (even part of one)
> programming language.
>
But it often is used that way.
>
> Copyright NINETEEN-NINETY-NINE! As such, consider doing something with
> the FAQ that "moves current info toward the top". Perhaps HELPPC should
> be in a "Historical Links" section? I mean I like searching through "the
> stacks" (reference to university library archives) for foundational and
> historical information, and the links should be available, but I don't
> think they should be this early in the FAQ (probably last). Also, I think
> much less space should be given to... Wait, How many people have actually
> asked lately "What is HELPPC?"?
>
These "historical" resources are still valid, useful places to start.
>
> (I keep forgetting this is a FAQ and not a foundational "primer".
> Assembly language needs a wiki, but I'd prefer an x86 one. Just thinking
> out loud as I go through this FAQ.)
>
I *am* leaning toward a smaller "Welcome" style mini-FAQ of sorts...
> > Return to the Table Of Contents
>
> An HTML remnant or the FAQ yet to be in HTML?
>
An HTML remnant.
>
> > Subject: 12. Using VGA Mode 13h for Fast Graphics
>
> Category: Interfacing and Controlling Hardware (with assembly can be
> assumed)
> Subcategory: Legacy hardware.
>
This is still available on modern hardware (or via emulation) and
still a relatively easy introduction to doing graphics from ASM.
> > 14.3 =A0UCR Standard Library for Assembly Language Programmers
>
> > This library is written by Randall Hyde and others. =A0This library is
> > available from many sites but most of them are seriously out of date.
> > You can get the latest version at:
>
> Isn't that written in HLA? I don't consider HLA to be assembly, but
> rather another HLL. Oh MACRO assembler... where is the dividing line? I
> think HLA is in the HLL category. I have learned a lot from Randall's
> books and website. The "Write ... Code" series is GREAT! Some of my
> favorite tech books. Thanks Randall!
>
No. UCR StdLib is written in MASM, IIRC.
>
> Hey hey! I made it to the end of Part I!
Congrats!
Nathan.
|
|
0
|
|
|
|
Reply
|
Nathan
|
12/16/2010 10:31:41 PM
|
|
"Rod Pemberton" <do_not_have@nospicedham.notreplytome.cmm> wrote in message
news:ieduu2$n7n$1@speranza.aioe.org...
> "Tony" <nospam@nospicedham.myisp.net> wrote in message
> news:dyjOo.9724$lL1.4644@newsfe21.iad...
>>
>> Are NNTP's days numbered?
>>
>
> Oh, NNTP is DEAD!
>
I disagree. The continued existence of the 'alt.binaries.*' branch being
used as an "under the radar" P2P network is a solid guarantee that NNTP will
be quite popular for quite some time. Plenty of commercial services and
products are banking on it. Google "NZB" if you don't believe me.
Nathan.
|
|
0
|
|
|
|
Reply
|
Nathan
|
12/17/2010 4:19:57 AM
|
|
Nathan wrote:
> On Dec 16, 2:51 am, "Tony" <nos...@nospicedham.myisp.net> wrote:
>>
>> FWIW, I don't view assembly as an application (even part of one)
>> programming language.
>>
>
> But it often is used that way.
I wonder how much in actuality though. I know the ones who create the
environments and libraries to do such, do complete program development in
assembly and then promote doing that, but I think it probably doesn't go
too much farther beyond that today. I'm guessing. What I mean, is in
environments where there are HLLs to do that instead and where doing it
in assembly would be just some kind of exercise. You say "often" though.
Hmm.
>
>>
>> Copyright NINETEEN-NINETY-NINE! As such, consider doing something
>> with the FAQ that "moves current info toward the top". Perhaps
>> HELPPC should be in a "Historical Links" section? I mean I like
>> searching through "the stacks" (reference to university library
>> archives) for foundational and historical information, and the links
>> should be available, but I don't think they should be this early in
>> the FAQ (probably last). Also, I think much less space should be
>> given to... Wait, How many people have actually asked lately "What
>> is HELPPC?"?
>>
>
> These "historical" resources are still valid, useful places to start.
I agree they are still useful. To what degree varies. I disagree that
they are good starting places (as an introduction to assembly language).
Anyone learning assembly today should start with the current evolution of
the language and go back when necessary for those tidbits that may have
"gotten lost" or have remained the same.
I am going to study this book eventually (next year):
http://www.amazon.com/Assembly-Language-x86-Processors-6th/dp/013602212X/ref=pd_sim_b_26
and currently have (from the library):
http://www.amazon.com/Introduction-Assembly-Language-Computer-Architecture/dp/0763772232/ref=pd_sim_b_13
The web has been my source so far on how to actually do stuff with
assembly and I am currently developing and learning concurrently like
that. I just want to get it working for now and later improve it as I
learn more details and more/better techniques.
>
>>
>> (I keep forgetting this is a FAQ and not a foundational "primer".
>> Assembly language needs a wiki, but I'd prefer an x86 one. Just
>> thinking out loud as I go through this FAQ.)
>>
>
> I *am* leaning toward a smaller "Welcome" style mini-FAQ of sorts...
Sounds good. You may want to consider 2 audiences: the newbie (like me)
and the advanced user and compose the FAQ accordingly.
I do think the historic stuff should be somehow more identifiable or put
in a separate section or something, even if it does "still work" or is
"still relevant". I think early on it was appropriate to order and
categorize by functionality, such as "graphics manipulation", e.g., but
something more chronological may make more sense given the changes in
usage over the years, or at least different categorization: inline
assembly (maybe just a short section of the differences between doing
that and stand alone assembly), compiler code generation, ... . (Yes, I
picked my current interests for the example categories).
Perhaps the specialty of "compiler code gen" doesn't belong at all, nor
"graphics dev in assembly", for they have their own portals. It depends
on what the topicality of the group is (I'm new, so I don't know yet and
also, I'm not sure how well the FAQ reflects the personality of the NG or
how poorly).
>>> Subject: 12. Using VGA Mode 13h for Fast Graphics
>>
>> Category: Interfacing and Controlling Hardware (with assembly can be
>> assumed)
>> Subcategory: Legacy hardware.
>>
>
> This is still available on modern hardware (or via emulation) and
> still a relatively easy introduction to doing graphics from ASM.
That sounds like a great perspective from which to present it!
|
|
0
|
|
|
|
Reply
|
Tony
|
12/18/2010 1:10:09 AM
|
|
On Dec 17, 8:10=A0pm, "Tony" <nos...@nospicedham.myisp.net> wrote:
> Nathan wrote:
> > On Dec 16, 2:51 am, "Tony" <nos...@nospicedham.myisp.net> wrote:
>
> >> FWIW, I don't view assembly as an application (even part of one)
> >> programming language.
>
> > But it often is used that way.
>
> I wonder how much in actuality though. I know the ones who create the
> environments and libraries to do such, do complete program development in
> assembly and then promote doing that, but I think it probably doesn't go
> too much farther beyond that today. I'm guessing. What I mean, is in
> environments where there are HLLs to do that instead and where doing it
> in assembly would be just some kind of exercise. You say "often" though.
> Hmm.
>
"often" doesn't mean "usually" I just mean that those who prefer ASM,
tend to use it when they build the great works that they have a
passion to build. For instance:
http://betov.free.fr/
http://www.oby.ro/rts/
>
>
> >> Copyright NINETEEN-NINETY-NINE! As such, consider doing something
> >> with the FAQ that "moves current info toward the top". Perhaps
> >> HELPPC should be in a "Historical Links" section? I mean I like
> >> searching through "the stacks" (reference to university library
> >> archives) for foundational and historical information, and the links
> >> should be available, but I don't think they should be this early in
> >> the FAQ (probably last). Also, I think much less space should be
> >> given to... Wait, How many people have actually asked lately "What
> >> is HELPPC?"?
>
> > These "historical" resources are still valid, useful places to start.
>
> I agree they are still useful. To what degree varies. I disagree that
> they are good starting places (as an introduction to assembly language).
> Anyone learning assembly today should start with the current evolution of
> the language and go back when necessary for those tidbits that may have
> "gotten lost" or have remained the same.
>
Try telling that to all the university instructors who still teach
Introductory ASM using the DOS-based Borland assembler.
> I am going to study this book eventually (next year):
>
> http://www.amazon.com/Assembly-Language-x86-Processors-6th/dp/0136022...
>
> and currently have (from the library):
>
> http://www.amazon.com/Introduction-Assembly-Language-Computer-Archite...
>
> The web has been my source so far on how to actually do stuff with
> assembly and I am currently developing and learning concurrently like
> that. I just want to get it working for now and later improve it as I
> learn more details and more/better techniques.
>
>
>
> >> (I keep forgetting this is a FAQ and not a foundational "primer".
> >> Assembly language needs a wiki, but I'd prefer an x86 one. Just
> >> thinking out loud as I go through this FAQ.)
>
> > I *am* leaning toward a smaller "Welcome" style mini-FAQ of sorts...
>
> Sounds good. You may want to consider 2 audiences: the newbie (like me)
> and the advanced user and compose the FAQ accordingly.
>
> I do think the historic stuff should be somehow more identifiable or put
> in a separate section or something, even if it does "still work" or is
> "still relevant". I think early on it was appropriate to order and
> categorize by functionality, such as "graphics manipulation", e.g., but
> something more chronological may make more sense given the changes in
> usage over the years, or at least different categorization: inline
> assembly (maybe just a short section of the differences between doing
> that and stand alone assembly), compiler code generation, ... . (Yes, I
> picked my current interests for the example categories).
>
> Perhaps the specialty of "compiler code gen" doesn't belong at all, nor
> "graphics dev in assembly", for they have their own portals. It depends
> on what the topicality of the group is (I'm new, so I don't know yet and
> also, I'm not sure how well the FAQ reflects the personality of the NG or
> how poorly).
>
All of the above are good points.. and definitely something to digest
and mull over.
> >>> Subject: 12. Using VGA Mode 13h for Fast Graphics
>
> >> Category: Interfacing and Controlling Hardware (with assembly can be
> >> assumed)
> >> Subcategory: Legacy hardware.
>
> > This is still available on modern hardware (or via emulation) and
> > still a relatively easy introduction to doing graphics from ASM.
>
> That sounds like a great perspective from which to present it!
Well, the thing is, doing 'modern-style' graphics (within Windows GUI,
for instance) [or 'modern-style' sound, video-capture, networking,
etc.] is done in ASM basically the same way it the C folks do it. So
ASM folks simply study the C code examples and resources for knowledge
of how to do it. And it is all OS-specific API details -- there is
nothing really language-specific worth talking about. Those issues
would belong in an OS API FAQ. So this Mode 13h is the only graphics-
related thing that ASM can kind-of lay a claim to. That is why it is
in the FAQ.
Nathan.
|
|
0
|
|
|
|
Reply
|
Nathan
|
12/18/2010 5:28:33 AM
|
|
On Dec 17, 8:10=A0pm, "Tony" <nos...@nospicedham.myisp.net> wrote:
>
> Perhaps the specialty of "compiler code gen" doesn't belong at all, nor
> "graphics dev in assembly", for they have their own portals. It depends
> on what the topicality of the group is (I'm new, so I don't know yet and
> also, I'm not sure how well the FAQ reflects the personality of the NG or
> how poorly).
>
Those two areas *can* belong here. Perhaps, for a better taste of the
'flavor' of this NG, one should read the following two threads:
http://groups.google.com/group/comp.lang.asm.x86/browse_frm/thread/54b319f3=
8cae4d9d/f7c27c8e1e36b797
http://groups.google.com/group/comp.lang.asm.x86/browse_frm/thread/23f2ba5e=
d093e116/590a1a41fab44181
Those two should really be considered as amendments to the Policy FAQ.
Nathan.
|
|
0
|
|
|
|
Reply
|
Nathan
|
12/18/2010 7:39:26 AM
|
|
|
9 Replies
490 Views
(page loaded in 0.156 seconds)
Similiar Articles: FAQ -- assembly-language/x86/general/part1 - comp.lang.asm.x86 ...Archive-Name: assembly-language/x86/general/part1 Posting-Frequency: monthly (21st of every month) Last-modified: 2010/01/24 -----... "Moderated" List??? - comp.lang.asm.x86http://www.faqs.org/faqs/assembly-language/x86/general/part1/section-3.html > who are the so called "Moderators"? Moderated newsgroups require moderators, not so-called ... Hex code and mnemonic - comp.lang.asm.x86FAQ -- assembly-language/x86/general/part1 - comp.lang.asm.x86 ... ASM Code Available on Internet 20. How To Commit a ... nkomin/html/assembe.htm Shareware, pmode, x86 ... coprocessor error - comp.lang.asm.x86FAQ -- assembly-language/x86/general/part1 - comp.lang.asm.x86 ... The second detects and identifies, if present, the type of math coprocessor. ... display - fast display ... Is there a GUI Magazine anywhere? - comp.lang.java.guiFAQ -- assembly-language/x86/general/part1 - comp.lang.asm.x86 ... There is no guarantee of approval for a post in any ... codebreakers-journal.com/index.php?option=3Dcom ... Two 8086 Assembly Language Questions.. - comp.lang.asm.x86 ...FAQ -- assembly-language/x86/general/part1 - comp.lang.asm.x86 ... 4.2 ASSEMBLY LANGUAGE OR MACHINE LANGUAGE To word this simply, you can ... Two 8086 Assembly Language ... C All-In-One Desk Reference For Dummies.pdf - comp.lang.c ...FAQ -- assembly-language/x86/general/part1 - comp.lang.asm.x86 ... It is available in .pdf format from Intel's Web ... THE ASSEMBLY WIZARD'S LIBRARY, VERSION 2.1 All these ... Which Assembler? - comp.lang.asm.x86BTW, I did scan the FAQ but the latest version is almost >> four ... Archive-Name: assembly-language/x86/general/part1 Posting-Frequency: monthly (21st of every month ... Anyone Here Have A General Music WK4 Keyboard ? - comp.music.midi ...FAQ -- assembly-language/x86/general/part1 - comp.lang.asm.x86 ... Archive-Name: assembly-language/x86/general/part1 ... Services Exception Handling Sound and Music ... MASM to NASM conversion? - comp.lang.asm.x86FAQ -- assembly-language/x86/general/part1 - comp.lang.asm.x86 ... Archive-Name: assembly-language/x86/general ... MASM, TASM, and other commercial assemblers NASM, and ... x86 Assembly Language FAQ - General Part Ix86 Assembly Language FAQ - General Part I From: fys_at_cybertrails.com (Ben Lunt) Subject: x86 Assembly Language FAQ - General Part 1 of 3 Supersedes: <89sf4a$stn$6 ... FAQ -- assembly-language/x86/general/part1 - comp.lang.asm.x86 ...Archive-Name: assembly-language/x86/general/part1 Posting-Frequency: monthly (21st of every month) Last-modified: 2010/01/24 -----... 7/22/2012 4:18:55 AM
|