Chris Revell’s Blog

In the world of Computer Games Programming

Archive for the ‘Console Development’ Category

X86/Mips Update

Posted by chrisrevell on October 28, 2009

Hi

i have done some more  research into the x86 assembly langues. i have found a example of the code that modern computers use.
X86

Ok that was some example X86 Code.
Now i am going to show you the disassembly of the Intro 3D assignment that i doing in C++

dis

You have the Machine Code on the left there with the instruction  set to the right of the machine code there.
what i though i would do was to show you some really early 8086 processor instruction and some MIPs tp see if there the same in some way.
                                                                                                                Mips Hello World Codemips helloworld->
x86 hello world

<-8086 X86 Code

The code looks really different but its good the compare the two Assembly codes.

 

 

 

 

 

I have been working Hard on Mips and doing my Programmes that have been set and are getting there, and understanding it as i do the programs that have been set and doing the reading.

Posted in Console Development | Leave a Comment »

Week 3 Mips

Posted by chrisrevell on October 19, 2009

welcome to the console Development blog.

This week in console development we were learning about Mips assembly language programming. its was an introduction assembly language.
this got me thinking because Mips is an old processor and not used anymore but you can still program in Mips, so i thought what is the assembly language of modern computers.

its X86 is which 32bit and 64 bit computer use, Intel, AMD and back in 1996 so did Cyrix.
The Intel 8086, 8088 which were the first processor to use the X86 assembly language, both 16 bits each. the 8086 processor  used the first operating system that the world used in the early 80′s it was DOS (disk operating system). DOS was design for the 8086 family.

there  is the X86 assembly language used in DOS.
“Hello world!” program for DOS

 .MODEL Small
    .STACK 100h
    .DATA
   msg db 'Hello, world!$'
    .CODE
  start:
   class="hiddenSpellError" pre="">mov ah, 09h
  lea dx, msg
  int 21h
   class="hiddenSpellError" pre="">mov ax,4C00h
  int 21h
  end start

X86 then moved to the 32 bit with the Intel386, AMD Am386 in 1985, till 2003. Windows Xp used the X86 but by then it was had been modified every time a new processor came out adding new features to X86 instruction set. in 2003 the new X86-64  which is 64 bit, the Pentium 4 Prescott used this assembly and it’s still used to day in the Intel Core 2 ,Core I7 and Intels Atom the world smallest processor but also still can be 32 bit as well of 64 bit.

to find out more click in the Link.
http://en.wikipedia.org/wiki/X86_assembly_language
http://en.wikipedia.org/wiki/X86_instruction_listings

just a quick bit on Bits and Memory address.
With 16bits memory addresses can directly access 64 KiB of byte-addressable memory, in two’s complement the possible values range from −32768 to 32767.

32 bits of memory address you can directly access 4GB which is 0 through 4,294,967,295 or using two’s complement  −2,147,483,648 through 2,147,483,647.

64 bit, i found this harder to work out and so i searched the internet and found on  one source you  class=”hiddenGrammarError” pre=”you “>have a maximum of 1 terabyte (1000GB, 1,099,511,627,776 bytes but i am not sure of this.http://www.webopedia.com/DidYouKnow/Computer_Science/2004/64_bit.asp

right ok  64bit thats what most people think of the max a computer go’s up to at the moment but i have found if there was a 128 bit process and how many memory address that would have. It is, wait for it 340,282,366,920,938,463,463,374,607,431,768,211,456 bytes (~340.3 undecillion bytes or 281,474,976,710,656 yobibytes ), which is 16 exbibytes. by the way this is impossible, given that amount greatly exceeds the total data stored on our planet. what is a yobibytes and exbibytes? just have a look on this site and it well tell you how big it is http://en.wikipedia.org/wiki/Orders_of_magnitude_(data).

Back to Mips
this week i have been working on the Mips programmes that has been set for me and they are something that i have always found hard to do. i have found the harder you work on them the easier it becomes. i just hope i have completed by Thursday.

Posted in Console Development | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.