Thư viện tài liệu trực tuyến miễn phí dành cho các bạn học sinh, sinh viên
GETC (TRAP x20) Read a single character from KBD. ASCII copied in R0, R0[15:8] cleared. OUT (TRAP x21) Write R0[7:0] to CRT. PUTS (TRAP x22) Write a string to CRT. String address in R0. IN (TRAP x23) Print a prompt on the screen and read a single character from KBD. Character is echoed to CRT. ASCII copied to R0[7:0] and R0[15:8] cleared....
15 trang | Chia sẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 1057 | Lượt tải: 0
LEA R1,STR ;Load address of string LOOP LDR R0,R1,#0 ;get next char to R0 BRZ DONE ;string ends with 0 L2 LDI R3,CRTSR ;Loop until MON is ready BRzp L2 STI R0,CRTDR ;Write next character ADD R1,R1,#1 ; Set address to next char BR LOOP STR .STRINGZ "Char String" DONE HALT
13 trang | Chia sẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 1460 | Lượt tải: 0
Are directives to the assembler Assembler: the program that will translate human-readable assembly language into machine instructions. LC-2 Pseudo-Ops: .ORIG address Tells assembler where to locate the program in memory (starting address). .END Marks the end of the source program. .BLKW n Set aside a block of n words in memory. .FILL value St...
11 trang | Chia sẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 1379 | Lượt tải: 0
Arithmetic and Logic arithmetic: add, subtract, multiply, divide (the LC-2 only has add) logic: and, or, not, xor (the LC-2 only has and, not) LC-2: ADD, AND & NOT
36 trang | Chia sẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 1003 | Lượt tải: 0
Evaluate Address Computes the address of the memory location required to process the instruction (if any): e.g. the location from which to obtain a value. This is known as the Effective Address (EA). Fetch Operands Obtains the source operand(s) (if any) either from Registers or from memory, i.e. from the EA calculated in the previous step.
14 trang | Chia sẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 1028 | Lượt tải: 0
Other number representations Hexadecimal, octal BCD, EBCDIC Text representations ASCII: uses 7 bits to represent main Western characters & symbols, plus several “control codes” Unicode: 16 bit superset of ASCII providing representation of many different alphabets and specialized symbol sets.
33 trang | Chia sẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 1141 | Lượt tải: 0
Base 16 (hexadecimal) More a convenience for us humans than a true computer data type 0 to 9 represented as such 10, 11, 12, 13, 14, 15 represented by A, B, C, D, E, F 16 = 24: i.e. every hexadecimal digit can be represented by a 4-bit binary (unsigned) and vice-versa. Example
17 trang | Chia sẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 947 | Lượt tải: 0
Universal Computational Devices Given enough time and memory, all computers are capable of computing exactly the same things (irrespective of speed, size or cost). Turing’s Thesis: every computation can be performed by some “Turing Machine” - a theoretical universal computational device (not mathematically proven, but taken to be true). Proble...
13 trang | Chia sẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 940 | Lượt tải: 0
Măc̣ dù kỹ thuâṭ sƣ̉ duṇ g thƣ viêṇ liên kết đôṇ g theo kiểu này kh ông làm tăng hiêụ quả sƣ̉ duṇ g của hàm Rectangle nhƣng nó laị là môṭ cách hiêụ quả trong trƣờ ng hơp̣ mà chúng ta không biết tên của thƣ viêṇ cho tớ i khi chƣơng trình chaỵ (chẳng haṇ đối vớ i hàm AlphaBlend chẳng haṇ ). Đoaṇ mã trên sƣ̉...
96 trang | Chia sẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 1121 | Lượt tải: 0
những sinh viên chứa (không cần chính xác) thông tin tìm kiếm. Ví dụ nếu tìm kiếm theo Họ và tên và nhập vào là Minh thì kết quả là: Mã lớp Mã sinh viên Họ và tên Ngày sinh ĐTBTL 13A 2014000001 Nguyễn Minh Hoàng 02/12/1996 3.4 13C 2014000004 Trần Văn Minh 02/10/1995 3.2 - Cho phép tìm kiếm với thông tin không cần xác định trường thông tin.
5 trang | Chia sẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 947 | Lượt tải: 0