ports & mem

Alexios Chouchoulas alexios at vennea.demon.co.uk
Thu Mar 27 19:18:33 EET 1997


On Thu, 27 Mar 1997, Giannis Tsakiris wrote:

> Geia sas,
>   kserei kaneis pws mporoume na kanoume read/write
> ta ports kai tin mnimi tou ypologisti me C katw apo linux?
> An kserei kaneis as me fwtisei kai mena...

  Gia ta ports, h katallhlh syzhthsh einai ekeinh peri LPT kai Linux. Gia
thn mnhmh, h katastash einai ligo diaforetikh:

  Proypothesh einai na eisai root prin kaneis otidhpote apo ta parakatw!
Gi'afto kai h SVGAlib pou xrhsimopoiei to idio kolpo apaitei setuid root.

  (a) Anoigeis to arxeio /dev/mem. Protimhse thn open(2) anti gia thn
fopen(3), giati h open den xrhsimopoiei buffers.

  (b) Kaneis seek (pali, xrhsimopoihse thn lseek(2) anti gia thn fseek(3))
sthn diefthinsh pou theleis. Px, an theleis na deis thn diefthinsh 0x000b8000
(den exoume segmented architecture pia! H diefthinsh == b800:0000 kai einai
h video RAM ths CGA/EGA/VGA se text mode).

  (c) Xrhsimopoieis thn read(2) h write(2) gia I/O.


  **** PROSOXH ****   MPORIS NA KANEIS *ZHMIA* AN DEN KSEREIS TI KANEIS!!!
                      APO TO NA XREIASTEI NA KANEIS REBOOT TO MHXANHMA SOU
                      MEXRI NA XREIASTEI NA KSANAEGKATASTHSEIS OLA SOU TA
                      LEITOURGIKA.


Alexios Chouchoulas          '88    ,88'   ,88'     alexios at vennea.demon.co.uk
The Unpronouncable One      ,o88oooo88ooooo88oo,              axc at dcs.ed.ac.uk

==================================================================
For help on using this list (linux-greek-users), send a message to
"majordomo at argeas.argos.hol.gr" with one line of text: "help".
For any problem send e-mail to owner-linux-greek-users
==================================================================



More information about the Linux-greek-users mailing list