x86 Assembly

Moderators: None (Apply to moderate this forum)
Number of threads: 4563
Number of posts: 16029

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Assembly and Ports Posted by pmcastillo on 15 Oct 2005 at 4:08 AM
This message was edited by pmcastillo at 2005-10-15 16:1:19

I tried to search Ray Duncan's "Advanced MSDOS Programming" (scanned version) on Yahoo! and Google, but I was unable to find it. I also made a research about the port 61h and this is what I got especially on Port 61h:

Ports by Wim Osterholt Said: http://mudlist.eorbit.net/~adam/pickey/ports.html
0061  -W  PPI Programmable Peripheral Interface 8255 (XT only)
		system control port (see #P061)


Clip-X Said: http://www.clipx.net/ng/interrupts_and_ports/ng29520.php
        Port 061  -  8255A-5 Port B

            1xxx xxxx  0=Keyboard enable, 1=Keyboard acknowledge
                       PS/2: Write: Reset Timer 0 Output Latch (IRQ0)
                             Read:  Parity check (1=parity check occured).
            x1xx xxxx  PS/2: Read:  1=Channel check has occured.
            xx1x xxxx  0=Enable parity error signals from expansion
                         ports
                       PS/2: Read:  Timer 2 Output. This bit indicates the
                                    condition of the timer/counter 2 output
                                    signal.
            xxx1 xxxx  0=RAM parity error enable
                       PS/2: Read:  This bit tiggles for each refresh request.
            xxxx 1xxx  Casette motor on/off (only old PCs)
                       PS/2: Enable Channel Check (0=enabled - set to 1,
                             during a power-on reset).
            xxxx x1xx  Undefined/Speed Switch
                         On some XT-clones, this bit is used to switch
                         between 4.77 MHz and 8MHz mode.
                         0=4.77 MHz, 1=8 MHz.
                       PS/2: Enable Parity Check (0=enabled - set to 1,
                             during a power-on reset).
            xxxx xx1x  1=Speaker enabled
            xxxx xxx1  Speaker input gate
                       1=8253 channel 2
                       0=Direct speaker control via bit 1


And Wow! Port 61h Isn't just for Internal Speakers!

QUESTIONS ABOUT PORTS:

(1) Correct me if I'm wrong, "The ports are defined by the chips used" and "Ports differ from every BIOS". So, if my computer, the Port 61h, is the speaker, then it maybe different in other computers.

(2) Correct me if I'm wrong, "Processors defines the INTERRUPTS, while the BIOS defines the PORTS".

(2) I visited: http://www.bioscentral.com/ , which BIOS is good to start learning with?

(3) Next, What is 8255? and 8253 counter timer? and MC146818 real time clock chip?

NEXT PROJECT:

My next project would be, multitasking in Assembly, coz I want my sound program to run on background.



Report
Re: Assembly and Ports Posted by angelusMortis on 17 Oct 2005 at 3:21 AM
This message was edited by angelusMortis at 2005-10-17 3:23:39

This message was edited by angelusMortis at 2005-10-17 3:22:28

: This message was edited by pmcastillo at 2005-10-15 16:1:19

: I tried to search Ray Duncan's "Advanced MSDOS Programming" (scanned version) on Yahoo! and Google, but I was unable to find it. I also made a research about the port 61h and this is what I got especially on Port 61h:
:
: Ports by Wim Osterholt Said: http://mudlist.eorbit.net/~adam/pickey/ports.html
:
: 0061  -W  PPI Programmable Peripheral Interface 8255 (XT only)
: 		system control port (see #P061)
: 

:
: Clip-X Said: http://www.clipx.net/ng/interrupts_and_ports/ng29520.php
:
:         Port 061  -  8255A-5 Port B
: 
:             1xxx xxxx  0=Keyboard enable, 1=Keyboard acknowledge
:                        PS/2: Write: Reset Timer 0 Output Latch (IRQ0)
:                              Read:  Parity check (1=parity check occured).
:             x1xx xxxx  PS/2: Read:  1=Channel check has occured.
:             xx1x xxxx  0=Enable parity error signals from expansion
:                          ports
:                        PS/2: Read:  Timer 2 Output. This bit indicates the
:                                     condition of the timer/counter 2 output
:                                     signal.
:             xxx1 xxxx  0=RAM parity error enable
:                        PS/2: Read:  This bit tiggles for each refresh request.
:             xxxx 1xxx  Casette motor on/off (only old PCs)
:                        PS/2: Enable Channel Check (0=enabled - set to 1,
:                              during a power-on reset).
:             xxxx x1xx  Undefined/Speed Switch
:                          On some XT-clones, this bit is used to switch
:                          between 4.77 MHz and 8MHz mode.
:                          0=4.77 MHz, 1=8 MHz.
:                        PS/2: Enable Parity Check (0=enabled - set to 1,
:                              during a power-on reset).
:             xxxx xx1x  1=Speaker enabled
:             xxxx xxx1  Speaker input gate
:                        1=8253 channel 2
:                        0=Direct speaker control via bit 1
: 

:
: And Wow! Port 61h Isn't just for Internal Speakers!
:
: QUESTIONS ABOUT PORTS:
:
: (1) Correct me if I'm wrong, "The ports are defined by the chips used" and "Ports differ from every BIOS". So, if my computer, the Port 61h, is the speaker, then it maybe different in other computers.
:
: (2) Correct me if I'm wrong, "Processors defines the INTERRUPTS, while the BIOS defines the PORTS".
:
: (2) I visited: http://www.bioscentral.com/ , which BIOS is good to start learning with?
:
: (3) Next, What is 8255? and 8253 counter timer? and MC146818 real time clock chip?
:
: NEXT PROJECT:
:
: My next project would be, multitasking in Assembly, coz I want my sound program to run on background.
:
:
:
:


(1) thats wrong. then portlists wouldnt exist. there is a standard.
(2) thats wrong either. Ralf Browns interruptlist would be completely useless then. you should search for it on google. he also had a portlist.
(3) hmm dont know, sorry.
(4) every pc needs a timer chip. you can access it through port 40h if i remember right. (see Ralf Browns portlist for more)




Report
Re: Assembly and Ports Posted by shaolin007 on 17 Oct 2005 at 5:27 AM
This message was edited by shaolin007 at 2005-10-17 5:28:39

: This message was edited by pmcastillo at 2005-10-15 16:1:19

: I tried to search Ray Duncan's "Advanced MSDOS Programming" (scanned version) on Yahoo! and Google, but I was unable to find it. I also made a research about the port 61h and this is what I got especially on Port 61h:


ftp://sac-ftp.gratex.sk/text/advdos.zip

Try that link.


: Ports by Wim Osterholt Said: http://mudlist.eorbit.net/~adam/pickey/ports.html
:
: 0061  -W  PPI Programmable Peripheral Interface 8255 (XT only)
: 		system control port (see #P061)
: 

:
: Clip-X Said: http://www.clipx.net/ng/interrupts_and_ports/ng29520.php
:
:         Port 061  -  8255A-5 Port B
: 
:             1xxx xxxx  0=Keyboard enable, 1=Keyboard acknowledge
:                        PS/2: Write: Reset Timer 0 Output Latch (IRQ0)
:                              Read:  Parity check (1=parity check occured).
:             x1xx xxxx  PS/2: Read:  1=Channel check has occured.
:             xx1x xxxx  0=Enable parity error signals from expansion
:                          ports
:                        PS/2: Read:  Timer 2 Output. This bit indicates the
:                                     condition of the timer/counter 2 output
:                                     signal.
:             xxx1 xxxx  0=RAM parity error enable
:                        PS/2: Read:  This bit tiggles for each refresh request.
:             xxxx 1xxx  Casette motor on/off (only old PCs)
:                        PS/2: Enable Channel Check (0=enabled - set to 1,
:                              during a power-on reset).
:             xxxx x1xx  Undefined/Speed Switch
:                          On some XT-clones, this bit is used to switch
:                          between 4.77 MHz and 8MHz mode.
:                          0=4.77 MHz, 1=8 MHz.
:                        PS/2: Enable Parity Check (0=enabled - set to 1,
:                              during a power-on reset).
:             xxxx xx1x  1=Speaker enabled
:             xxxx xxx1  Speaker input gate
:                        1=8253 channel 2
:                        0=Direct speaker control via bit 1
: 

:
: And Wow! Port 61h Isn't just for Internal Speakers!
:
: QUESTIONS ABOUT PORTS:
:
: (1) Correct me if I'm wrong, "The ports are defined by the chips used" and "Ports differ from every BIOS". So, if my computer, the Port 61h, is the speaker, then it maybe different in other computers.


It's standard on the PC


: (2) Correct me if I'm wrong, "Processors defines the INTERRUPTS, while the BIOS defines the PORTS".


No, interrupts are like subroutines in most cases and can be 'hooked'(replaced with yours) temporary. A jump table for the start location for this code is called the Interrupt Vector table. It starts at segment:offset 0000:0000 and is 4bytes wide. Ports are by which the CPU can access the embedded chips in the PC as well as other hardware.


: (2) I visited: http://www.bioscentral.com/ , which BIOS is good to start learning with?


You don't need to know the various BIOS's unless your going to make your own.


: (3) Next, What is 8255? and 8253 counter timer? and MC146818 real time clock chip?


8255= PPI Programmable Peripheral Interface
Norton guide has an explanation of this chip

8253=PIT Programmable Interval Timer
Norton guide has an explanation of this chip

These are embedded chips that are accessable via ports

MC146818=??? Must be a Motorola chip or something. It doesn't pertain to a PC though but I could be wrong.


: NEXT PROJECT:

: My next project would be, multitasking in Assembly, coz I want my sound program to run on background.




Report
Re: Assembly and Ports Posted by anthrax11 on 18 Oct 2005 at 1:59 AM
: This message was edited by shaolin007 at 2005-10-17 5:28:39

: : This message was edited by pmcastillo at 2005-10-15 16:1:19

: : I tried to search Ray Duncan's "Advanced MSDOS Programming" (scanned version) on Yahoo! and Google, but I was unable to find it. I also made a research about the port 61h and this is what I got especially on Port 61h:
:
:
: ftp://sac-ftp.gratex.sk/text/advdos.zip
:
: Try that link.
:

:
: : Ports by Wim Osterholt Said: http://mudlist.eorbit.net/~adam/pickey/ports.html
: :
: : 0061  -W  PPI Programmable Peripheral Interface 8255 (XT only)
: : 		system control port (see #P061)
: : 

: :
: : Clip-X Said: http://www.clipx.net/ng/interrupts_and_ports/ng29520.php
: :
: :         Port 061  -  8255A-5 Port B
: : 
: :             1xxx xxxx  0=Keyboard enable, 1=Keyboard acknowledge
: :                        PS/2: Write: Reset Timer 0 Output Latch (IRQ0)
: :                              Read:  Parity check (1=parity check occured).
: :             x1xx xxxx  PS/2: Read:  1=Channel check has occured.
: :             xx1x xxxx  0=Enable parity error signals from expansion
: :                          ports
: :                        PS/2: Read:  Timer 2 Output. This bit indicates the
: :                                     condition of the timer/counter 2 output
: :                                     signal.
: :             xxx1 xxxx  0=RAM parity error enable
: :                        PS/2: Read:  This bit tiggles for each refresh request.
: :             xxxx 1xxx  Casette motor on/off (only old PCs)
: :                        PS/2: Enable Channel Check (0=enabled - set to 1,
: :                              during a power-on reset).
: :             xxxx x1xx  Undefined/Speed Switch
: :                          On some XT-clones, this bit is used to switch
: :                          between 4.77 MHz and 8MHz mode.
: :                          0=4.77 MHz, 1=8 MHz.
: :                        PS/2: Enable Parity Check (0=enabled - set to 1,
: :                              during a power-on reset).
: :             xxxx xx1x  1=Speaker enabled
: :             xxxx xxx1  Speaker input gate
: :                        1=8253 channel 2
: :                        0=Direct speaker control via bit 1
: : 

: :
: : And Wow! Port 61h Isn't just for Internal Speakers!
: :
: : QUESTIONS ABOUT PORTS:
: :
: : (1) Correct me if I'm wrong, "The ports are defined by the chips used" and "Ports differ from every BIOS". So, if my computer, the Port 61h, is the speaker, then it maybe different in other computers.
:
:
: It's standard on the PC
:

:
: : (2) Correct me if I'm wrong, "Processors defines the INTERRUPTS, while the BIOS defines the PORTS".
:
:
: No, interrupts are like subroutines in most cases and can be 'hooked'(replaced with yours) temporary. A jump table for the start location for this code is called the Interrupt Vector table. It starts at segment:offset 0000:0000 and is 4bytes wide. Ports are by which the CPU can access the embedded chips in the PC as well as other hardware.
:

:
: : (2) I visited: http://www.bioscentral.com/ , which BIOS is good to start learning with?
:
:
: You don't need to know the various BIOS's unless your going to make your own.
:

:
: : (3) Next, What is 8255? and 8253 counter timer? and MC146818 real time clock chip?
:
:
: 8255= PPI Programmable Peripheral Interface
: Norton guide has an explanation of this chip
:
: 8253=PIT Programmable Interval Timer
: Norton guide has an explanation of this chip
:
: These are embedded chips that are accessable via ports
:
: MC146818=??? Must be a Motorola chip or something. It doesn't pertain to a PC though but I could be wrong.
:

:
: : NEXT PROJECT:
:
: : My next project would be, multitasking in Assembly, coz I want my sound program to run on background.
:
:

MC146818 is a CMOS chip that Motorola made in 1984. It is basically a clock that runs on the BIOS battery when the computer is not running. It is only used at boot-time, when the BIOS reads the system configuration from it. It is not used anymore, because it only has 8 bytes of memory to store the date and time so it's obsolete as of 00:00 01.01.2000 when it experienced a "rollover".

Report
Re: Assembly and Ports Posted by shaolin007 on 18 Oct 2005 at 5:18 AM

:
: MC146818 is a CMOS chip that Motorola made in 1984. It is basically a clock that runs on the BIOS battery when the computer is not running. It is only used at boot-time, when the BIOS reads the system configuration from it. It is not used anymore, because it only has 8 bytes of memory to store the date and time so it's obsolete as of 00:00 01.01.2000 when it experienced a "rollover".
:

:

Neat, didn't know that.


Report
Re: Assembly and Ports Posted by anthrax11 on 18 Oct 2005 at 5:40 AM
:
: :
: : MC146818 is a CMOS chip that Motorola made in 1984. It is basically a clock that runs on the BIOS battery when the computer is not running. It is only used at boot-time, when the BIOS reads the system configuration from it. It is not used anymore, because it only has 8 bytes of memory to store the date and time so it's obsolete as of 00:00 01.01.2000 when it experienced a "rollover".
: :

: :
:
: Neat, didn't know that.
:

:
:

Neither did I, but I Googled it .






 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.