TAILIEUCHUNG - Ebook PC Underground: Phần 1

Part 1 books Pc Underground give readers the knowledge overview: Assembly language the true language of programmers, assembly language in practice, mode X the "secret" to great graphics, split-screen and other hot effects,. document serve you specialized information technology and related industries. | Chapter 1 Assembly Language The True Language Of Programmers There are many high-level structured languages for programming today s PCs. Two popular examples are C and Pascal. However assembly language still has its place in today s programming world. Since it mimics the operations of the CPU at the machine level assembly language lets you get right to the heart of your PC. In fact there are some tasks that you can do only by using assembly language. While it s true that the Pascal language is capable enough to handle interrupts it can t be used to pass keyboard input to DOS for example. Since Pascal has no native way to do this you must still insert an assembler module routine to perform the function. Likewise you can t easily remove a high-level resident program from memory. Once again you have to write the routine in assembly language to do this. For many applications programming code must still be as compact as possible. For example in programming resident programs each kilobyte of RAM below the 640K boundary is vital. Programs written in high-level languages usually require a runtime library which may add several additional kilobytes to the size. Assembly language programs don t need these bulky library routines. However the most important advantage of assembly language is speed. Although high-level languages can be optimized for speed of execution even the best optimization cannot replace the experience of a programmer. Here s a simple example. Let s say that you want to initialize two variables in Pascal to a zero value. The compiler will generate the following assembly code xor ax ax mov varl ax xor ax ax mov var2 ax Here the Pascal compiler optimized the execution speed by using the XOR instruction to zero the ax register the fastest way to do this and storing this value as varl. However due to compiler s limitations the AX register was again zeroed before the second assignment although this was redundant. For truly time-critical tasks such as sprite .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.