TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: VIKTOR OSADCHUK
from: STEVEN READ
date: 1997-08-06 23:47:00
subject: Re: reset

Victor,
Correction and how to fix it are below.
On 07-30-97 (12:00) VIKTOR OSADCHUK wrote
VO> #include 
VO> #include 
VO> void main()
VO> {
VO>  cout <<"\n" << "Reboot your computer ?"
VO>       <<"\n";
VO> char a=getch();
VO> switch (a) {
VO>  case 'Y':
VO>  case 'y':
VO>        asm    {
VO>             mov ax,0
VO>             mov es,ax
VO>             mov ax,1234h
VO>             mov di,0472h
VO>             mov es:di,ax   /* Error: Memory reference expected */
                mov es:[di],ax          /* error gone */
VO>             int 19h
VO>               }
VO>             break;
VO>  default:
VO>             break;
VO>            }
VO> }
VO> === Cut ===
VO> Borland C++ 3.01. Error : Memory reference expected !!! Why ?!
From Borland's online help ( press f1 key  :-) )
----------------------------------------------------------------------
  Memory reference expected
   The built-in assembler requires a memory reference.
You probably forgot to put square brackets around an index register
operand.
----------------------------------------------------------------------
Steve, in western New York state (USA)
---
 * QMPro 1.53 * steven.read@pcohio.com
--- InterEcho 1.19
---------------
* Origin: PC-Ohio PCBoard * Cleveland, OH * 216-381-3320 (1:157/200)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.