Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[DEVEL] gcc plain 16 bit binaries
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
theRealMorpheu5
l33t
l33t


Joined: 26 Feb 2004
Posts: 841
Location: Vicenza, IT

PostPosted: Thu Jul 01, 2004 1:10 pm    Post subject: [DEVEL] gcc plain 16 bit binaries Reply with quote

GCC è in grado di produrre binari a 16 bit di quelli da massimo 64kB e roba simile? Ricordo che BCC lo faceva ma con GCC non c'è verso di trovare le opzioni. Sarà che non ci sono proprio? Illuminatemi voi.
Back to top
View user's profile Send private message
randomaze
Bodhisattva
Bodhisattva


Joined: 21 Oct 2003
Posts: 9985

PostPosted: Thu Jul 01, 2004 3:12 pm    Post subject: Re: [COMPILAZIONE] gcc plain 16 bit binaries Reply with quote

theRealMorpheu5 wrote:
GCC è in grado di produrre binari a 16 bit di quelli da massimo 64kB e roba simile? Ricordo che BCC lo faceva ma con GCC non c'è verso di trovare le opzioni. Sarà che non ci sono proprio? Illuminatemi voi.

Forse qui trovi informazioni: http://www.developerpit.com/compiler_options.html

Per curiosità, cosa te ne fai?

P.S. Il [TAG] corretto sarebbe [Devel] ;-)
_________________
Ciao da me!
Back to top
View user's profile Send private message
akiross
Veteran
Veteran


Joined: 02 Mar 2003
Posts: 1170
Location: Mostly on google.

PostPosted: Thu Jul 01, 2004 4:04 pm    Post subject: Reply with quote

Umm forse se fai un crosscompiler per i386... non vorrei dire una cagata, ma non aveva i registri a 16 bit?
(uff dai non ho voglia di cercare sul manuale :))

ciao!
_________________
Libera scienza in libero stato.
Horizon of Events
Back to top
View user's profile Send private message
motaboy
Retired Dev
Retired Dev


Joined: 15 Dec 2003
Posts: 1483

PostPosted: Thu Jul 01, 2004 4:29 pm    Post subject: Reply with quote

akiross wrote:
Umm forse se fai un crosscompiler per i386... non vorrei dire una cagata, ma non aveva i registri a 16 bit?
(uff dai non ho voglia di cercare sul manuale :))

ciao!


era il 286 che li aveva a 16 bit.
_________________
...
Back to top
View user's profile Send private message
theRealMorpheu5
l33t
l33t


Joined: 26 Feb 2004
Posts: 841
Location: Vicenza, IT

PostPosted: Fri Jul 02, 2004 4:59 pm    Post subject: Re: [COMPILAZIONE] gcc plain 16 bit binaries Reply with quote

randomaze wrote:
Forse qui trovi informazioni: http://www.developerpit.com/compiler_options.html

Ottimo link, grazie :)

randomaze wrote:
Per curiosità, cosa te ne fai?

Scrivere un driver per ext2 in assembly non è mica cosa semplice :D http://tofus.sf.net/ e poi volevo fare alcuni esperimenti con i COM in WinXP e siccome BCC non lo trovo più... :( e poi è noto che BCC è di un'inefficienza mostruosa :P

randomaze wrote:
P.S. Il [TAG] corretto sarebbe [Devel] ;-)

Grazie per l'avviso :D
Back to top
View user's profile Send private message
theRealMorpheu5
l33t
l33t


Joined: 26 Feb 2004
Posts: 841
Location: Vicenza, IT

PostPosted: Fri Jul 02, 2004 5:05 pm    Post subject: Reply with quote

akiross wrote:
Umm forse se fai un crosscompiler per i386... non vorrei dire una cagata, ma non aveva i registri a 16 bit?
ciao!

No, li aveva a 32 bit ma a dire la verità tutti i processori della famiglia x86 hanno di base i registri a 16 bit. :)

Questo non c'entra granché ma se io voglio riferirmi al byte alto ed al byte basso di un registro a 16 bit uso rispettivamente ah ed al. Ma se voglio fare lo stesso (ovviamente con la word alta e bassa) di un registro a 32 bit come devo fare? Non posso mica usare eah ed eal... almeno così mi pare... non dovrò mica fare

Code:
mov cl, 16
shr eax, cl
and eax, 0x00ff

per la parte alta usando poi ax e

Code:
and eax, 0x00ff

per la parte bassa sempre usando ax, poi. La seconda parte mi starebbe anche bene ma la prima... che fatica!!! Stiamo parlando di un processore CISC! Mioddio...

(vabbè, Mods, se mi volete splittare ben venga ma al massimo cambio il titolo del thread, si parla sempre di programmazione di bassa lega, no? :D)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum