Thread: 8086/8087 chip programming

  1. #1
    Banned
    Join Date
    Oct 2014
    Location
    Home
    Posts
    135

    Lightbulb 8086/8087 chip programming

    Well I'm really into the archaic humblest chip of all that runs only 4.77 mhz haha No, seriously... I like that chip. Back in the old days it would take like hours to boot up to the basic OS. These days it is a joke of the worst kind. However I like to tinker in the golden days. Anyways, before that they had light-bulbs for a computer. When a light-bulb would light-up it would be considered a 1. When it would go out it would be a zero. And you calculated results that way. These days you liken that to a computer dot. Wow. So much goes into displays and that is another thing I'm into. 3 primary colors of various intensities makes up billions of other shades of colors. That is amazing. I had forgotten almost that in art class. Let's see... anyways my main point is not to get into a main point. It is more for exploring the long forgotten language of assembly programming. This is one step above machine language that only contains all numbers. Oh well I tried machine language and I'm just maybe going to get that picky later on. haha It is just cool how you can put numbers in and the computer interpretes it for the chip at its native level. Okay! Ah. I guess we'll start there for now.

  2. #2
    Banned
    Join Date
    Oct 2014
    Location
    Home
    Posts
    135
    Okay so for those who are happy to stick with the old timers like I am then continue reading. Otherwise your other options are to follow another thread that talks about more modern stuffs. I just went back to review my C and assembly language programming. Like someone on this board and my father once said "Use your brains". Don't use the books unless you have to. However I have to review it a two or three times to get it through my mind. Like I said there is no point being made. These are just talk about assembly language back in the old days combined with tidbits about computer tech in general.

  3. #3
    Banned
    Join Date
    Oct 2014
    Location
    Home
    Posts
    135
    Okay so back in the old days say approximately 1987... they had assembly language for the old timers. Amazingly if you look hard enough you'll find softwares for the ancient buried machines that looks like arcade games. Don't get me wrong... pictures that are lifelike are great however it just doesn't come close to the classics. Well enough of that and let's get down to business. Actually we want to keep it in-love. We want to be doing the tasks that makes us love living life to the fullest. We for me it is programming first. So I should start with my very first language that I fell in-love with: assembly language.

    mov al, 100

    that's one of the commands that you could see for assembly language. There are potentially 255 more commands.

  4. #4
    Banned
    Join Date
    Oct 2014
    Location
    Home
    Posts
    135
    Anyways just some oddball facts. Did you know even back in 1987 the 8086/8087 can perform MIPS? MIPS stands for Millions of Instructions Per Second. It is true. I did an assembly program that just counted. And it could produce MIPS if I am not mistaken. In fact seeing modern 32-bit Windows XP allows 16-bit era programs to run natively that increases by many folds.

  5. #5
    Banned
    Join Date
    Oct 2014
    Location
    Home
    Posts
    135
    MIPS

    Here is a program that counts 1000000 (one million instructions at least) per second even on a 25 mhz dead system. In 32 bit Microsoft Windows XP the program does it almost immediately. Anyone who has an assembly language viewer can see it counts from 0 to 1000000

  6. #6
    Banned
    Join Date
    Oct 2014
    Location
    Home
    Posts
    135
    Well assembly is easy however I mean like that. I like logic and the ancient languages. Actually I hate machine language where you have to put in all numbers! My worst programming language is probably C++ eew. But somehow I got a highscore in Pascal. I'm average in C though.

  7. #7
    Banned
    Join Date
    Oct 2014
    Location
    Home
    Posts
    135
    Okay so here we go. The 8086/8087 chip has a graphics mode. If you really wanted to program a video game then this is where it starts.

    Code:
    p8086
    model small
    dataseg
    udataseg
    codeseg
    startupcode
    
    mov al, 19
    mov ah, 0
    int 10h
    
    mov al, 14
    mov cx, 155
    mov dx, 100
    mov ah, 0ch
    int 10h
    
    mov ah, 0
    int 16h
    
    mov al, 3
    mov ah, 0
    int 10h
    
    ret
    
    end
    Well in short the program above switches to the graphics screen then puts a color dot there and shortly exits.

    Thank you GOD I will being doing something along this line for the rest of my life form now on! I've been doing this on and off for the last two years however I think I'm going to specialize on it further if possible#

  8. #8
    Banned
    Join Date
    Oct 2014
    Location
    Home
    Posts
    135
    Jesus Christ! If you really look you will notice that the 8086/8087 chip deals with interrupts to accomplish all its tasks. When you see "int" it means activate interrupt.

  9. #9
    Banned
    Join Date
    Oct 2014
    Location
    Home
    Posts
    135
    I know. I know you hate DOSBox 0.74. Well, I'm giving you the free link and better get it while it lasts for free: DOSBox, an x86 emulator with DOS

    Once you have DOSBox 0.74 you are almost ready to program the above exampel yourself;

    You just need an assembler.

    Goto: VETUSWARE.COM - the biggest free abandonware collection in the universe and get TASM

    Try to find TASM version 2.5 or preferably 4.1

    Other versions of TASM may work but there's no guarantee

  10. #10
    Banned
    Join Date
    Oct 2014
    Location
    Home
    Posts
    135
    Notice it says x86 emulator. It just means 8086/8087 emulator too built-in.

  11. #11
    Banned
    Join Date
    Oct 2014
    Location
    Home
    Posts
    135
    Okay this is the easy part. If you have Windows you can use Notepad (my favorite) to enter you assembly language in. Notepad should be available from Microsoft Windows XP to Microsoft Windows 10. However any plain text editor should do. Just make sure it doesn't insert any weird characters without your approval like the one in Mac text editor does.

  12. #12
    Banned
    Join Date
    Oct 2014
    Location
    Home
    Posts
    135
    I forgot to mention you need a "tlink.exe" too from VETUSWARE.COM - the biggest free abandonware collection in the universe if they have it.

  13. #13
    Banned
    Join Date
    Oct 2014
    Location
    Home
    Posts
    135
    Now for our simple purpose we will attempt to run the above program that puts a dot on the screen. So try to enter the program in the text editor of your choice. Some people prefer to use the text editor that they paid for. That is fine so long that no extra character is in there besides what is supposed to be typed. Anyways...

  14. #14
    Banned
    Join Date
    Oct 2014
    Location
    Home
    Posts
    135
    Jesus! The way you compile is you type:

    TASM filename.ext

    filename is your program name
    ext is the extension you save it
    Windows usually default to txt

  15. #15
    Banned
    Join Date
    Oct 2014
    Location
    Home
    Posts
    135
    ...then you have to link it with:

    TLINK filename.ext

    once you TASM and TLINK you should now have filename.exe

    All you have to do is type:

    filename

    (without the .ext) and it should run in DOSBox 0.74 the 8086 chip emulator! Whah Lah You have your first dot on the screen and are on your way... Congrats

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 8086 instruction question
    By gaurav9991 in forum Tech Board
    Replies: 3
    Last Post: 11-30-2010, 12:47 PM
  2. How to store any value in Memory (inside chip) ?
    By burhanahmad in forum C Programming
    Replies: 3
    Last Post: 04-29-2005, 09:48 AM
  3. Mind-Reading chip for the disabled
    By JaWiB in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 04-04-2005, 12:44 PM
  4. 8086 processor
    By planet_abhi in forum Tech Board
    Replies: 4
    Last Post: 05-03-2003, 09:39 AM
  5. 8086 Isa
    By doubleanti in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 04-22-2003, 12:10 PM

Tags for this Thread