DATA SEGMENT X DB 10 Y DB 20 Z DB 00 DATA ENDS CODE SEGMENT ASSUME CS:CODE,DS:DATA START: MOV AX,DATA MOV DS,AX MOV AL,X ADD AL,Y MOV CL,3 SHL AL,CL SUB AL,X MOV CL,2 SHR AL,CL MOV AH,4CH INT 21H CODE ENDS END START…
DATA SEGMENT INFO DB 'HOW ARE YOU!$' DATA ENDS CODE SEGMENT ASSUME CS:CODE,DS:DATA START: MOV AX,DATA MOV DS,AX LEA DX,INFO MOV AH,09H INT 21H MOV AH,4CH INT 21H CODE ENDS END START…
DATA SEGMENT DATA ENDS CODE SEGMENT ASSUME CS:CODE,DS:DATA START: MOV AX,DATA MOV DS,AX MOV CX,8 MOV AH,02H MOV DL,40H SIGN: INC DL INT 21H LOOP SIGN MOV AH,4CH INT 21H CODE ENDS END START…
DATA SEGMENT ORG 1000H INFO DB 1,2,3,4,5,70H,71H,72H,80H,92H MAX DB 00H DATA ENDS CODE SEGMENT ASSUME CS:CODE,DS:DATA START: MOV AX,DATA MOV DS,AX MOV CX,10 MOV BX,1000H DEC BX SIGN: INC BX MOV DL,BYTE PTR [BX] CMP DL,MAX JA CHANGE NEXT: LOOP SIGN MO…
DATA SEGMENT ORG 2000H INFO DB 1,2,3,4,5,70H,71H,72H,80H,92H N_NUMS DB 00H P_NUMS DB 00H DATA ENDS CODE SEGMENT ASSUME CS:CODE,DS:DATA START: MOV AX,DATA MOV DS,AX MOV CX,10 MOV BX,2000H DEC BX SIGN: INC BX TEST BYTE PTR [BX],80H JNZ NEG_NUM INC P_NU…
DATA SEGMENT MEM DB 12H,91H,73H,64H,20H,0A5H,0D1H,91H,0A2H,00H PLUS DB 00H ZERO DB 00H NEGO DB 00H DATA ENDS STACK SEGMENT STACK ENDS CODE SEGMENT ASSUME CS:CODE,DS:DATA,SS:STACK START: MOV AX,DATA MOV DS,AX MOV CX,10 LEA BX,MEM DEC BX SIGN: INC BX M…
1.若两个数中有一个是奇数,一个是偶数,则将它们互换储存地址 2.若两个数都是奇数,则分别加一 3.若两个数都是偶数,则不变 DATA SEGMENT A DB 12H B DB 25H DATA ENDS STACK SEGMENT STACK ENDS CODE SEGMENT ASSUME CS:CODE,DS:DATA,SS:STACK START: MOV AX,DATA MOV DS,AX MOV AL,0 MOV BL,A TEST BL,01H JZ ADD_TIME_1 ONE…
DATA SEGMENT     M DB 36H     N DB 95H     RESAULT1 DB 'M>N$'     RESAULT2 DB 'M<N$' DATA ENDS STACK SEGMENT     DB 1000 DUP(?) STACK ENDS CODE SEGMENT     ASSUME CS:CODE,DS:DATA,SS:STACK START:     MOV AX,DATA     MOV DS,AX     LEA SI,M     LEA DI,…
期望得分:100+100+0=200 实际得分:5+0+0=5 每加入一个数,x的因数位置++ 注意:根号x枚举时,如果x是完全平方数,根号x会重复累计2次,要减去 考场上没减,5分 /(ㄒoㄒ)/~~ #include<cmath> #include<cstdio> #include<iostream> using namespace std; #define N 40001 int sum[N]; void read(int &x) { x=; char c…
刷题与Z老师的头发 (10 分) 在Pintia上,每天Z老师出题.小盆友们刷题.Z老师的头发遵从以下规律: 1.每天生长出60根头发: 2.每出一道题,减少20根头发: 3.每天结束时统计累积做题情况: (1)若出的题全部被做出来,则Z老师产生“没题焦虑”,减少30根头发: (2)若小盆友做出来的题少于50%,则Z老师产生“学生不用功焦虑”,减少70根头发. 现给定连续N天的出题.刷题情况,请计算Z老师头发的变化情况. 输入格式: 第一行输入一个正整数N (N<20): 接下来N行,每行输入两…