home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng)
/
ProfitPress-MegaCDROM2.B6I
/
MAGAZINE
/
MISC
/
PCTV1N6.ZIP
/
INPUT.CPP
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
UTF-8
Wrap
Text File
|
1990-12-11
|
326 b
|
14 lines
// Listing 3. INPUT.CPP.
// A first cut at an inline assembly input() method
void statistician::input(int i)
{
asm {
mov si, word ptr [bp+4] // Point to object data with si
mov ax, word ptr [bp+6] // Load AX with i
add word ptr [si], ax // sum += i
inc word ptr [si+2] // n++
}
}