assume cs:code,ds:data,ss:stack
data segment
data ends
stack segment
stack ends
code segment
start:
mov ax,data
mov ds,ax
mov ax,4c00h
int 21h
code ends
end start
2. 数组求和
assume cs:code,ds:data,ss:stack
data segment
arr db 1,2,3,4,10,20,30,40
db 'hello world'
data ends
stack segment
db 100 dup (0)
stack ends
code segment
start:
mov ax,data
mov ds,ax
mov ax,0
mov bx,0
mov cx,8
for:
add al,ds:arr[bx]
adc ah,0
inc bx
loop for
mov ax,4c00h
int 21h
code ends
end start
comment*
vector<int>arr={1,2,3,4,10,20,30,40};
int sum = 0;
for (int = 0;i < arr.size();i++)sum += arr[i];
*comment
3. 拷贝数组
assume cs:code,ds:data,ss:stack
data segment
arr db 1,2,3,4,10,20,30,40
res db 8 dup (0)
data ends
stack segment
db 100 dup (0)
stack ends
code segment
start:
mov ax,data
mov ds,ax
mov bx,0
mov cx,8
for:
mov al,ds:arr[bx]
mov ds:res[bx],al
inc bx
loop for
mov ax,4c00h
int 21h
code ends
end start
comment*
vector<int>arr={1,2,3,4,10,20,30,40};
int res[8]
for (int i = 0;i < 8;i++)res[i] = arr [i];
*comment
4. 反转数组
assume cs:code,ds:data,ss:stack
data segment
arr db 1,2,3,4,10,20,30,40
res db 8 dup (0)
data ends
stack segment
db 100 dup (0)
stack ends
code segment
start:
mov ax,data
mov ds,ax
mov si,0
mov di,7
mov cx,8
for:
mov al,arr[si]
mov ds:res[di],al
inc si
dec di
loop for
mov ax,4c00h
int 21h
code ends
end start
comment*
vector<int>arr={1,2,3,4,10,20,30,40};
int res[8]
for (int i = 0;i < 8;i++)res[7-i] = arr [i];
for (int i = 0,j=7;i<8;i++,j--)res[j] = arr[i];
*comment
错误 Line 126:composite.select(...).classify is not a function
出现 "GEE在土地分类中出现的一个问题... is not a function" 的主要原因可能有几种 1. 变量或函数名拼写错误:检查代码中的该函数或变量名是否正确拼写,包括大小写。 2. 函数或变量未声明:检查…
查询SQL server数据库在后台执行过的语句
SELECT TOP 30000total_worker_time/1000 AS [总消耗CPU 时间(ms)],execution_count [运行次数],qs.total_worker_time/qs.execution_count/1000 AS [平均消耗CPU 时间(ms)],last_execution_time AS [最后一次执行时间],min_worker_ti…