China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-22 14:53
中国DOS联盟论坛 » 网络日志(Blog) » 【Billunique】Personal Blog - Drops Make an Ocean View 40,501 Replies 59
Floor 16 Posted 2007-04-08 07:51 ·  中国 北京 雅虎中国
中级用户
★★
菜鸟总动员
Credits 259
Posts 112
Joined 2006-08-28 15:53
19-year member
UID 61454
Status Offline
The memory (RAM) on a PC can be divided into 4 categories:

1. Traditional Memory

  The address space of traditional memory is between 0KB ~ 640KB. Regardless of the type of CPU used, from 8086 to 486, traditional memory is necessary. It is the most important stage for MS-DOS to run programs.

2. Reserved Memory

  Since MS-DOS was originally an operating system designed for 8086/8088 CPUs, it can use at most 1MB of memory. The first 640KB of this 1MB memory is the aforementioned traditional memory; as for the remaining 384KB, it is reserved for BIOS ROM, ROM on hardware interface cards (such as VGA cards, hard disk control cards), and VidelBuffer.

  The address space of reserved memory (Reserved Memory) is between 640KB ~ 1024KB, which is an address space reserved for external use. Reserved memory should not actually be called memory, but should be called reserved memory space, because no physical RAM is installed in this space.

  In the 384KB address space of reserved memory, in addition to being used by video buffers, BIOS ROM, and other hardware expansion cards, there are still many gaps. The paging (paging) capability of 386/486 can be used to map extended memory over to fill these gaps, because these gaps are still within the 1MB range of DOS. (Previously, because there was no installed memory, it could not be used. Now, after configuring memory with paging technology, it becomes memory available for DOS - I don't really understand this sentence) We call the memory above the 640KB address "Upper Memory (Upper Memory)", and upper memory may be divided into several blocks due to the installation of external cards, so it is also called Upper Memory Blocks ( Upper Memory Blocks ) for short UMB.

3. Extended Memory

  Extended memory (Extended Memory) refers to the memory after 1024KB. For our memory RAM, after deducting 640KB of traditional memory, the rest is all extended memory.

  Although all RAM is arranged together from the computer motherboard, in fact, the RAM beyond the 640KB traditional memory is inserted in the space after 1MB, skipping the 384KB reserved memory. (There is no RAM in the interval of 640KB ~ 1024KB)

  Since MS-DOS originally could only manage memory within 1MB, and there is no physical RAM in the reserved memory, only traditional memory is the "jurisdiction" of MS-DOS. It is necessary to use the protected mode of 286/386/486 to use the memory above the 1024KB address.

  (1) HMA
  
  The first 64KB (1024 ~ 1088KB) of extended memory after 1MB is called HMA (High Memory Area).

  For CPUs above 80286, since the address lines exceed 20, it can cleverly enable DOS to obtain an additional 64KB of use space. The key is whether the CPU turns on the A20 address line (set to ON). So on computers above 286, setting the A20 address to ON uniformly can obtain this additional 64KB of memory, which is where HMA is located.

  (2) XMM  
  
  As mentioned earlier, MS-DOS cannot manage extended memory. In order to effectively use extended memory, the program should uniformly use extended memory through a "manager". Such a manager is called an extended memory manager (XMM, extended Memory Manager).

  (3) XMS (extended Memory Specification)

  In order to have a common "management rule", Lotus/Intel/Microsoft/AST four companies put forward the so-called XMS rule. The Himen.sys program provided by MS-DOS is an extended memory manager that conforms to this rule.

4. Expanded Memory

  The memory expanded by inserting memory into the expanded memory slot is called "Expanded Memory". It is not linearly arranged after 1MB like extended memory, but is independent. Lotus/Intel/Mircosoft three companies jointly put forward the so-called LIM/EMS (~Specification) specification. According to the LIMEMS regulations, the program must access data in expanded memory through page frame (Page Frame) mapping. Unlike other memories that can directly access data according to the address, so the speed is slower. (I have no concept of this piece at all, could it be that the memory in the second slot now belongs to expanded memory? #_#)
  

[ Last edited by Billunique on 2007-4-9 at 08:01 AM ]
★①②③④⑤⑥⑦⑧⑨⑩㈠㈡㈢㈣㈤㈥㈦㈧㈨㈩ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫ【●】→←↑↓▲
Floor 17 Posted 2007-04-09 08:33 ·  中国 北京 雅虎中国
中级用户
★★
菜鸟总动员
Credits 259
Posts 112
Joined 2006-08-28 15:53
19-year member
UID 61454
Status Offline
About Format (actually, there are still many basic things to understand):

  The main purpose of the Format command is to format the disk to establish the structure of tracks and sectors, and it will create a boot sector (Boot Sector), root directory (Root), and FAT table (File Allocation Table) on the disk to manage files on the disk.

  When early versions of Format were used for formatting, they would completely erase the data in the sectors. But starting from DOS version 5.0, Format uses the "non-destructive" method by default.

  It does not completely erase the original data on the disk. In fact, after non-destructive formatting, the original data still exists on the disk, and only the boot sector, root directory, and FAT are updated. Since the boot sector, root directory, and FAT record the usage status of the hard disk, after the update, it seems like a brand new empty disk on the surface, and nothing is seen when using DIR, but in fact, the original data of the hard disk still exists. This is the real reason why we can recover disk data!

  Non-destructive formatting will create a "hidden" file in the disk, called a "Mirror image file", to save the original boot sector, FAT, root directory, and other "disk system-related" data for use when using Unformat.

  After creating the hidden image file, Format starts to create a new boot sector, blank FAT, and root directory, while only checking (Verify) other sectors without changing the content of the sectors. Since the original boot sector, FAT, and root directory are all saved, and all files and subdirectories are not changed, after non-destructive formatting, if the Unformat command is run immediately, the data can be completely recovered. So "non-destructive" formatting is also "recoverable" formatting.

  When Format finds that there is not enough free space on the original disk to create the Mirror image file, that is, to store the data of the boot sector, FAT, and root directory (Basically for floppy disks, ^_^), it will ask the user whether to run destructive formatting.

  Format is non-destructive by default. If the user needs destructive formatting by themselves, they can specify the /U parameter for Format.

  If the /S parameter is used, when Format completes non-destructive formatting and needs to write system files to the floppy disk, it will avoid the original data in the floppy disk. If there are too many original data, so that the system files will definitely overwrite some original data sectors after writing, then a message will be displayed asking the user whether to still write the system files. (WARNING: This disk cannot be unformatted if system files are transferred.Proceed with system transfer anyway(Y/N)?)

  Note: If non-destructive formatting is done twice in a row, Unformat cannot restore it to the original state, because the data saved in Mirror during the second time will be the "current" one, that is, the record when the hard disk state is unused. In this case, after recovery, an empty FAT and root directory will be obtained.

  If the /Q parameter is used, the step of "checking sectors" will be skipped. In other words, it is a "simplified" non-destructive formatting, so the running speed is very fast. (If you are sure that the hard disk is okay, you can definitely add this parameter to speed up the formatting speed)

  If the /Q/U combination is used, the original boot sector, FAT, and root directory will not be saved, but will be rebuilt directly, while other sectors are neither destroyed nor checked. In other words, it is a "simplified" destructive formatting.

[ Last edited by Billunique on 2007-4-10 at 03:07 AM ]
★①②③④⑤⑥⑦⑧⑨⑩㈠㈡㈢㈣㈤㈥㈦㈧㈨㈩ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫ【●】→←↑↓▲
Floor 18 Posted 2007-04-10 06:27 ·  中国 北京 雅虎中国
中级用户
★★
菜鸟总动员
Credits 259
Posts 112
Joined 2006-08-28 15:53
19-year member
UID 61454
Status Offline
Address Representation of 80x86:

  When a program is running, the memory space distribution can be divided into: program area, data area, and stack area. The program area stores program codes for the CPU to read and run, the data area stores processed data, and the stack area serves as a buffer for data and return addresses during program interrupts or subroutine calls.

  Early 8088 CPU internal registers were only 16-bit. These registers are AX, BX, CX, DX, BP, IP, SP, SI, DI, CS, DS, ES, SS, and FLAG, a total of 14. Later 80x86 series, although there have been more improvements, still maintain the basic mode of 8088.

  Among the first 14 register groups, there is a register called the Instruction Pointer (abbreviated as IP). When the program is running, IP will point to the starting address of the program, and then the CPU will read the instruction from the address pointed to by IP. Then IP automatically points to the address of the next instruction to continue running the next instruction.

  IP is only 16-bit, which can only define 2^16, that is, 65536 bytes. How can it define a 1M-byte memory address? Doesn't IP still lack 4 bits to define a 1MB memory address? How does 80x86 make up for these 4 bits? To solve this problem, 80x86 uses two 16-bit registers to combine to form a 20-bit address. 80x86 has 4 16-bit registers called segment registers (Segment Pointer): CS, DS, ES, SS. Cooperating the CS indicator with IP can form 20 bits to define a 1MB space.

  That is to say, 80x86 sees the value of the segment indicator as the last 16 bits of the 20 addressing bits, that is, b4 to b19 (counting from b0), and sees the value of IP as the first 16 bits of the 20-bit address, that is, b0 to b15. Adding these two registers with a shift of 4 bits establishes a 20-bit bit array. The CPU sends this 20 bits to the address line to define a 1M address.

  Taking the address 986895 as an example, its hexadecimal representation is F0F0F. The segment indicator can be set to F0F0, and IP can be set to 000F. Adding them with a shift of 4 bits (that is, 1 hexadecimal digit) results in F0F0F.

  An address is represented by 5 hexadecimal digits, but in order to indicate the composition of its segment indicator and IP, you can directly list the values of these two registers and separate them with colons. The Debug program represents the address in this way. The value of the segment indicator CS is called the segment address, and the value of the program indicator IP is called the intra-segment address.

  Although the combination of F0F0:0000F forms the address F0F0F, F0F0F is not necessarily composed of F0F0:000F. It may be composed of F000:0F0F or F001:0EFF, etc. in many ways. Unless the true contents of the registers are found out, it is impossible to assert what kind of two values an address is composed of.

[ Last edited by Billunique on 2007-4-26 at 03:44 AM ]
★①②③④⑤⑥⑦⑧⑨⑩㈠㈡㈢㈣㈤㈥㈦㈧㈨㈩ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫ【●】→←↑↓▲
Floor 19 Posted 2007-04-10 07:05 ·  中国 北京 雅虎中国
中级用户
★★
菜鸟总动员
Credits 259
Posts 112
Joined 2006-08-28 15:53
19-year member
UID 61454
Status Offline
Debug Taste (Wait to study after having a good book):

A (Assembly)

Directly merge 8086/8088 mnemonics into memory.
This command creates executable machine code from assembly language statements. So the values are all in hexadecimal format, and these values must be entered as one to four characters. Specify prefix mnemonics before the referenced opcodes.

C (Compare)

Compare two parts of memory.

D (Dump)
  
Display the contents of a range of memory addresses.

E (Type)

Enter data into the specified address in memory.
You can enter data in hexadecimal or ASCII format. Any previously stored data in the specified location is completely lost.

F (Fill)

Fill the addresses in the specified memory area with the specified value.
You can specify data represented in hexadecimal or ASCII format. Any previously stored data in the specified location will be lost.

G (Go)

Run the program currently in memory.

H (Hexadecimal)

Perform hexadecimal operations on the specified two parameters.

I (Input)

Read and display a byte value from the specified port.

L (Load)

Load the contents of a file or a specific disk sector into memory.

M (Move)

Copy the contents of one memory block to another memory block.

N (Name)

Specify the name of the executable file for the Debug I or W command, or specify the parameters of the executable file being debugged.

O (Output)

Send a byte value to the specified port.

P (Proceed)

Execute loops, repeated string instructions, software interrupts or subroutines; or trace through any other instructions.

Q (Quit)

Stop the Debug session without saving the currently tested file.

R (Register)

Display or change the contents of one or more CPU registers.

S (Search)

Search for a pattern of one or more byte values in a range of addresses.

T (Trace)

Execute an instruction and display the contents of all registers, the status of all flags, and the decoded form of the executed instruction.

U (Unassemble)

Unassemble bytes and display the corresponding original statement, including the address and byte value. The unassembled code looks like a list of assembled files.

W (Write)

Write a file or a specific partition to a disk.

XA (Allocate Extended Memory)

Allocate the specified number of pages of extended memory.
To use extended memory, an extended memory device driver that complies with the Lotus/Intel/Microsoft Extended Memory Specification version 4.0 must be installed.

XD (Free Extended Memory)

Free the handle pointing to extended memory.

XM (Map Extended Memory Page)

Map the extended memory logical page belonging to the specified handle to the physical page of extended memory.

XS (Display Extended Memory Status)

Display information about the status of extended memory.

  (In a fog, endure it)

[ Last edited by Billunique on 2007-4-10 at 07:29 AM ]
Attachments
Debugh.jpg
★①②③④⑤⑥⑦⑧⑨⑩㈠㈡㈢㈣㈤㈥㈦㈧㈨㈩ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫ【●】→←↑↓▲
Floor 20 Posted 2007-04-10 10:10 ·  中国 北京 雅虎中国
中级用户
★★
菜鸟总动员
Credits 259
Posts 112
Joined 2006-08-28 15:53
19-year member
UID 61454
Status Offline
Network Management Commands (Some):

Remote Login -- Telnet

Remote login means using the local computer as a terminal on a remote host. Currently, it is the most widely used BBS system. Simply put, all commands typed on the local computer are not executed on the local machine but on the remote host. It's like the keyboard and monitor of the local computer are directly connected to the remote host. In this way, you can directly manage the server from a remote terminal, bringing great convenience to network management and testing.

To use Telnet remote login, the remote host must first start the Telnet service and set up corresponding parameters and environment variables; besides, Telnet is a program based on the TCP/IP protocol, so the local computer must first configure the TCP/IP protocol.

Display and Modify Local ARP List -- ARP

ARP (Address Resolution Protocol) is a protocol responsible for resolving IP addresses into MAC addresses. For high-level applications in the network, communication between network hosts is completed by IP addresses, but at the bottom layer of the TCP/IP protocol, the exchange between hosts is located by MAC addresses. Each host with a network card has an ARP table that stores mapping records of IP to MAC in the same network. The ARP table is not static; it is updated approximately every two minutes, and such records are called dynamic records. There is also a static record, that is, the records in the table do not change until the TCP/IP protocol is restarted.

-a Queries TCP/IP to display current ARP entries. A specific IP can be specified.
-d Deletes the entry specified by a specific IP.
-s Adds an entry in the ARP cache, associating the IP address with the physical address. The entry is automatically deleted from the cache after the "lease" expires.

Before adding a static record in ARP, there must be a MAC addressing process. When a TCP/IP packet is to be sent, it will first check whether there is a record of the IP in the local ARP table. If there is, it is directly converted into the MAC corresponding to the IP; if not, an ARP Request broadcast packet will be sent to query the MAC address from the other party. This broadcast packet will be received by all hosts in the same subnet. But only the host with the same IP will receive and answer an ARP APPLY packet, which has the corresponding IP and MAC information, so that the MAC address of the corresponding host can be found.

The records in the ARP table are generally dynamic and are refreshed approximately every two minutes. If there are frequent visits to IPs locally, such as gateways, servers, routers, etc., in order to reduce the sending of ARP Request broadcast packets, static records can be created in the ARP table.

Display and Modify Local Routing Table Command -- Route

Most hosts reside on a segment connected to only one router, so there is no problem of which router to use to send packets to a remote computer. The IP address of this router is the default gateway for all computers on this segment. However, when there are two or more routers on the network, you don't have to rely only on the default gateway. Some remote IP addresses can be passed through a specific router, and others can be passed through another router. At this time, corresponding routing information is needed, and this information is stored in the routing table. Each host and each router is equipped with its own unique routing table. Most routers use special routing protocols to exchange and dynamically update the routing tables between routers. But in some cases, items must be manually added to the routing tables on routers and hosts. Then the Route command is used, which is used to display, manually add, and modify routing table items. (Specifically, let's not care for now, we'll talk about it later. After all, we are mainly learning DOS now, not NT improved commands.)

[ Last edited by Billunique on 2007-4-10 at 10:47 AM ]
★①②③④⑤⑥⑦⑧⑨⑩㈠㈡㈢㈣㈤㈥㈦㈧㈨㈩ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫ【●】→←↑↓▲
Floor 21 Posted 2007-04-11 04:57 ·  中国 北京 雅虎中国
中级用户
★★
菜鸟总动员
Credits 259
Posts 112
Joined 2006-08-28 15:53
19-year member
UID 61454
Status Offline
Network test commands (some):

Command to display NetBIOS protocol statistics -- Nbtstat

The Nbtstat command is used to display NetBIOS statistics, NetBIOS name tables, and NetBIOS name caches based on the TCP/IP protocol for the local computer and remote computers. Nbtstat can refresh the NetBIOS name cache and registered Windows Internet Name Service (WINS) names.

NetBIOS (Network Basic Input Output System) is an API that programs on a local area network (LAN) can use. Almost all LAN computers work based on NetBIOS. NetBIOS provides a unified set of commands for programs to request low-level services, which are required for managing names, performing sessions, and sending data packets between network nodes.

Display network connection information -- Netstat

In server and network management, it is necessary to frequently check the ports opened by the server and all current connections to understand the network status at any time. At this time, the Netstat command is used. This command allows administrators to easily check whether the computer system services are normal and whether "hackers" have left backdoors, Trojans, etc. Netstat is also a real-time intrusion detection tool that can check at any time whether there are abnormal connections.

The Netstat command is used to display active TCP connections, computer listening ports, Ethernet statistics, IP routing tables, IPv4 statistics (for IP, ICMP, TCP, and UDP protocols), and IPv6 statistics (for IPv6, ICMPv6 over IPv6 TCP, and UDP over IPv6 protocols).

Packet trace diagnosis -- Tracert

When a data packet is transmitted from the local computer to the destination through multiple gateways, it finds a specific path to transmit. Each time a data packet is transmitted, it cannot be guaranteed or assumed that it always follows a unique path. Then how to know the path that the sent data packet has passed through? At this time, the Tracert command is used. It is also one of the applications built into TCP/IP, which can perform corresponding domain name conversion for IP addresses or URLs. Tracert is generally used to detect the faulty section, so as to facilitate finding and eliminating faults.

The Tracert diagnostic utility sends Internet Control Message Protocol (ICMP) echo packets with different Time to Live (TTL) values to the target to determine the route used to reach the target. The TTL must be decremented by at least 1 before forwarding the TTL on the packet, and each router on the path must be passed, so TTL is an effective hop count. When the TTL on the packet reaches 0, the router should send an "ICMP timed out" message back to the source system. Tracert first sends an echo packet with TTL of 1, and increments the TTL by 1 in each subsequent transmission until the target responds or the TTL reaches the maximum value, thereby determining the route. The route is determined by checking the "ICMP timed out" message returned by the intermediate router. However, some routers pass down packets with expired TTL values, and Tracert cannot see them. (Don't understand, say again)
★①②③④⑤⑥⑦⑧⑨⑩㈠㈡㈢㈣㈤㈥㈦㈧㈨㈩ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫ【●】→←↑↓▲
Floor 22 Posted 2007-04-11 08:35 ·  中国 北京 雅虎中国
中级用户
★★
菜鸟总动员
Credits 259
Posts 112
Joined 2006-08-28 15:53
19-year member
UID 61454
Status Offline
Explanation of the Boot.ini File (There are implications in the basic things):

  The content of the Boot.ini file can be divided into two parts: and . The need not be discussed; let's take a look at the . For example, there is such a ----

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect
multi(0)disk(0)rdist(0)partition(2)WINNT="Microsoft Windows 2000 Server" /fastdetect

  The text within the English quotes is the prompt text displayed in the boot menu for selecting the operating system. As for the preceding part involving ARC naming, it is a dynamic method for identifying devices in x86 or RISC computers. The first part of the ARC naming is used to identify the hardware adapter card/disk controller, which has two options: SCSI and Multi. Multi indicates a non-SCSI hard disk or a SCSI hard disk accessed by the SCSI BIOS, while SCSI indicates a SCSI hard disk for which the SCSI BIOS is disabled. (x) is the hardware adapter card number; Disk(x) indicates the SCSI bus number. If the hardware adapter card is Multi, its correct representation method is disk(0); rdisk(x) indicates the hard disk number. If the hardware adapter card is SCSI, this value is ignored; partition(x) indicates the hard disk partition number.

Meaning of switches:

  /fastdetect: Makes the system not check the serial port and parallel port.
  /safeboot: Safe boot, the system only starts HKLM\System\Current ControlSet.
  /basevideo: Starts in standard VGA mode. This mode is mainly used when the display driver fails.
  /BurnMemory=: Makes NT use a specified amount less of known memory. If /burnmemory=64, 64M of memory is not used.
  /Bootlog: Writes the log to %System%\NTbtlog.txt.
  /MaxMem:n: Specifies the maximum amount of memory that NT can use. This switch is useful if a memory chip is bad.
  /Numproc=n: Only allows the first n system processors to work.
  /OneCPU: Uses only one processor in a multi-processor system.
  /NoGUIBoot: Does not load the VGA program, so the boot process and the blue screen information on failure will not be displayed.
  /SOS: Displays the name of the driver when loading the driver. It is better to use when the system cannot boot due to driver problems.
  /Win95DOS: On a system with 3 systems: DOS, Win9x, and NT, let NTLDR directly call the DOS boot file bootsect.dos.
  /Win95: In the above situation, let NTLDR directly call the Win9x boot file bootsect.w40. (?)

※--------------------------------------------------------------------------------------------------Personally, I think the role of the above switches is more significant.

  /baudrate: Indicates the baud rate used for scheduling. If the user does not set it, the default 9600 is used, and 19200 is used for the cable modem. =_=
  /debug: Loads the scheduler when starting NT. It can be activated at any time, and it is more appropriate to use it when an error can occur again.
  /CrashDebug: The scheduler starts when NT starts, which is only useful when there is a kernel error. This option is very useful if the system often has unexpected errors.
  /debugport=comx: Specifies the port used for scheduling, where x is the port number.
  /Nodebug: Does not use scheduling information.
  /HAL=<hal>: Allows the user not to use the default HAL.
  /NoserialMice=: Prohibits detecting the serial mouse on the specific COM. This option is useful if the user has a non-mouse device connected to the COM port.
  /Year=: Uses the specified year.
  /PCLlock: Prevents NT from allocating IO/IRQ resources for multiple PCI settings and enables BIOS settings.
  

[ Last edited by Billunique on 2007-4-12 at 03:24 AM ]
★①②③④⑤⑥⑦⑧⑨⑩㈠㈡㈢㈣㈤㈥㈦㈧㈨㈩ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫ【●】→←↑↓▲
Floor 23 Posted 2007-04-12 03:47 ·  中国 北京 雅虎中国
中级用户
★★
菜鸟总动员
Credits 259
Posts 112
Joined 2006-08-28 15:53
19-year member
UID 61454
Status Offline
Explanation of the Msdos.sys file:


WinDir=C:\Windows       --System directory
WinBootDir=C:\Windows     --System startup directory
HostWinBootDrv=C        --System partition

  Some settings in the block of the Msdos.sys file in Win98 (the default value in each option is written first).

Autoscan=1/0        --Whether to run Scandisk next time after an abnormal shutdown
BootDelay=2/?        --Waiting time (seconds) before the hotkey is pressed during startup
BootGUI=1/0        --Whether to enter the Windows interface during startup (otherwise, it is the DOS interface)
BootKeys=1/0        --Whether the hotkey is valid during startup         
BootMenu=0/1        --Whether to display the startup menu during startup (otherwise, you need to press the hotkey to display it)
BootMenuDefault=1/?    --Default item (that is, the item where the cursor is located) when the startup menu is displayed
BootMulti=0/1        --Whether to support multi-boot with the old version of DOS (there is an old version of DOS startup file, and this disk must be FAT16)
BootWarn=1/0        --Whether to prompt to enter safe mode next time after the startup process fails
BootWin=1/0         --Whether to automatically load the old version of DOS during startup (?)
DblSpace=0/1        --Whether to load DblSpace.bin during startup
DoubleBuffer=0/1       --Whether to start double buffer support
DrvSpace=0/1        --Whether to load DrvSpace.bin during startup
LoadTop=1/0        --Whether to load part of the system core into the upper memory during startup
Logo=1/0          --Whether to display the "blue sky and white clouds" during startup
Winver=4.10.1998      --Windows version


[ Last edited by Billunique on 2007-4-12 at 04:20 AM ]
★①②③④⑤⑥⑦⑧⑨⑩㈠㈡㈢㈣㈤㈥㈦㈧㈨㈩ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫ【●】→←↑↓▲
Floor 24 Posted 2007-04-12 04:19 ·  中国 北京 雅虎中国
中级用户
★★
菜鸟总动员
Credits 259
Posts 112
Joined 2006-08-28 15:53
19-year member
UID 61454
Status Offline
This book is roughly here. I'll return it tomorrow.

What's the next book? I don't have an idea now. It feels quite messy to study, and there's no process of gradual progress.
★①②③④⑤⑥⑦⑧⑨⑩㈠㈡㈢㈣㈤㈥㈦㈧㈨㈩ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫ【●】→←↑↓▲
Floor 25 Posted 2007-04-14 06:38 ·  中国 北京 雅虎中国
中级用户
★★
菜鸟总动员
Credits 259
Posts 112
Joined 2006-08-28 15:53
19-year member
UID 61454
Status Offline
### ★ "Essentials of Computer Architecture" (By Douglas E. Commer - Tsinghua University Press) Random Talk

  *●* Computers following the von Neumann architecture store both programs and data in memory. In this case, for each instruction, the processor must perform at least one memory access. If the data items specified by one or more operations are in memory, the processor has to access memory multiple times to read or store values. System architects use the term "Von Neumann bottleneck" to describe this situation. To avoid this bottleneck, techniques such as restricting most operands to registers are employed.

  
  Link:

  1. In summary, there are 3 important design ideas in the von Neumann structure:

  (1) A computer should be composed of 5 major parts: arithmetic unit, controller, memory, input device, and output device, each with certain functions.
  (2) Represent data and instructions in binary form, and binary is the basic language of the computer.
  (3) Programs are pre-stored in memory, enabling the computer to automatically fetch program instructions from memory and execute them during operation.

  2. An instruction is an operation recognizable by hardware. An operation is a single instruction, and the set of operations is called an instruction set or instruction system. Each time re-entering a fetch-execute cycle means the processor is executing another instruction.

 *●*Fetch-Execute Cycle

  How does a programmable processor read and execute a program step by step? Although specific details vary, all programmable processors follow the same basic paradigm. This basic mechanism is called the fetch-execute cycle.

  To implement the fetch-execute cycle, the processor automatically goes through a program, executing step by step. That is, each programmable processor repeatedly performs two basic functions. That is:

  Repeat forever {
         Fetch: Fetch the next step of the program from where the program is stored.
         Execute: Execute this step of the program.
  }

  What happens after the processor executes the last step of the program? - The processor hardware is not designed to stop; it keeps continuing the fetch-execute cycle. Of course, a processor cannot stop permanently (unless you turn off the power) - in normal operation, the processor continuously executes one instruction after another.

  In some cases, the program uses a loop for delay. For example, a microcontroller may need to wait for a sensor signal to determine if an external condition is met before continuing execution. However, the processor does not stop to wait for this sensor but includes a loop in the program to continuously test the sensor. So, from the hardware perspective, the fetch-execute cycle continues.

  The concept of the endless fetch-execute has a direct result on program design: software must be designed so that the processor always has the next step to execute. For dedicated systems such as microcontrollers controlling physical devices, the program consists of an infinite loop - when it finishes the last step of the program, the processor starts from the first step again. For general-purpose computers, there is always an operating system. The operating system can load an application program into memory and then direct the processor to run this application. To keep the fetch-execute cycle running, when the application is completed, the operating system must agree to take back control. When no application is running, the operating system enters a loop, waiting for input (such as keyboard or mouse input).

  The summary is as follows: Because the processor runs the fetch-execute cycle infinitely, a system must be designed to ensure that there is always the next step to execute. In dedicated systems, the same program is repeatedly executed; in general-purpose systems, when no application is running, the operating system is always running.

 *●* Once the processor finishes executing an instruction, it automatically moves to the next unit in memory and fetches the next instruction. To execute the fetch-execute cycle, the processor uses a special register called the program counter - some system architects do not call it the program counter but the instruction pointer, and the two terms are completely the same.

  When a fetch-execute cycle starts, the program counter holds the address of the next instruction to be executed. After an instruction is fetched, the program counter is immediately updated to the address of the next instruction. The update of the program counter during each fetch-execute cycle means that the processor automatically goes through successive instructions in memory. The following shows how the fetch-execute cycle goes through successive instructions.

  Assign the program counter an initial address of the program.
  Repeat forever {
       Fetch: Obtain the next step of the program from the unit given by the program counter.
       Set the internal address register A to the address after the just-fetched instruction.
       Execute: Execute this step of the program.
       Copy the content of address register A to the program counter.
  }

  This algorithm makes us understand how a transfer instruction works. An absolute branch indicates the address of the next instruction to be executed. Usually, an absolute transfer instruction is called a jump instruction. The jump instruction loads the address given by the operand field into the internal register A described in the above algorithm during the execution phase. At the end of the fetch-execute cycle, the hardware copies this value to the program counter, indicating that the next instruction will be fetched at this address. (Relative transfer is put aside for now.)

[ Last edited by Billunique on 2007-6-6 at 11:11 AM ]
★①②③④⑤⑥⑦⑧⑨⑩㈠㈡㈢㈣㈤㈥㈦㈧㈨㈩ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫ【●】→←↑↓▲
Floor 26 Posted 2007-04-14 08:22 ·  中国 北京 雅虎中国
中级用户
★★
菜鸟总动员
Credits 259
Posts 112
Joined 2006-08-28 15:53
19-year member
UID 61454
Status Offline
*●*Part of the Reason for CPU Complexity:

It has to act as several important roles == running the operating system, running applications, controlling external I/O devices, starting and stopping the computer, managing memory, etc. No single instruction set is ideal for all these roles, so a CPU often contains multiple instruction sets.

Protection and Privilege == Modern computers contain a protection system that can give certain subsystems higher privileges. For example, it can prevent an application from directly interacting with an I/O device; it can prevent the code of the operating system from being intentionally or unintentionally tampered with.

Hardware Priority == The CPU adopts a priority scheme, giving certain computing tasks higher priority than others. For example, an I/O device has a higher running priority than an application -- if the CPU is running a program and an I/O device needs service, the CPU will stop running the application and handle this device at this moment.

 *●*The CPU uses the mode of execution. In some CPUs, the characteristics of each mode are quite different, and it can be considered that the CPU is several separate and different hardware subsystems, and the mode determines which hardware subsystem is currently in use.

The following are some typical characteristics controlled by the CPU execution mode. When the mode changes, the characteristics of the CPU also change significantly:

~An effective subset of the instruction set ~The size of the data stack
~The range of memory that can be accessed  ~Available functional components  ~Amount of privilege

 *●*Privilege and Protection:
The execution mode is related to those mechanisms of the CPU used for privilege and protection. That is, the current mode partially specifies the privilege level of the CPU. For example, when the CPU is serving an I/O device, it allows the device driver software in the operating system to interact with the device and perform control functions. But other random applications must be prevented from unintentionally or maliciously sending commands to the hardware or performing control functions. So the operating system changes the mode and lowers the privilege before executing the application. When running in a mode with lower privilege, the CPU does not allow direct control of the I/O device (that is, the CPU treats a privileged operation as an invalid instruction).

 *●*Multi-level Protection:

How many levels of privilege are needed? What kind of operations should each level allow? This topic has been discussed by hardware system designers and operating system designers for many years. CPUs that provide no protection have been created, and CPUs that provide eight levels of protection have been created, each with more privileges. The idea of protection is to use the minimum necessary level of privilege at any time to help prevent problems from occurring. The summary is as follows:

Using a protection scheme to limit allowed operations, the CPU can detect attempts to perform unauthorized operations.

The following figure shows the concept of two levels of privilege.


Although there is no protection scheme that can satisfy all CPUs, designers generally recognize a minimum scheme for the CPU running applications:

A CPU running an application needs at least two levels of protection: the operating system must run with full privilege, and the application runs with limited privilege.

[ Last edited by Billunique on 2007-6-6 at 11:11 AM ]
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
lxmxn +10 2007-04-19 09:54
★①②③④⑤⑥⑦⑧⑨⑩㈠㈡㈢㈣㈤㈥㈦㈧㈨㈩ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫ【●】→←↑↓▲
Floor 27 Posted 2007-04-19 09:54 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
19-year member
UID 59080
Status Offline
I'm here to learn, and by the way, I'll give it a thumbs up.
Floor 28 Posted 2007-04-20 03:54 ·  中国 北京 雅虎中国
中级用户
★★
菜鸟总动员
Credits 259
Posts 112
Joined 2006-08-28 15:53
19-year member
UID 61454
Status Offline
Thanks for lxmxn's presence and guidance . These days I'm a bit busy and don't know what to record. But I'll persevere~ Keep learning to the end!
★①②③④⑤⑥⑦⑧⑨⑩㈠㈡㈢㈣㈤㈥㈦㈧㈨㈩ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫ【●】→←↑↓▲
Floor 29 Posted 2007-04-24 07:54 ·  中国 北京 雅虎中国
中级用户
★★
菜鸟总动员
Credits 259
Posts 112
Joined 2006-08-28 15:53
19-year member
UID 61454
Status Offline
★"Principles of Microcomputer and Interface Technology" (Publishing House of Electronics Industry) Random Talk

  ☆Conversion of Decimal Numbers to Base R Numbers

  (1) Conversion of Integer Parts. Common methods include division by R to get remainders and descending power method.

   Convert the decimal number 1223 to its equivalent hexadecimal number using division by R to get remainders.

  Specific practice: Divide by 16 to get remainders, first get the lower digit, successively get higher digits, and continue until the quotient is 0, then obtain the corresponding hexadecimal number in reverse order.

  
   Convert the decimal number 83 to its equivalent binary number using the descending power method.

  Specific practice: (For a given decimal number M)

  ¥ Find the maximum value of N among R^N such that R^N <= M, then set 1 in the corresponding digit of base R, otherwise set 0;
  ¥ Assign M = M - R^N, if M = 0, end; otherwise repeat the first step.


83 - 64 = 19  (64 = 2^6, 0|1|0|0|0|0|0|0)
19 - 16 = 3   (16 = 2^4, 0|1|0|1|0|0|0|0)
3 - 2 = 1    (2 = 2^1, 0|1|0|1|0|0|1|0)
1 - 1 = 0    (1 = 2^0, 0|1|0|1|0|0|1|1)

So, (83)D = (01010011)B


  (2) Conversion of Decimal Parts

  The method to convert a decimal fraction to a base R fraction is: multiply by R to get integers, first get the higher digit, successively get lower digits. If a decimal fraction cannot be represented by a finite base R fraction, take several digits as an approximation as needed. For a decimal number with both integer and decimal parts, when converting, just convert the integer part and decimal part respectively, then connect them with a decimal point.

   Convert the decimal fraction 0.5625 to its equivalent binary number.

Fractional part    Integer part
2 × 0.5625     1    (Higher digit)
2 × 0.1250     0
2 × 0.2500     0
2 × 0.5000     1    (Lower digit)
  0.0000

So, (0.5625)D = (0.1001)B


[ Last edited by Billunique on 2007-6-6 at 11:13 AM ]
★①②③④⑤⑥⑦⑧⑨⑩㈠㈡㈢㈣㈤㈥㈦㈧㈨㈩ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫ【●】→←↑↓▲
Floor 30 Posted 2007-04-25 08:36 ·  中国 北京 雅虎中国
中级用户
★★
菜鸟总动员
Credits 259
Posts 112
Joined 2006-08-28 15:53
19-year member
UID 61454
Status Offline
### ☆Encoding of Chinese Characters

In the internal part of a computer, any information is represented by binary code (including letters, numbers, symbols, and Chinese characters). Generally, a computer relies on an input device to convert the characters or Chinese characters to be input into a certain format of binary code before it can be received. The output is the opposite process. The computer first sends the binary code of the characters or Chinese characters to be output to an output device, and then the output device processes the output. In short, whether it is input or output, encoding of text characters and Chinese characters must be carried out.

Western texts are alphabetic texts. With a limited number of letters (such as 26 in English, 32 in Russian), all Western text information can be spelled out. Therefore, only encoding of a limited number of letters is needed for Western texts to input all Western text information into the computer. However, it is different for Chinese character information. Chinese characters are pictographic characters, and each Chinese character is a square graphic. For a computer to process Chinese character information, it is necessary to encode the numerous Chinese characters and establish a character set containing thousands of Chinese characters.

The so-called national standard code is the abbreviation of "National Standard Information Interchange Chinese Character Coding Basic Character Set". This is a national standard promulgated by the State Bureau of Standards of China in 1981 to adapt to the processing of Chinese character information by computers, with the number GB2312-80. This standard collects 6,763 Chinese characters and 682 general characters, serial numbers, numbers, Latin letters, Greek letters, Pinyin symbols, etc., in the form of a 94×94 two-dimensional code table, totaling 7,745 graphic characters. This standard can contain up to 8,836 graphic characters, suitable for information exchange between general Chinese character processing, Chinese character communication and other systems. (In 2000, GB18030-2000 was promulgated, expanding the character set and adding support for minority scripts)

There are distinctions between internal code and external code in Chinese character encoding. The external code is actually the input encoding of Chinese characters, such as area code, national standard code, full Pinyin code, double Pinyin code, Wubi method code, Zheng code, etc. The internal code is the code for Chinese character information storage, exchange, retrieval, etc. in the computer system. The Chinese character internal code is represented by two bytes without duplicate codes.

Area Code: The code represented by the serial numbers of the row and column positions of each Chinese character in the two-dimensional code table, with a total of 4 digits, simply called the area code. The first two digits are the row number (also called the area number), and the last two digits are the column number (also called the position number). For example, the area code of "啊" is 1601, indicating that "啊" is located at position 01 in area 16 in the two-dimensional code table.

National Standard Code: The national standard code is the double seven-bit binary code obtained by adding 32 to each of the area number and the position number. For example, the national standard code of "啊" is 4833. The national standard code is used for the transmission and exchange of Chinese characters between different Chinese character systems and can also be used as the input encoding of Chinese characters.

Internal Code: The Chinese character national standard code is a double seven-bit binary code. If it is used as the machine internal code, it will be confused with the machine internal code ASCII code of English characters. Therefore, the highest bit of each byte of the two-byte national standard code is set to "1" to distinguish it from the highest bit of ASCII code being "0". In this way, the machine internal code of Chinese characters is formed. Simply put, machine internal code = national standard code + 8080H (that is, 1000000010000000)

[ Last edited by Billunique on 2007-4-26 at 12:34 AM ]
★①②③④⑤⑥⑦⑧⑨⑩㈠㈡㈢㈣㈤㈥㈦㈧㈨㈩ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫ【●】→←↑↓▲
Forum Jump: