flat assembler
Message board for the users of flat assembler.

Index > Heap > Helpful pics... i'll start

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17279
Location: In your JS exploiting you and your system
revolution
bitRAKE wrote:
revolution wrote:
You need an extra pass for the fromGrayCode. Use 'repeat 6'
It falls thru for the last pass.
Oh yeah, you are right. I thought you were just posting some stuff copied from other code and left off the retn.

Perhaps you could consider including a comment between the two functions to say that the lack of retn is deliberate and that the fall through is required for it to work. Because it would be easy to simply copy/paste the first function to some other code and once pasted just assume one forgot to also select the retn and add it manually without checking.
Post 08 Feb 2010, 03:24
View user's profile Send private message Visit poster's website Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko
Guys, it's not a spam Smile

edit by revolution: Picture size shrunk. Sorry it was just too big. If you want the full size picture then download the attachment.


Description:
Filesize: 137.5 KB
Viewed: 5182 Time(s)

0xFF.PNG


Description:
Download
Filename: 0xFF.zip
Filesize: 13.91 KB
Downloaded: 127 Time(s)

Post 10 Feb 2010, 11:03
View user's profile Send private message Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko
Time a time procs come into...
A one may find them useful.
This one gets,sizes,delets,ignores memory under Windows.
Code:
;if [mem]=[bytes]=0{
;  return
;}
;if ([mem]<>0)&([bytes]<>0){
;  return size([mem],[bytes])
;}
;if [mem]=0{
;  return get([bytes])
;}
;if [bytes]=0{
;  free([mem])
;  return
;}
proc memory; mem,bytes
        xchg    edx,[esp+4]
        xchg    ecx,[esp+8]
        pushfd
        cld
        test    ecx,ecx
        jz      .free
        test    edx,edx
        jz      .get
.size:  invoke  GetProcessHeap                           ;GetProcessHeap:
        invoke  HeapReAlloc,eax,HEAP_ZERO_MEMORY,edx,ecx ;  mov     eax,[fs:$18]
        jmp     .exit                                    ;  mov     eax,[eax+$30]
.get:   invoke  GetProcessHeap                           ;  mov     eax,[eax+$18]
        invoke  HeapAlloc,eax,HEAP_ZERO_MEMORY,ecx       ;  ret
        jmp     .exit
.free:  test    edx,edx
        jz      .exit
        push    eax
        invoke  GetProcessHeap
        invoke  HeapFree,eax,ecx,edx
        pop     eax
.exit:  popfd
        mov     ecx,[esp+8]
        mov     edx,[esp+4]
        ret     8
endp
    
Post 17 Apr 2010, 06:03
View user's profile Send private message Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr
edemko,

Using cycle-heavy xchg r,m to save ecx/edx? Nice move! Wink

Four-screen wide picture isn't a spam, it's disrespect of community.
Post 17 Apr 2010, 17:10
View user's profile Send private message Reply with quote
pete



Joined: 20 Apr 2009
Posts: 110
pete
Just use the PNG format to reduce noise and file size!
Post 19 Apr 2010, 06:13
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17279
Location: In your JS exploiting you and your system
revolution
I shrunk the picture. It was just too big.
Post 19 Apr 2010, 06:39
View user's profile Send private message Visit poster's website Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr
pete wrote:
Just use the PNG format to reduce noise and file size!
Or write FASM program to generate that .PNG — probably it will be much smaller. Wink
Post 19 Apr 2010, 12:32
View user's profile Send private message Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko
Quote:

Or write FASM program to generate...

0xff.doc was filled with 000 for decimal and 00000000 for binary templates, merged a test.exe, patched through an incremental number generator of 000..255 & 00000000..11111111 and stored back.
Quote:

Four-screen wide picture isn't a spam, it's disrespect of community.

it's a poster, no disrispect in my mind
Quote:

Using cycle-heavy xchg r,m to save ecx/edx? Nice move!

i mostly do it to operate with registers only in hard cycles.
Quote:

I shrunk the picture. It was just too big.

nothing scared
Post 20 Apr 2010, 06:01
View user's profile Send private message Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko
The Jargon File:
http://manybooks.net/titles/raymondericetext02jarg422.html
Herebelow some snippets taken from v3 dated 1993. Me as a non-english speaking natively, found it useful from grammatical, lexical, logical, humorous structures and the coverage it takes:
Code:
1:
#========= THIS IS THE JARGON FILE, VERSION 3.0.0, 27 JUL 1993 =========#








46:
:Introduction:
**************

:About This File:
=================

This document is a collection of slang terms used by various subcultures
of computer hackers.  Though some technical material is included for
background and flavor, it is not a technical dictionary; what we
describe here is the language hackers use among themselves for fun,
social communication, and technical debate.








250:
The Jargon File (hereafter referred to as `jargon-1' or `the File') was
begun by Raphael Finkel at Stanford in 1975.








918:
     #ifdef FLAME
     Hasn't anyone told those idiots that you can't get
     decent bogon suppression with AFJ filters at today's
     net volumes?
     #endif /* FLAME */








1134:
:How to Use the Lexicon:
************************

:Pronunciation Guide:
=====================

Pronunciation keys are provided in the jargon listings for all entries
that are neither dictionary words pronounced as in standard English nor
obvious compounds thereof.  Slashes bracket phonetic pronunciations,
which are to be interpreted using the following conventions:

  1. Syllables are hyphen-separated, except that an accent or back-accent
     follows each accented syllable (the back-accent marks a secondary
     accent in some words of four or more syllables).  If no accent is
     given, the word is pronounced with equal accentuation on all syllables
     (this is common for abbreviations).

  2. Consonants are pronounced as in American English.       The letter `g' is
     always hard (as in "got" rather than "giant"); `ch' is soft
     ("church" rather than "chemist").       The letter `j' is the sound
     that occurs twice in "judge".  The letter `s' is always as in
     "pass", never a z sound.  The digraph `kh' is the guttural of
     "loch" or "l'chaim".  The digraph 'gh' is the aspirated g+h of
     "bughouse" or "ragheap" (rare in English).

  3. Uppercase letters are pronounced as their English letter names; thus
     (for example) /H-L-L/ is equivalent to /aitch el el/.  /Z/ may
     be pronounced /zee/ or /zed/ depending on your local dialect.

  4. Vowels are represented as follows:

     a
      back, that
     ah
       father, palm (see note)
     ar
          far, mark
     aw
        flaw, caught
     ay
     bake, rain
     e
        less, men
     ee
        easy, ski
     eir
       their, software
     i
           trip, hit
     i:
            life, sky
     o
         block, stock (see note)
     oh
          flow, sew
     oo
        loot, through
     or
            more, door
     ow
       out, how
     oy
         boy, coin
     uh
        but, some
     u
         put, foot
     y
         yet, young
     yoo
      few, chew
     [y]oo
     /oo/ with optional fronting as in `news' (/nooz/ or /nyooz/)

A /*/ is used for the `schwa' sound of unstressed or occluded vowels
(the one that is often written with an upside-down `e').  The schwa
vowel is omitted in syllables containing vocalic r, l, m or n; that is,
`kitten' and `color' would be rendered /kit'n/ and /kuhl'r/, not
/kit'*n/ and /kuhl'*r/.

Note that the above table reflects mainly distinctions found in standard
American English (that is, the neutral dialect spoken by TV network
announcers and typical of educated speech in the Upper Midwest,
Chicago, Minneapolis/St.Paul and Philadelphia).  However, we separate
/o/ from /ah/, which tend to merge in standard American.  This may
help readers accustomed to accents resembling British Received
Pronunciation.

Entries with a pronunciation of `//' are written-only usages.  (No, UNIX
weenies, this does *not* mean `pronounce like previous pronunciation'!)

:Other Lexicon Conventions:
===========================

Entries are sorted in case-blind ASCII collation order (rather than the
letter-by-letter order ignoring interword spacing common in mainstream
dictionaries), except that all entries beginning with nonalphabetic
characters are sorted after Z.    The case-blindness is a feature, not a
bug.

The beginning of each entry is marked by a colon (`:') at the
left margin.  This convention helps out tools like hypertext browsers
that benefit from knowing where entry boundaries are, but aren't as
context-sensitive as humans.

In pure ASCII renderings of the Jargon File, you will see {} used to
bracket words which themselves have entries in the File.  This isn't
done all the time for every such word, but it is done everywhere that a
reminder seems useful that the term has a jargon meaning and one might
wish to refer to its entry.

In this all-ASCII version, headwords for topic entries are distinguished
from those for ordinary entries by being followed by "::" rather than
":"; similarly, references are surrounded by "{{" and "}}" rather than
"{" and "}".

Defining instances of terms and phrases appear in `slanted type'.  A
defining instance is one which occurs near to or as part of an
explanation of it.

Prefix ** is used as linguists do; to mark examples of incorrect usage.

We follow the `logical' quoting convention described in the Writing
Style section above.  In addition, we reserve double quotes for actual
excerpts of text or (sometimes invented) speech.  Scare quotes (which
mark a word being used in a nonstandard way), and philosopher's quotes
(which turn an utterance into the string of letters or words that name
it) are both rendered with single quotes.

References such as `malloc(3)' and `patch(1)' are to UNIX facilities
(some of which, such as `patch(1)', are actually freeware distributed
over USENET).  The UNIX manuals use `foo(n)' to refer to item foo in
section (n) of the manual, where n=1 is utilities, n=2 is system calls,
n=3 is C library routines, n=6 is games, and n=8 (where present) is
system administration utilities.  Sections 4, 5, and 7 of the manuals
have changed roles frequently and in any case are not referred to in any
of the entries.

Various abbreviations used frequently in the lexicon are summarized here:

abbrev.
     abbreviation
adj.
     adjective
adv.
     adverb
alt.
     alternate
cav.
     caveat
conj.
     conjunction
esp.
     especially
excl.
     exclamation
imp.
     imperative
interj.
     interjection
n.
     noun
obs.
     obsolete
pl.
     plural
poss.
     possibly
pref.
     prefix
prob.
     probably
prov.
     proverbial
quant.
     quantifier
suff.
     suffix
syn.
     synonym (or synonymous with)
v.
     verb (may be transitive or intransitive)
var.
     variant
vi.
     intransitive verb
vt.
     transitive verb

Where alternate spellings or pronunciations are given, alt.
separates two possibilities with nearly equal distribution, while
var. prefixes one that is markedly less common than the primary.

Where a term can be attributed to a particular subculture or is known
to have originated there, we have tried to so indicate.  Here is a
list of abbreviations used in etymologies:

Berkeley
     University of California at Berkeley
Cambridge
     the university in England (*not* the city in Massachusetts where
     MIT happens to be located!)
BBN
     Bolt, Beranek & Newman
CMU
     Carnegie-Mellon University
Commodore
     Commodore Business Machines
DEC
     The Digital Equipment Corporation
Fairchild
     The Fairchild Instruments Palo Alto development group
Fidonet
     See the {Fidonet} entry
IBM
     International Business Machines
MIT
     Massachusetts Institute of Technology; esp. the legendary MIT AI Lab
     culture of roughly 1971 to 1983 and its feeder groups, including the
     Tech Model Railroad Club
NRL
     Naval Research Laboratories
NYU
     New York University
OED
     The Oxford English Dictionary
Purdue
     Purdue University
SAIL
     Stanford Artificial Intelligence Laboratory (at Stanford
     University)
SI
     From Syst`eme International, the name for the standard
     conventions of metric nomenclature used in the sciences
Stanford
     Stanford University
Sun
     Sun Microsystems
TMRC
     Some MITisms go back as far as the Tech Model Railroad Club (TMRC) at
     MIT c. 1960.  Material marked TMRC is from "An Abridged Dictionary
     of the TMRC Language", originally compiled by Pete Samson in 1959
UCLA
     University of California at Los Angeles
UK
     the United Kingdom (England, Wales, Scotland, Northern Ireland)
USENET
     See the {USENET} entry
WPI
     Worcester Polytechnic Institute, site of a very active community of
     PDP-10 hackers during the 1970s
XEROX PARC
     XEROX's Palo Alto Research Center, site of much pioneering research in
     user interface design and networking
Yale
     Yale University

Some other etymology abbreviations such as {UNIX} and {PDP-10}
refer to technical cultures surrounding specific operating systems,
processors, or other environments.  The fact that a term is labelled
with any one of these abbreviations does not necessarily mean its use
is confined to that culture.  In particular, many terms labelled `MIT'
and `Stanford' are in quite general use.  We have tried to give some
indication of the distribution of speakers in the usage notes;
however, a number of factors mentioned in the introduction conspire to
make these indications less definite than might be desirable.

A few new definitions attached to entries are marked [proposed].
These are usually generalizations suggested by editors or USENET
respondents in the process of commenting on previous definitions of
those entries. These are *not* represented as established
jargon.

:Format For New Entries:
========================

All contributions and suggestions about the Jargon File will be
considered donations to be placed in the public domain as part of this
File, and may be used in subsequent paper editions.  Submissions may
be edited for accuracy, clarity and concision.

Try to conform to the format already being used --- head-words
separated from text by a colon (double colon for topic entries),
cross-references in curly brackets (doubled for topic entries),
pronunciations in slashes, etymologies in square brackets,
single-space after definition numbers and word classes, etc.  Stick to
the standard ASCII character set (7-bit printable, no high-half
characters or [nt]roff/TeX/Scribe escapes), as one of the versions
generated from the master file is an info document that has to be
viewable on a character tty.

We are looking to expand the file's range of technical specialties covered.
There are doubtless rich veins of jargon yet untapped in the scientific
computing, graphics, and networking hacker communities; also in numerical
analysis, computer architectures and VLSI design, language design, and many
other related fields.  Send us your jargon!

We are *not* interested in straight technical terms explained by
textbooks or technical dictionaries unless an entry illuminates
`underground' meanings or aspects not covered by official histories.
We are also not interested in `joke' entries --- there is a lot of
humor in the file but it must flow naturally out of the explanations
of what hackers do and how they think.

It is OK to submit items of jargon you have originated if they have spread
to the point of being used by people who are not personally acquainted with
you.  We prefer items to be attested by independent submission from two
different sites.

The Jargon File will be regularly maintained and made available for
FTP over Internet, and will include a version number.  Read it, pass
it around, contribute --- this is *your* monument!








1816:
:ASCII:: [American Standard Code for Information Interchange]
   /as'kee/ n. The predominant character set encoding of present-day
   computers.  The modern version uses 7 bits for each character,
   whereas most earlier codes (including an early version of ASCII)
   used fewer.        This change allowed the inclusion of lowercase letters
   --- a major {win} --- but it did not provide for accented
   letters or any other letterforms not used in English (such as the
   German sharp-S
   or the ae-ligature
   which is a letter in, for example, Norwegian).  It could be worse,
   though.  It could be much worse.  See {{EBCDIC}} to understand how.
   
   Computers are much pickier and less flexible about spelling than
   humans; thus, hackers need to be very precise when talking about
   characters, and have developed a considerable amount of verbal
   shorthand for them.       Every character has one or more names --- some
   formal, some concise, some silly.  Common jargon names for ASCII
   characters are collected here.  See also individual entries for
   {bang}, {excl}, {open}, {ques}, {semi}, {shriek},
   {splat}, {twiddle}, and {Yu-Shiang Whole Fish}.

   This list derives from revision 2.3 of the USENET ASCII
   pronunciation guide.  Single characters are listed in ASCII order;
   character pairs are sorted in by first member.  For each character,
   common names are given in rough order of popularity, followed by
   names that are reported but rarely seen; official ANSI/CCITT names
   are surrounded by brokets: <>.  Square brackets mark the
   particularly silly names introduced by {INTERCAL}.  The
   abbreviations "l/r" and "o/c" stand for left/right and
   "open/close" respectively.  Ordinary parentheticals provide some
   usage information.

     !
    Common: {bang}; pling; excl; shriek; <exclamation mark>.
        Rare: factorial; exclam; smash; cuss; boing; yell; wow; hey;
    wham; eureka; [spark-spot]; soldier.

     "
     Common: double quote; quote.  Rare: literal mark;
   double-glitch; <quotation marks>; <dieresis>; dirk;
     [rabbit-ears]; double prime.

     #
          Common: number sign; pound; pound sign; hash; sharp; {crunch};
        hex; [mesh].  Rare: grid; crosshatch; octothorpe; flash;
        <square>, pig-pen; tictactoe; scratchmark; thud; thump;
       {splat}.

     $
    Common: dollar; <dollar sign>.  Rare: currency symbol; buck;
          cash; string (from BASIC); escape (when used as the echo of
     ASCII ESC); ding; cache; [big money].

     %
     Common: percent; <percent sign>; mod; grapes.  Rare:
          [double-oh-seven].

     &
        Common: <ampersand>; amper; and.  Rare: address (from C);
     reference (from C++); andpersand; bitand; background (from
      `sh(1)'); pretzel; amp.  [INTERCAL called this `ampersand';
       what could be sillier?]

     '
          Common: single quote; quote; <apostrophe>.  Rare: prime;
      glitch; tick; irk; pop; [spark]; <closing single quotation
       mark>; <acute accent>.

     ( )

         Common: l/r paren; l/r parenthesis; left/right; open/close;
     paren/thesis; o/c paren; o/c parenthesis; l/r parenthesis; l/r
      banana.  Rare: so/already; lparen/rparen; <opening/closing
   parenthesis>; o/c round bracket, l/r round bracket,
      [wax/wane]; parenthisey/unparenthisey; l/r ear.

     *
       Common: star; [{splat}]; <asterisk>.  Rare: wildcard; gear;
         dingle; mult; spider; aster; times; twinkle; glob (see
          {glob}); {Nathan Hale}.

     +
       Common: <plus>; add.  Rare: cross; [intersection].

     ,
      Common: <comma>.  Rare: <cedilla>; [tail].

     -
        Common: dash; <hyphen>; <minus>.  Rare: [worm]; option; dak;
    bithorpe.

     .
     Common: dot; point; <period>; <decimal point>.  Rare: radix
     point; full stop; [spot].

     /
     Common: slash; stroke; <slant>; forward slash.  Rare:
         diagonal; solidus; over; slak; virgule; [slat].

     :
   Common: <colon>.  Rare: dots; [two-spot].

     ;
       Common: <semicolon>; semi.  Rare: weenie; [hybrid],
   pit-thwong.

     < >
   Common: <less/greater than>; bra/ket; l/r angle; l/r angle
        bracket; l/r broket.  Rare: from/{into, towards}; read
        from/write to; suck/blow; comes-from/gozinta; in/out;
       crunch/zap (all from UNIX); [angle/right angle].

     =
      Common: <equals>; gets; takes.  Rare: quadrathorpe;
   [half-mesh].

     ?
          Common: query; <question mark>; {ques}.  Rare: whatmark;
    [what]; wildchar; huh; hook; buttonhook; hunchback.

     @
   Common: at sign; at; strudel.  Rare: each; vortex; whorl;
   [whirlpool]; cyclone; snail; ape; cat; rose; cabbage;
       <commercial at>.

     V
        Rare: [book].

     [ ]
   Common: l/r square bracket; l/r bracket; <opening/closing
    bracket>; bracket/unbracket.  Rare: square/unsquare; [U turn/U
   turn back].

     \
      Common: backslash; escape (from C/UNIX); reverse slash; slosh;
          backslant; backwhack.  Rare: bash; <reverse slant>; reversed
      virgule; [backslat].

     ^
          Common: hat; control; uparrow; caret; <circumflex>.  Rare:
    chevron; [shark (or shark-fin)]; to the (`to the power of');
       fang; pointer (in Pascal).

     _
    Common: <underline>; underscore; underbar; under.  Rare:
      score; backarrow; skid; [flatworm].

     `
   Common: backquote; left quote; left single quote; open quote;
   <grave accent>; grave.  Rare: backprime; [backspark];
     unapostrophe; birk; blugle; back tick; back glitch; push;
   <opening single quotation mark>; quasiquote.

     { }
        Common: o/c brace; l/r brace; l/r squiggly; l/r squiggly
        bracket/brace; l/r curly bracket/brace; <opening/closing
         brace>.  Rare: brace/unbrace; curly/uncurly; leftit/rytit; l/r
       squirrelly; [embrace/bracelet].

     |
       Common: bar; or; or-bar; v-bar; pipe; vertical bar.  Rare:
          <vertical line>; gozinta; thru; pipesinta (last three from
        UNIX); [spike].

     ~ 
          Common: <tilde>; squiggle; {twiddle}; not.  Rare: approx;
   wiggle; swung dash; enyay; [sqiggle (sic)].

   The pronunciation of `#' as `pound' is common in the U.S.
   but a bad idea; {{Commonwealth Hackish}} has its own, rather more
   apposite use of `pound sign' (confusingly, on British keyboards
   the pound graphic
   happens to replace `#'; thus Britishers sometimes
   call `#' on a U.S.-ASCII keyboard `pound', compounding the
   American error).  The U.S. usage derives from an old-fashioned
   commercial practice of using a `#' suffix to tag pound weights
   on bills of lading. The character is usually pronounced `hash'
   outside the U.S.

   The `uparrow' name for circumflex and `leftarrow' name for
   underline are historical relics from archaic ASCII (the 1963
   version), which had these graphics in those character positions
   rather than the modern punctuation characters.

   The `swung dash' or `approximation' sign is not quite the same
   as tilde in typeset material
   but the ASCII tilde serves for both (compare {angle
   brackets}).

   Some other common usages cause odd overlaps.  The `#',
   `$', `>', and `&' characters, for example, are all
   pronounced "hex" in different communities because various
   assemblers use them as a prefix tag for hexadecimal constants (in
   particular, `#' in many assembler-programming cultures,
   `$' in the 6502 world, `>' at Texas Instruments, and
   `&' on the BBC Micro, Sinclair, and some Z80 machines).  See
   also {splat}.

   The inability of ASCII text to correctly represent any of the
   world's other major languages makes the designers' choice of 7 bits
   look more and more like a serious {misfeature} as the use of
   international networks continues to increase (see {software
   rot}).  Hardware and software from the U.S. still tends to embody
   the assumption that ASCII is the universal character set and that
   characters have 7 bits; this is a a major irritant to people who
   want to use a character set suited to their own languages.
   Perversely, though, efforts to solve this problem by proliferating
   `national' character sets produce an evolutionary pressure to use
   a *smaller* subset common to all those in use.

:ASCII art: n. The fine art of drawing diagrams using the ASCII
   character set (mainly `|', `-', `/', `\', and
   `+').  Also known as `character graphics' or `ASCII
   graphics'; see also {boxology}.  Here is a serious example:


     o----)||(--+--|<----+        +---------o + D O
     L  )||(  |        |   |             C U
   A I  )||(  +-->|-+  |        +-\/\/-+--o -         T
   C N  )||(        |  |   |      |        P
     E  )||(  +-->|-+--)---+--)|--+-o   U
        )||(  |        |          | GND    T
   o----)||(--+--|<----+----------+     

        A power supply consisting of a full wave rectifier circuit
  feeding a capacitor input filter circuit

                              Figure 1.

   And here are some very silly examples:


       |\/\/\/|     ____/|          ___    |\_/|   ___
       |      |     \ o.O|   ACK!      /   \_  |` '|  _/   \
       |      |      =(_)=  THPHTH!   /      \/     \/         \
       | (o)(o)        U           /                       \
       C      _)  (__)                 \/\/\/\  _____  /\/\/\/
       | ,___|    (oo)                       \/     \/
       |   /           \/-------\       U                  (__)
      /____\      ||     | \   /---V  `v'-           oo )
     /         \      ||---W||  *  * |--|   || |`.         |_/\

              //-o-\\
            ____---=======---____
   ====___\   /.. ..\   /___====            Klingons rule OK!
       //       ---\__O__/---       \\
       \_\                           /_/

                               Figure 2.

   There is an important subgenre of ASCII art that puns on the
   standard character names in the fashion of a rebus.

     +--------------------------------------------------------+
     |          ^^^^^^^^^^^^                                      |
     | ^^^^^^^^^^^         ^^^^^^^^^                       |
     |                      ^^^^^^^^^^^^^            ^^^^^^^^^^^^^ |
     |             ^^^^^^^         B       ^^^^^^^^^               |
     |       ^^^^^^^^^          ^^^            ^^^^^^^^^^^^^^      |
     +--------------------------------------------------------+
            " A Bee in the Carrot Patch "

                              Figure 3.

   Within humorous ASCII art, there is for some reason an entire
   flourishing subgenre of pictures of silly cows.  Four of these are
   reproduced in Figure 2; here are three more:


          (__)              (__)              (__)
            (\/)             ($$)              (**)
       /-------\/     /-------\/       /-------\/
      / | 666 ||      / |=====||        / |     ||
     *  ||----||       *  ||----||       *  ||----||
        ~~    ~~          ~~    ~~          ~~    ~~ 
     Satanic cow    This cow is a Yuppie   Cow in love

                        Figure 4.








2756:
:bignum: /big'nuhm/ [orig. from MIT MacLISP] n. 1. [techspeak] A
   multiple-precision computer representation for very large
   integers.  2. More generally, any very large number.  "Have you ever
   looked at the United States Budget?    There's bignums for you!"
   3. [Stanford] In backgammon, large numbers on the dice especially a
   roll of double fives or double sixes (compare {moby}, sense 4).
   See also {El Camino Bignum}.

   Sense 1 may require some explanation.  Most computer languages
   provide a kind of data called `integer', but such computer
   integers are usually very limited in size; usually they must be
   smaller than than 2^(31) (2,147,483,648) or (on a
   {bitty box}) 2^(15) (32,768).  If you want to work
   with numbers larger than that, you have to use floating-point
   numbers, which are usually accurate to only six or seven decimal
   places.  Computer languages that provide bignums can perform exact
   calculations on very large numbers, such as 1000! (the factorial
   of 1000, which is 1000 times 999 times 998 times ... times 2
   times 1).  For example, this value for 1000!  was computed by the
   MacLISP system using bignums:

     40238726007709377354370243392300398571937486421071
     46325437999104299385123986290205920442084869694048
     00479988610197196058631666872994808558901323829669
     94459099742450408707375991882362772718873251977950
     59509952761208749754624970436014182780946464962910
     56393887437886487337119181045825783647849977012476
     63288983595573543251318532395846307555740911426241
     74743493475534286465766116677973966688202912073791
     43853719588249808126867838374559731746136085379534
     52422158659320192809087829730843139284440328123155
     86110369768013573042161687476096758713483120254785
     89320767169132448426236131412508780208000261683151
     02734182797770478463586817016436502415369139828126
     48102130927612448963599287051149649754199093422215
     66832572080821333186116811553615836546984046708975
     60290095053761647584772842188967964624494516076535
     34081989013854424879849599533191017233555566021394
     50399736280750137837615307127761926849034352625200
     01588853514733161170210396817592151090778801939317
     81141945452572238655414610628921879602238389714760
     88506276862967146674697562911234082439208160153780
     88989396451826324367161676217916890977991190375403
     12746222899880051954444142820121873617459926429565
     81746628302955570299024324153181617210465832036786
     90611726015878352075151628422554026517048330422614
     39742869330616908979684825901254583271682264580665
     26769958652682272807075781391858178889652208164348
     34482599326604336766017699961283186078838615027946
     59551311565520360939881806121385586003014356945272
     24206344631797460594682573103790084024432438465657
     24501440282188525247093519062092902313649327349756
     55139587205596542287497740114133469627154228458623
     77387538230483865688976461927383814900140767310446
     64025989949022222176590433990188601856652648506179
     97023561938970178600408118897299183110211712298459
     01641921068884387121855646124960798722908519296819
     37238864261483965738229112312502418664935314397013
     74285319266498753372189406942814341185201580141233
     44828015051399694290153483077644569099073152433278
     28826986460278986432113908350621709500259738986355
     42771967428222487575867657523442202075736305694988
     25087968928162753848863396909959826280956121450994
     87170124451646126037902930912088908694202851064018
     21543994571568059418727489980942547421735824010636
     77404595741785160829230135358081840096996372524230
     56085590370062427124341690900415369010593398383577
     79394109700277534720000000000000000000000000000000
     00000000000000000000000000000000000000000000000000
     00000000000000000000000000000000000000000000000000
     00000000000000000000000000000000000000000000000000
     00000000000000000000000000000000000000000000000000
     000000000000000000.








3639:
:boxed comments: n. Comments (explanatory notes attached to program
   instructions) that occupy several lines by themselves; so called
   because in assembler and C code they are often surrounded by a box
   in a style something like this:

     /*************************************************
      *
      * This is a boxed comment in C style
      *
      *************************************************/

   Common variants of this style omit the asterisks in column 2 or add
   a matching row of asterisks closing the right side of the box.  The
   sparest variant omits all but the comment delimiters themselves;
   the `box' is implied.  Oppose {winged comments}.








3707:
:braino: /bray'no/ n. Syn. for {thinko}. See also {brain
   fart}.








3981:
:bug: n. An unwanted and unintended property of a program or piece
   of hardware, esp. one that causes it to malfunction.  Antonym of
   {feature}.  Examples: "There's a bug in the editor: it writes
   things out backwards."  "The system crashed because of a hardware
   bug."  "Fred is a winner, but he has a few bugs" (i.e., Fred is
   a good guy, but he has a few personality problems).

   Historical note: Admiral Grace Hopper (an early computing pioneer
   better known for inventing {COBOL}) liked to tell a story in
   which a technician solved a {glitch} in the Harvard Mark II
   machine by pulling an actual insect out from between the contacts
   of one of its relays, and she subsequently promulgated {bug} in
   its hackish sense as a joke about the incident (though, as she was
   careful to admit, she was not there when it happened).  For many
   years the logbook associated with the incident and the actual bug
   in question (a moth) sat in a display case at the Naval Surface
   Warfare Center (NSWC).  The entire story, with a picture of the
   logbook and the moth taped into it, is recorded in the "Annals
   of the History of Computing", Vol. 3, No. 3 (July 1981),
   pp. 285--286.

   The text of the log entry (from September 9, 1947), reads "1545
   Relay #70 Panel F (moth) in relay.  First actual case of bug being
   found".  This wording establishes that the term was already
   in use at the time in its current specific sense --- and Hopper
   herself reports that the term `bug' was regularly applied to
   problems in radar electronics during WWII.

   Indeed, the use of `bug' to mean an industrial defect was already
   established in Thomas Edison's time, and a more specific and rather
   modern use can be found in an electrical handbook from 1896
   ("Hawkin's New Catechism of Electricity", Theo. Audel & Co.)
   which says: "The term `bug' is used to a limited extent to
   designate any fault or trouble in the connections or working of
   electric apparatus."  It further notes that the term is "said to
   have originated in quadruplex telegraphy and have been transferred
   to all electric apparatus."

   The latter observation may explain a common folk etymology of the
   term; that it came from telephone company usage, in which "bugs in
   a telephone cable" were blamed for noisy lines.  Though this
   derivation seems to be mistaken, it may well be a distorted memory
   of a joke first current among *telegraph* operators more than
   a century ago!

   Actually, use of `bug' in the general sense of a disruptive event
   goes back to Shakespeare!  In the first edition of Samuel Johnson's
   dictionary one meaning of `bug' is "A frightful object; a
   walking spectre"; this is traced to `bugbear', a Welsh term for
   a variety of mythological monster which (to complete the circle)
   has recently been reintroduced into the popular lexicon through
   fantasy role-playing games.

   In any case, in jargon the word almost never refers to insects.
   Here is a plausible conversation that never actually happened:

   "There is a bug in this ant farm!"

   "What do you mean?  I don't see any ants in it."

   "That's the bug."

   [There has been a widespread myth that the original bug was moved
   to the Smithsonian, and an earlier version of this entry so
   asserted.  A correspondent who thought to check discovered that the
   bug was not there.  While investigating this in late 1990, your
   editor discovered that the NSWC still had the bug, but had
   unsuccessfully tried to get the Smithsonian to accept it --- and
   that the present curator of their History of American Technology
   Museum didn't know this and agreed that it would make a worthwhile
   exhibit.  It was moved to the Smithsonian in mid-1991, but due to
   space and money constraints has not yet been exhibited.  Thus, the
   process of investigating the original-computer-bug bug fixed it in
   an entirely unexpected way, by making the myth true!  --- ESR]








4195:
:bytesexual: /bi:t`sek'shu-*l/ adj. Said of hardware, denotes
   willingness to compute or pass data in either {big-endian} or
   {little-endian} format (depending, presumably, on a {mode bit}
   somewhere).  See also {NUXI problem}.








4571:
:Chernobyl chicken: n. See {laser chicken}.








5344:
:cowboy: [Sun, from William Gibson's {cyberpunk} SF] n. Synonym
   for {hacker}.  It is reported that at Sun this word is often
   said with reverence.








6863:
:drunk mouse syndrome: (also `mouse on drugs') n. A malady
   exhibited by the mouse pointing device of some computers.  The
   typical symptom is for the mouse cursor on the screen to move in
   random directions and not in sync with the motion of the actual
   mouse.  Can usually be corrected by unplugging the mouse and
   plugging it back again.  Another recommended fix for optical mice
   is to rotate your mouse pad 90 degrees.

   At Xerox PARC in the 1970s, most people kept a can of copier
   cleaner (isopropyl alcohol) at their desks.     When the steel ball on
   the mouse had picked up enough {cruft} to be unreliable, the
   mouse was doused in cleaner, which restored it for a while.
   However, this operation left a fine residue that accelerated the
   accumulation of cruft, so the dousings became more and more
   frequent.  Finally, the mouse was declared `alcoholic' and sent
   to the clinic to be dried out in a CFC ultrasonic bath.






6880:
:Duff's device: n. The most dramatic use yet seen of {fall
   through} in C, invented by Tom Duff when he was at Lucasfilm.
   Trying to {bum} all the instructions he could out of an inner
   loop that copied data serially onto an output port, he decided to
   unroll it.  He then realized that the unrolled version could
   be implemented by *interlacing* the structures of a switch and
   a loop:

   register n = (count + 7) / 8;      /* count > 0 assumed */

   switch (count % 8)
  {
      case 0:        do {  *to = *from++;
        case 7:          *to = *from++;
 case 6:          *to = *from++;
 case 5:          *to = *from++;
 case 4:          *to = *from++;
 case 3:          *to = *from++;
 case 2:          *to = *from++;
 case 1:          *to = *from++;
                    } while (--n > 0);
       }

   Shocking though it appears to all who encounter it for the first
   time, the device is actually perfectly valid, legal C.  C's default
   {fall through} in case statements has long been its most
   controversial single feature; Duff observed that "This code forms
   some sort of argument in that debate, but I'm not sure whether it's
   for or against."

   [For maximal obscurity, the outermost pair of braces above could be
   actually be removed --- GLS]







8258:
:FM: /F-M/ n. *Not* `Frequency Modulation' but rather an
   abbreviation for `Fucking Manual', the back-formation from
   {RTFM}. Used to refer to the manual itself in the {RTFM}.
   "Have you seen the Networking FM lately?"








9345:
:GPL: /G-P-L/ n. Abbreviation for `General Public License' in
   widespread use; see {copyleft}, {General Public
   Virus}.








13992:
:Obfuscated C Contest: (in full, the `International Obfuscated C
   Code Contest', or IOCCC) n. An annual contest run since 1984 over
   USENET by Landon Curt Noll and friends.  The overall winner is
   whoever produces the most unreadable, creative, and bizarre (but
   working) C program; various other prizes are awarded at the judges'
   whim.  C's terse syntax and macro-preprocessor facilities give
   contestants a lot of maneuvering room.  The winning programs often
   manage to be simultaneously (a) funny, (b) breathtaking works of
   art, and (c) horrible examples of how *not* to code in C.

   This relatively short and sweet entry might help convey the flavor
   of obfuscated C:

     /*
      * HELLO WORLD program
      * by Jack Applin and Robert Heckendorn, 1985
      */
     main(v,c)char**c;{for(v[c++]="Hello, world!\n)";
     (!!c)[*c]&&(v--||--c&&execlp(*c,*c,c[!!c]+!!c,!c));
     **c=!c)write(!!*c,*c,!!**c);}

   Here's another good one:

     /*
      * Program to compute an approximation of pi
      *  by Brian Westley, 1988
      */

     #define _ -F<00||--F-OO--;
     int F=00,OO=00;
     main(){F_OO();printf("%1.3f\n",4.*-F/OO/OO);}F_OO()
     {
            _-_-_-_
        _-_-_-_-_-_-_-_-_
        _-_-_-_-_-_-_-_-_-_-_-_
       _-_-_-_-_-_-_-_-_-_-_-_-_-_
      _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
      _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
     _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
     _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
     _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
     _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
      _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
      _-_-_-_-_-_-_-_-_-_-_-_-_-_-_
       _-_-_-_-_-_-_-_-_-_-_-_-_-_
     _-_-_-_-_-_-_-_-_-_-_-_
         _-_-_-_-_-_-_-_
                 _-_-_-_
     }
   Note that this program works by computing its own area.  For more
   digits, write a bigger program.  See also {hello, world}.








15485:
:quantifiers:: In techspeak and jargon, the standard metric
   prefixes used in the SI (Syst`eme International) conventions for
   scientific measurement have dual uses.  With units of time or
   things that come in powers of 10, such as money, they retain their
   usual meanings of multiplication by powers of 1000 = 10^3.
   But when used with bytes or other things that naturally come in
   powers of 2, they usually denote multiplication by powers of
   1024 = 2^(10).

   Here are the SI magnifying prefixes, along with the corresponding
   binary interpretations in common use:

     prefix  decimal  binary
     kilo-   1000^1   1024^1 = 2^10 = 1,024 
     mega-   1000^2   1024^2 = 2^20 = 1,048,576 
     giga-   1000^3   1024^3 = 2^30 = 1,073,741,824 
     tera-   1000^4   1024^4 = 2^40 = 1,099,511,627,776 
     peta-   1000^5   1024^5 = 2^50 = 1,125,899,906,842,624 
     exa-    1000^6   1024^6 = 2^60 = 1,152,921,504,606,846,976 
     zetta-  1000^7   1024^7 = 2^70 = 1,180,591,620,717,411,303,424 
     yotta-  1000^8   1024^8 = 2^80 = 1,208,925,819,614,629,174,706,176 

   Here are the SI fractional prefixes:

     *prefix  decimal     jargon usage*
     milli-  1000^-1  (seldom used in jargon)
     micro-  1000^-2         small or human-scale (see {micro-})
     nano-   1000^-3   even smaller (see {nano-})
     pico-   1000^-4    even smaller yet (see {pico-})
     femto-  1000^-5        (not used in jargon---yet)
     atto-   1000^-6      (not used in jargon---yet)
     zepto-  1000^-7      (not used in jargon---yet)
     yocto-  1000^-8      (not used in jargon---yet)

   The prefixes zetta-, yotta-, zepto-, and yocto- have been included
   in these tables purely for completeness and giggle value; they were
   adopted in 1990 by the `19th Conference Generale des Poids et
   Mesures'.  The binary peta- and exa- loadings, though well
   established, are not in jargon use either --- yet.  The prefix
   milli-, denoting multiplication by 1000^(-1), has always
   been rare in jargon (there is, however, a standard joke about the
   `millihelen' --- notionally, the amount of beauty required to
   launch one ship).  See the entries on {micro-}, {pico-}, and
   {nano-} for more information on connotative jargon use of these
   terms.  `Femto' and `atto' (which, interestingly, derive not
   from Greek but from Danish) have not yet acquired jargon loadings,
   though it is easy to predict what those will be once computing
   technology enters the required realms of magnitude (however, see
   {attoparsec}).

   There are, of course, some standard unit prefixes for powers of
   10.   In the following table, the `prefix' column is the
   international standard suffix for the appropriate power of ten; the
   `binary' column lists jargon abbreviations and words for the
   corresponding power of 2.  The B-suffixed forms are commonly used
   for byte quantities; the words `meg' and `gig' are nouns that may
   (but do not always) pluralize with `s'.

     prefix   decimal binary       pronunciation
     kilo-         k      K, KB,       /kay/
     mega-         M      M, MB, meg   /meg/
     giga-         G      G, GB, gig   /gig/,/jig/

   Confusingly, hackers often use K or M as though they were suffix or
   numeric multipliers rather than a prefix; thus "2K dollars", "2M
   of disk space".  This is also true (though less commonly) of G.

   Note that the formal SI metric prefix for 1000 is `k'; some use
   this strictly, reserving `K' for multiplication by 1024 (KB is
   thus `kilobytes').

   K, M, and G used alone refer to quantities of bytes; thus, 64G is
   64 gigabytes and `a K' is a kilobyte (compare mainstream use of
   `a G' as short for `a grand', that is, $1000).  Whether one
   pronounces `gig' with hard or soft `g' depends on what one thinks
   the proper pronunciation of `giga-' is.

   Confusing 1000 and 1024 (or other powers of 2 and 10 close in
   magnitude) --- for example, describing a memory in units of
   500K or 524K instead of 512K --- is a sure sign of the
   {marketroid}.  One example of this: it is common to refer to the
   capacity of 3.5" {microfloppies} as `1.44 MB' In fact, this is a
   completely {bogus} number.  The correct size is 1440 KB, that
   is, 1440 * 1024 = 1474560 bytes.  So the `mega' in `1.44 MB' is
   compounded of two `kilos', one of which is 1024 and the other of
   which is 1000.  The correct number of megabytes would of course be
   1440 / 1024 = 1.40625.  Alas, this fine point is probably lost on
   the world forever.

   [1993 update: hacker Morgan Burke has proposed, to general
   approval on USENET, the following additional prefixes:

groucho
     10^-30
harpo
     10^-27
harpi
     10^27
grouchi
     10^30

   We observe that this would leave the prefixes zeppo-, gummo-, and
   chico- available for future expansion.  Sadly, there is little
   immediate prospect that Mr. Burke's eminently sensible proposal
   will be ratified.]







15756:
:random numbers:: n. When one wishes to specify a large but random
   number of things, and the context is inappropriate for {N}, certain
   numbers are preferred by hacker tradition (that is, easily
   recognized as placeholders).  These include the following:

     17
   Long described at MIT as `the least random number'; see 23.
     23
     Sacred number of Eris, Goddess of Discord (along with 17 and
    5).
     42
          The Answer to the Ultimate Question of Life, the Universe, and
      Everything. (Note that this answer is completely fortuitous.
    `:-)')
     69
      From the sexual act.  This one was favored in MIT's ITS
    culture.
     105
        69 hex = 105 decimal, and 69 decimal = 105 octal.
     666
       The Number of the Beast.

   For further enlightenment, study the "Principia Discordia",
   "{The Hitchhiker's Guide to the Galaxy}", "The Joy
   of Sex", and the Christian Bible (Revelation 13:18).  See also
   {Discordianism} or consult your pineal gland.  See also {for
   values of}.







17422:
:SNAFU principle: /sna'foo prin'si-pl/ [from a WWII Army
   acronym for `Situation Normal, All Fucked Up'] n. "True
   communication is possible only between equals, because inferiors
   are more consistently rewarded for telling their superiors pleasant
   lies than for telling the truth." --- a central tenet of
   {Discordianism}, often invoked by hackers to explain why
   authoritarian hierarchies screw up so reliably and systematically.
   The effect of the SNAFU principle is a progressive disconnection of
   decision-makers from reality.  This lightly adapted version of a
   fable dating back to the early 1960s illustrates the phenomenon
   perfectly:

     In the beginning was the plan,
          and then the specification;
     And the plan was without form,
          and the specification was void.

     And darkness
            was on the faces of the implementors thereof;
     And they spake unto their leader,
     saying:
     "It is a crock of shit,
            and smells as of a sewer."

     And the leader took pity on them,
       and spoke to the project leader:
     "It is a crock of excrement,
      and none may abide the odor thereof."

     And the project leader
       spake unto his section head, saying:
     "It is a container of excrement,
      and it is very strong, such that none may abide it."

     The section head then hurried to his department manager,
      and informed him thus:
     "It is a vessel of fertilizer,
      and none may abide its strength."

     The department manager carried these words
      to his general manager,
     and spoke unto him
          saying:
     "It containeth that which aideth the growth of plants,
     and it is very strong."

     And so it was that the general manager rejoiced
    and delivered the good news unto the Vice President.
     "It promoteth growth,
     and it is very powerful."

     The Vice President rushed to the President's side,
      and joyously exclaimed:
     "This powerful new software product
        will promote the growth of the company!"

     And the President looked upon the product,
        and saw that it was very good.

   After the subsequent disaster, the {suit}s protect themselves by
   saying "I was misinformed!", and the implementors are demoted or
   fired.








18582:
:TECO: /tee'koh/ obs. 1. [originally an acronym for `[paper] Tape
   Editor and COrrector'; later, `Text Editor and COrrector'] n. A
   text editor developed at MIT and modified by just about everybody.
   With all the dialects included, TECO may have been the most
   prolific editor in use before {EMACS}, to which it was directly
   ancestral.  Noted for its powerful programming-language-like
   features and its unspeakably hairy syntax.  It is literally the
   case that every string of characters is a valid TECO program
   (though probably not a useful one); one common game used to be
   mentally working out what the TECO commands corresponding to human
   names did.  2. vt. Originally, to edit using the TECO editor in one
   of its infinite variations (see below).  3. vt.,obs.  To edit even
   when TECO is *not* the editor being used!  This usage is rare
   and now primarily historical.

   As an example of TECO's obscurity, here is a TECO program that
   takes a list of names such as:

     Loser, J. Random
     Quux, The Great
     Dick, Moby

   sorts them alphabetically according to surname, and then puts the
   surname last, removing the comma, to produce the following:

     Moby Dick
     J. Random Loser
     The Great Quux

   The program is

     [1 J^P$L$$
     J <.-Z; .,(S,$ -D .)FX1 @F^B $K :L I $ G1 L>$$

   (where ^B means `Control-B' (ASCII 0000010) and $ is actually
   an {alt} or escape (ASCII 0011011) character).

   In fact, this very program was used to produce the second, sorted
   list from the first list.  The first hack at it had a {bug}: GLS
   (the author) had accidentally omitted the `@' in front
   of `F^B', which as anyone can see is clearly the {Wrong Thing}.  It
   worked fine the second time.  There is no space to describe all the
   features of TECO, but it may be of interest that `^P' means
   `sort' and `J<.-Z; ... L>' is an idiomatic series of commands
   for `do once for every line'.

   In mid-1991, TECO is pretty much one with the dust of history,
   having been replaced in the affections of hackerdom by {EMACS}.
   Descendants of an early (and somewhat lobotomized) version adopted
   by DEC can still be found lurking on VMS and a couple of crufty
   PDP-11 operating systems, however, and ports of the more advanced
   MIT versions remain the focus of some antiquarian interest.     See
   also {retrocomputing}, {write-only language}.







20993:
:You know you've been hacking too long when...: The set-up line
   for a genre of one-liners told by hackers about themselves.     These
   include the following:

   *      not only do you check your email more often than your paper
 mail, but you remember your {network address} faster than your
    postal one.
   *     your {SO} kisses you on the neck and the first thing you
  think is "Uh, oh, {priority interrupt}."
   *    you go to balance your checkbook and discover that you're
  doing it in octal.
   *      your computers have a higher street value than your car.
   *        in your universe, `round numbers' are powers of 2, not 10.
   *     more than once, you have woken up recalling a dream in
      some programming language.
   *      you realize you have never seen half of your best friends.







21629:
                                 * * *

   One day a student came to Moon and said: "I understand how to make a
better garbage collector.  We must keep a reference count of the
pointers to each cons."

Moon patiently told the student the following story:

     "One day a student came to Moon and said: `I understand how to make
     a better garbage collector...

[Ed. note: Pure reference-count garbage collectors have problems with
circular structures that point to themselves.]

                             * * *

In the days when Sussman was a novice, Minsky once came to him as he sat
hacking at the PDP-6.

   "What are you doing?", asked Minsky.

   "I am training a randomly wired neural net to play Tic-Tac-Toe"
Sussman replied.

   "Why is the net wired randomly?", asked Minsky.

   "I do not want it to have any preconceptions of how to play", Sussman
said.

   Minsky then shut his eyes.

   "Why do you close your eyes?", Sussman asked his teacher.

   "So that the room will be empty."

   At that moment, Sussman was enlightened.








22558:
#====================== THE JARGON FILE ENDS HERE ======================#
    
Post 24 Apr 2010, 05:48
View user's profile Send private message Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko
hi.
coming along wasm.ru i found one more fpu topic...
fpu programming is interesting for me...
there below you can see some copy-(modify)-pasts...
no boasting, just a tute\help\etc...
edit
FUCK YOU EDEMKO IT"S A FORUM


When is fasm v2 expected:?
Code:
; enu   : Supports multiplication of any TBYTE value.
;         There will be st0,st1 busy on exit still provide st6,st7 free before you call this.
;         Flags(but CF) restored.
; byruua: Ìíîæåííÿ äîâ³ëüíèõ çíà÷åíü TBYTE.
;         Ïîâåðòàþ÷èñü, çàéíÿòèìè ëèøàþòüñÿ st0,st1; ïåðåä âèêëèêîì st6,st7 ìàþòü áóòè ïóñòèìè.
;         Ôëàæêè(îêð³ì CF) â³äíîâëþþòüñÿ.
;
; val#1 -> st0
; val#2 -> st1
;
; if val#1 = 0{
;   val#2    = val#1
;   flags.cf = 1
; }elseif val#2 = 0{
;   val#1    = val#2
;   flags.cf = 1
; }else{
;   st0      = normalized significand
;   st1      = exponent(2's power)
;   flags.cf = 0
; }
proc fmulx
        call     fxtractx
        jnc      @f
        fstp     st2
        ret
@@:     fxch     st2
        call     fxtractx
        jnc      @f
        fstp     st3
        fstp     st1
        ret
@@:     fmulp    st3,st0
        faddp    st1,st0
        fxch
        ret
endp




; enu   : Supports division of any TBYTE value.
;         There will be st0,st1 busy on exit still provide st6,st7 free before you call this.
;         Flags(but CF) restored.
; byruua: ijëèëêà äîâ³ëüíèõ çíà÷åíü TBYTE.
;         Ïîâåðòàþ÷èñü, çàéíÿòèìè ëèøàþòüñÿ st0,st1; ïåðåä âèêëèêîì st6,st7 ìàþòü áóòè ïóñòèìè.
;         Ôëàæêè(îêð³ì CF) â³äíîâëþþòüñÿ.
;
; dividend -> st0
; divisor  -> st1
;
; if dividend = 0{
;   divisor  = dividend
;   flags.cf = 1
; }elseif divisor = 0{
;   dividend = divisor
;   flags.cf = 1
; }else{
;   st0      = normalized significand
;   st1      = exponent(2's power)
;   flags.cf = 0
; }
proc fdivx
        call    fxtractx
        jnc     @f
        fstp    st2
        ret
@@:     fxch    st2
        call    fxtractx
        jnc     @f
        fstp    st3
        fstp    st1
        ret
@@:     fdivp   st3,st0
        fsubp   st1,st0
        fxch
        ret
endp




; enu   : fpu's FXTRACT prototype supporting any TBYTE values.
;         Before you call it be sure st7 is free.
;         Flags restored.
; byruua: Ñèìóëÿíò FXTRACT, ï³äòðèìóþ÷èé äîâ³ëüíå TBYTE çíà÷åííÿ.
;         Çâ³ëüí³òü st7 ïåðåä âèêëèêîì.
;         Ôëàæêè â³äíîâëþþòüñÿ.
;
; if st0[0..63] = 0{
;   st0      = st0 and $8000'0000000000000000
;   st1      = st0
;   flags.cf = 1
; }else{
;   st0      = normalized significand
;   st1      = exponent(2's power)
;   flags.cf = 0
; }
proc fxtractx uses eax ebx ecx edx
        clc
        pushfd
        sub     esp,10
        fstp    tbyte[esp]
        pop     ebx edx
        xor     eax,eax
        mov     ecx,eax
        bsr     ecx,edx
        jz      @f
        neg     ecx
        add     ecx,31
        sub     eax,ecx
        shld    edx,ebx,cl
        shl     ebx,cl
        jmp     .significand_found
@@:     cmp     ebx,ecx
        jnz     .non_zero_significand
        and     word[esp],$8000
        push    edx ebx
        fld     tbyte[esp]
        fld     st0
        inc     byte[esp+10]
        jmp     .zero_significand
.non_zero_significand:
        mov     edx,ebx
        mov     ebx,ecx
        bsr     ecx,edx
        neg     ecx
        add     ecx,31
        shl     edx,cl
        neg     ecx
        lea     eax,[eax-32+ecx]
.significand_found:
        mov     ecx,$7ffe0000
        pop     cx
        shl     cx,1
        rcr     ecx,1
        cmp     cx,1
        adc     cx,0
        ror     ecx,16
        push    cx edx ebx
        fld     tbyte[esp]
        shr     ecx,16
        lea     eax,[eax+ecx-$3fff]
        mov     [esp],eax
        fild    dword[esp]
        fxch
.zero_significand:
        add     esp,10
        popfd
        ret
endp
    


Last edited by edemko on 26 May 2010, 20:44; edited 1 time in total
Post 23 May 2010, 08:41
View user's profile Send private message Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko


Description: 80 BIT FLOATS - BASICS
Download
Filename: 80 BIT FLOATS - BASICS.ASM
Filesize: 3.3 KB
Downloaded: 92 Time(s)

Description: More detailed about reciprocals
Be sure you know fpu-format basics

Download
Filename: Jones on reciprocal multiplication.zip
Filesize: 14.76 KB
Downloaded: 63 Time(s)

Description: Web-script calculating reciprocals
You may know nothing just follow what the scrips says

Download
Filename: Magic Numbers(div by mul).rar
Filesize: 2.68 KB
Downloaded: 63 Time(s)



Last edited by edemko on 30 Aug 2010, 13:44; edited 5 times in total
Post 26 May 2010, 20:36
View user's profile Send private message Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko

Get me at www.code.google.com.
I'll be "fasmme".


Last edited by edemko on 17 Aug 2010, 21:10; edited 6 times in total
Post 26 Jun 2010, 00:19
View user's profile Send private message Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko
Post 08 Aug 2010, 11:39
View user's profile Send private message Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko
Image
Post 10 Aug 2010, 07:25
View user's profile Send private message Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko
Image
Post 10 Aug 2010, 19:52
View user's profile Send private message Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko
Image
Post 11 Aug 2010, 23:33
View user's profile Send private message Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko
Image
Post 12 Aug 2010, 00:56
View user's profile Send private message Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko
code located here
it cannot power negative numbers yet("hlt" instead), i must study how to divide 1 by 2^x
Tomasz, can you help me?
have a look at a ".solve_result" label
the proc must be tested
Ouadji, "jz .1.4142135623730950480;0.5=const" does not get highlighted, should it?
http://wasm.ru/forum/viewtopic.php?pid=392658#p392658
Post 13 Aug 2010, 20:10
View user's profile Send private message Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko
stop
f2xm1 gives approximate results
no division needed if you process [-1;0.5] & [0.5;0]
as a conclusion, fp_mul and fp_div used
updated code here:
http://wasm.ru/forum/viewtopic.php?pid=392875#p392875
comments in russian this time, Google will help you
Google makes awful ENU-RU translations but vice versa it is ok
looks to be finish
Post 15 Aug 2010, 18:00
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.