Thiết kế và lập trình hệ thống - Chương21

13 310 0
Thiết kế và lập trình hệ thống - Chương21

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Thiết kế và lập trình hệ thống - Chương

Systems Design & Programming 80x86 Assembly III CMPE 3101 (Mar. 1, 2002)UMBCU M B CUNIVERSITY OF MARYLAND BALTIMORE COUNTY1 9 6 6 Systems Design & Programming 80x86 Assembly III CMPE 3102 (Mar. 1, 2002)UMBCU M B CUNIVERSITY OF MARYLAND BALTIMORE COUNTY1 9 6 6Stack Instructions Systems Design & Programming 80x86 Assembly III CMPE 3103 (Mar. 1, 2002)UMBCU M B CUNIVERSITY OF MARYLAND BALTIMORE COUNTY1 9 6 6Stack InstructionsStack Segpush eax0 7 F EAHALesp = esp-4is performedbefore thePUSH000007FA isnew value0 0 1 0+SegBasePagingTrans.FFFF6AB36 A B 3F F F F0 0 0 0 Systems Design & Programming 80x86 Assembly III CMPE 3104 (Mar. 1, 2002)UMBCU M B CUNIVERSITY OF MARYLAND BALTIMORE COUNTY1 9 6 6Address Loading Instructionslds edi, LIST ;Loads edi and ds.lea eax,[ebx+ecx*4+100] ;Loads eax with computed address.lfs esi, DATA1 ;Loads esi and fs. Systems Design & Programming 80x86 Assembly III CMPE 3105 (Mar. 1, 2002)UMBCU M B CUNIVERSITY OF MARYLAND BALTIMORE COUNTY1 9 6 6Address Loading Instructionsmov ebx, edi;Move the contents of edi into ebx.lea ebx, [edi];Load the contents of edi into ebx.mov ebx, [edi];Load the value at edi into ebx. Systems Design & Programming 80x86 Assembly III CMPE 3106 (Mar. 1, 2002)UMBCU M B CUNIVERSITY OF MARYLAND BALTIMORE COUNTY1 9 6 6String Operations Systems Design & Programming 80x86 Assembly III CMPE 3107 (Mar. 1, 2002)UMBCU M B CUNIVERSITY OF MARYLAND BALTIMORE COUNTY1 9 6 6String Operationslodsb;al=ds:[esi]; esi=esi+/-1lodsd;eax=ds:[esi]; esi=esi+/-4es lodsb DATA1;Override ds.stosb;es:[edi]=al; edi=edi+/-1stosd;es:[edi]=eax; edi=edi+/-4 Systems Design & Programming 80x86 Assembly III CMPE 3108 (Mar. 1, 2002)UMBCU M B CUNIVERSITY OF MARYLAND BALTIMORE COUNTY1 9 6 6String OperationslodswData Seg1 0 0 0A032A 0 3 2+/-20 0 1 0+SegBasePagingTrans.0 0 0 0 Systems Design & Programming 80x86 Assembly III CMPE 3109 (Mar. 1, 2002)UMBCU M B CUNIVERSITY OF MARYLAND BALTIMORE COUNTY1 9 6 6String Operationsmov edi, 0;Offset 0.mov ecx, 25*80;Load count.mov eax, 0720H;Load value to write.rep stoswmovsb;es:[edi]=ds:[esi]; edi+/-=1; esi+/-=1movsd;es:[edi]=ds:[esi]; edi+/-=4; esi+/-=4 Systems Design & Programming 80x86 Assembly III CMPE 31010 (Mar. 1, 2002)UMBCU M B CUNIVERSITY OF MARYLAND BALTIMORE COUNTY1 9 6 6String Operationsinsw W1, W2;es:[edi]=[edx]; edi+/-=2; esi+/-=2insb;es:[edi]=[edx]; edi+/-=1insd;es:[edi]=[edx]; edi+/-=4outsb;[edx]=ds:[esi]; esi=esi+/-1xchg edx, esi;Exchange edx and esi [...]... rightmost two bits ;Speaker off ;8-bits are saved to al from I/O port p8 ;32-bits are written to port dx from eax in al, 61H or al, 3 out 61H, al mov cx, 1000H loop L1 in al, 61H and al, 0FCH out 61H, al in al, p8 out dx, eax Systems Design & Programming 80x86 Assembly III MO UN TI RE COUNT Y IVERSITY O F M YLAND BA L 1966 U M B C AR 2 2 3 3 bswap eax 3 3 2 2 1 1 0 0 ;Sign-extends bl into cx ;Zero extends . W2;es:[edi]=[edx]; edi+ /-= 2; esi+ /-= 2insb;es:[edi]=[edx]; edi+ /-= 1insd;es:[edi]=[edx]; edi+ /-= 4outsb;[edx]=ds:[esi]; esi=esi+ /-1 xchg edx, esi;Exchange. value to write.rep stoswmovsb;es:[edi]=ds:[esi]; edi+ /-= 1; esi+ /-= 1movsd;es:[edi]=ds:[esi]; edi+ /-= 4; esi+ /-= 4 Systems Design & Programming 80x86 Assembly

Ngày đăng: 15/11/2012, 11:07

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan