Language learning Notes (14) port

Source: Internet
Author: User
The CPU can read data from three locations directly
1) Internal CPU registers
2) Memory
3) port

Port (referred to as hardware port 8086) Read and write two instructions: in and out
Access memory: mov ax,ds:[8]
Access port: in al,60h; reads a byte from the 60h port (0-65535)

In and out instructions, you can only use Ax or Al to hold the port's data

CMOS RAM chip: RAM memory containing a real-time clock and a 128 storage unit
0~DH storage time, rest storage System Information
70H: Address port, storing the address of the Cmosram unit to be accessed;
71H: A data port that holds data read from a selected Cmosram unit or data to which it is written


SHL: Logical Left SHIFT (* *): The last move out of a write CF, the lowest bit with 0 supplement
MOV al,01010001b
MOV cl,3
SHL Al,cl (move left 3-bit)
This is the value of CF: 0

SHR: Logical Right Shift (/2): The last-removed one is written to CF, the highest bit is supplemented with 0

Time information stored in RAM:
BCD Code
+30H can be converted directly to 10 binary




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.