Date: Sun, 22 Mar 1998 21:54:58 -0800 (PST) Message-Id: <199803230554.VAA24649@adit.ap.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: Nicolas Blais , djgpp AT delorie DOT com From: Nate Eldredge Subject: Re: Resolve a bet : Simple hello world sample at 640x480? Precedence: bulk At 06:36 3/22/1998 -0500, Nicolas Blais wrote: >Can anyone write me a full, simple c++ code hello world program running >at 640x480 without using allegro? My friend here says that it's >impossible and I bet with him 20$ that it's possible. As a proof, I >have to show him the code. So, anyone know how? There's nothing magic about Allegro. The Interrupt List can be a very useful source for stuff like this. #include #include void set_mode(int m) { __dpmi_regs r; r.h.ah = 0; r.h.al = m; __dpmi_int(0x10, &r); } void put_char(int ch, int color) { __dpmi_regs r; r.h.ah = 0x0e; r.h.al = ch; r.h.bh = 0; r.h.bl = color; __dpmi_int(0x10, &r); } int main(void) { char *p; set_mode(0x12); for (p = "Hello, world!"; *p; p++) put_char(*p, 1); getkey(); set_mode(0x3); } Nate Eldredge eldredge AT ap DOT net