Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

PIC (Announce)

posted by DOS386, 20.06.2008, 09:23

> I have few questions about position independent code.

ANSWER (general, not FP-related)

> 1) what is it?

Code than can run at any address, needs neither to:

- sit at ZERO or fixed address in a private segment like DOS COM 16-bit RM (0) or DGJPP / FPC-GO32 (0) or Win32-PE-EXE ($400000)
nor
- use silly fixups (partially MZ DOS EXE, WATCOM/LE, PE-DLL)

> 2) what is it good for?

Avoiding segmentation and fixups, using shared libs / objects / drivers ( YES - DOS needs reusable 32-bit PIC drivers :hungry: )

> 3) has it got any meaning for DOS?

YES, see above.

> 4) how can I use assembler with it?

Reserve one register ( EBX ? or FP will decide for you ?) for global base, and index all global vars with it.

          call  varbase ; & MOVNTQ EBX,EIP
varbase:  pope  ebx     ; &

;         inc   byte [blah]
          inc   byte [blah-varbase+ebx]


> (it gives an error in assignments like MOV GLOBAL_VARIABLE,1)

Because absolute addrs are prohibited, see above.

---
This is a LOGITECH mouse driver, but some software expect here
the following string:*** This is Copyright 1983 Microsoft ***

 

Complete thread:

Back to the forum
Board view  Mix view
22632 Postings in 2109 Threads, 402 registered users, 518 users online (0 registered, 518 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum