🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #98

Re: programs executing in video ram

#98
From: Harald Milz
Date: Mon, 02 Nov 1992 16:49
27 lines
1963 bytes
In article <JT.92Oct30050356@fizyk1.fuw.edu.pl>, jt@fuw.edu.pl (Jerzy Tarasiuk) writes:
|> >>>>> On Fri, 23 Oct 1992 21:00:56 GMT, d90pethe@odalix.ida.liu.se (Terminator) said:
|> T> Here is a program (written in DEBUG) which loads a piece of code into video
|> T> memory and runs it. Can anyone think of a use for such a program?
|> T> (this one just makes pretty stripes on the screen)
|> (a code to put program in video RAM removed)
|> T> cs:120  rep  movsb		; this self-replicating piece of code is
|> T> 	mov  cx,5		;  what gets run in video ram.
|> T> Note that this program goes into an infinite loop that can only be exited
|> T> by rebooting.
|> 
|> What about instruction prefetching by CPU ? Some CPU's can get several
|> bytes ahead, taking what was there before executing rep movsb.
|> 8088 can get 6 bytes or so, but 80286 about 16 (I am not sure).

I used this method often when loading memory contents from A to B during the
initialization phase in DOS device drivers, or, when the copy process ran
the danger of being overwritten by copied memory contents. The only problem
can arise when the video-mode is to be changed in the meantime which
always resets video memory contents. 
It's rather slow, though, but that didn't matter in the described cases.
-- 

|Dipl.-Ing. Harald Milz                   |    EMail:		hm@ix.de |
|iX - Multiuser Multitasking Magazin      |    FAX:    +49 511 547 47 33 |
|D-3000 Hannover 61, Helstorfer Str. 7    |    Tel.:   +49 511 547 47 66 |
Technical Details
Message-ID: <1992Nov2.164958.16657@opus40.ix.de>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!Germany.EU.net!rz.uni-hildesheim.de!ix.de!hm
References: <1992Oct23.210056.3272@ida.liu.se> <JT.92Oct30050356@fizyk1.fuw.edu.pl>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!Germany.EU.net!rz.uni-hildesheim.de!ix.de!hm
From: hm@opus40.ix.de (Harald Milz)
Subject: Re: programs executing in video ram
Message-ID: <1992Nov2.164958.16657@opus40.ix.de>
Sender: hm@opus40.ix.de (Harald Milz)
Organization: iX-Redaktion
References: <1992Oct23.210056.3272@ida.liu.se> <JT.92Oct30050356@fizyk1.fuw.edu.pl>
Date: Mon, 2 Nov 1992 16:49:58 GMT
Lines: 27