Re: [mu ANNOUNCE] muLinux v9r1b + tips

From: Mike Johnson ([email protected])
Date: Mon May 08 2000 - 03:48:21 CEST


how big (bytes) is poke? wow you could use that like an ncurses-like
library.. it would be neat to see how small it is! I could see using it to
build simple menu based UI and stats/info.. does it do ANSI? (that would
open quite a bit of opportunity.

I wrote a database in Delphi that uses memory mapped files and mutexes
(record level locking) to form a multi-user database(see my company/family
business site : www.bigattichouse.com) .. it would be interesting to apply a
similar idea using poke to simulate a database using shell scripts...

definitely useful my friend...

Mike

----- Original Message -----
From: "Michele Andreoli" <[email protected]>
To: <[email protected]>
Sent: Sunday, May 07, 2000 8:06 AM
Subject: [mu ANNOUNCE] muLinux v9r1b + tips

> Hi, friends.
>
> I uploaded release 9r1b. Only mulinux.tgz and DOSTOOLS.zip changed.
>
> I added in DOSTOOLS newly the boot.bat script, able to start muLinux
> a the top of DOS.
>
> I added also a new command/server: vcm, virtual console monitor. It is
> only a 'poke' demo. This simple script is able to poke string at
> fixed location in the video-ram. It shows, in the top-right corner of
console,
> time/date, free memory, uptime and received/trasmitted packets
> across Ethernet interface. It is enabled via Setup/server.
> I think, vcm is a pedagogical demo and can inspire other similar tricks
> to someone, for example games, virus, etc...
>
> Unfortunately, it isn't able to change colors using 'poke': a colored
> monitor should looks better. If someone find a workaround, please
> let me know.
>
> The new 'poke' is able to insert strings, not only single bytes.
> Example:
>
> # poke -c /dev/vc1 10 'ciao' 50 'mondo'
>
> put the string 'ciao' in the file /dev/vc1 (the console #1), starting
> from byte 10th, and the string 'mondo', starting from byte 50th.
>
> 2 cent Tip 1
> -------------
>
> Obvioulsy, a command like:
>
> # poke /dev/hda1 1 128 2 35 3 255 ....
>
> may reprogram the Master Boot Sector of the primary hard-disk.
>
> 2 cent Tip 2
> ------------
>
> Does someone on the list remember old BASIC listing, with DATA functions,
> able to move code around the RAM? Well, now you can realize similar
> things using a single shell program:
>
> Using 'poke':
> #!/bin/sh
> PGM="1 128 2 35 ... (other 4-5000 pairs)"
> poke /tmp/cmd $PGM
> exec /tmp/cmd
>
> Using hexd (the new one, from A. Costa)
>
> #!/bin/sh
> PGM="6162002e737472746162002e736873747274 ...."
> echo $PGM | hexd -d > /tmp/cmd
> exec /tmp/cmd
>
> How to fill PGM? Easy:
>
> # PGM=`cat /bin/my_command | hexd -x`
>
> 2 cent Tip 3 : programs uncompressed on-the-fly
> ----------------------------------------
> prepare PGM
> # PGM=`cat /bin/my_command | hexd -x | gzip -c`
>
> #!/bin/sh
> PGM="6162002e737472746162002e736873747274 ...."
> echo $PGM | gzip -dc | hexd -d > /tmp/cmd
> chmod +x /tmp/cmd
> exec /tmp/cmd
>
> Mmmm ... there is some limit on the variable storage in ash?
>
> Michele
> --
> I'd like to conclude with a positive statement, but I can't
> remember any. Would two negative ones do? -- Woody Allen
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



This archive was generated by hypermail 2.1.6 : Sat Feb 08 2003 - 15:27:14 CET