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 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 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…
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,…
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 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…
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…
1137. 第 N 个泰波那契数 题目链接 来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problems/n-th-tribonacci-number 著作权归领扣网络所有.商业转载请联系官方授权,非商业转载请注明出处. 题目描述 泰波那契序列 Tn 定义如下: T0 = 0, T1 = 1, T2 = 1, 且在 n >= 0 的条件下 Tn+3 = Tn + Tn+1 + Tn+2 给你整数 n,请返回第 n 个泰波那契数 Tn 的值. 示例 1:…
[题目6]输出100以内的所有素数,素数之间以一个空格区分 from math import sqrt print ' '.join(str(key) for key in [x for x in xrange(2, 100) if 0 not in [x % d for d in xrange(2, int(sqrt(x))+1)]]) [题目7]已知矩形长a,宽b,输出其面积和周长,面积和周长以一个空格隔开 print ('%s %s' % (a*b,2*a+2*b)) [题目8]给你一个l…