sql 数字减去null_减去两个16位数字| 8086微处理器
sql 數字減去null
Problem: Write a program to subtract two 16-bit numbers where starting address is 2000 and the numbers are at 3000 and 3002 memory address and store result into 3004 and 3006 memory address.
問題:編寫一個程序以減去兩個16位數字(起始地址為2000,數字分別位于3000和3002存儲器地址)并將結果存儲到3004和3006存儲器地址中。
Algorithm:
算法:
Load 0000H into CX register (for borrow)
將0000H加載到CX寄存器中(借用)
Load the data into AX(accumulator) from memory 3000
從內存3000將數據加載到AX(累加器)
Load the data into BX register from memory 3002
從存儲器3002將數據加載到BX寄存器中
Subtract BX with Accumulator AX
用累加器AX減去BX
Jump if no borrow
如果沒有借錢就跳
Increment CX by 1
CX遞增1
Move data from AX(accumulator) to memory 3004
將數據從AX(累加器)移動到內存3004
Move data from CX register to memory 3006
將數據從CX寄存器移至內存3006
Stop
停止
Program:
程序:
table {border-collapse: collapse;}table, th, td {border: 1px solid black;} table {border-collapse: collapse;}table, th, td {border: 1px solid black;}| 2000 | MOV | CX, 0000 | [CX] |
| 2003 | MOV | AX, [3000] | [AX] |
| 2007 | MOV | BX, [3002] | [BX] |
| 200B | SUB | AX, BX | [AX] |
| 200D | JNC | 2010 | Jump if no borrow |
| 200F | INC | CX | [CX] |
| 2010 | MOV | [3004], AX | [3004] |
| 2014 | MOV | [3006], CX | [3006] |
| 2018 | HLT | Stop |
| 2000 | 影片 | CX,0000 | [CX] |
| 2003年 | 影片 | AX,[3000] | [斧頭] |
| 2007年 | 影片 | BX,[3002] | [BX] |
| 200B | 潛艇 | AX,BX | [斧頭] |
| 200D | 聯合會 | 2010 | 如果沒有借錢就跳 |
| 200樓 | INC | CX | [CX] |
| 2010 | 影片 | [3004],AX | [3004] |
| 2014年 | 影片 | [3006],CX | [3006] |
| 2018年 | HLT | 停止 |
Explanation:
說明:
MOV is used to load and store data.
MOV用于加載和存儲數據。
SUB is used to subtract two numbers where their one number is in accumulator or not.
SUB用于減去兩個數字,其中一個數字是否在累加器中。
JNC is a 2-bit command which is used to check whether the borrow is generated from accumulator or not.
JNC是2位命令,用于檢查借位是否從累加器生成。
INC is used to increment an register by 1.
INC用于將寄存器增加1。
HLT is used to stop the program.
HLT用于停止程序。
AX is an accumulator which is used to load and store the data.
AX是一個累加器,用于加載和存儲數據。
BX, CX is general purpose registers where BX is used for storing second number and CX is used to store borrow.
BX,CX是通用寄存器,其中BX用于存儲第二個數字,而CX用于存儲借位。
翻譯自: https://www.includehelp.com/embedded-system/subtract-two-16-bits-numbers.aspx
sql 數字減去null
總結
以上是生活随笔為你收集整理的sql 数字减去null_减去两个16位数字| 8086微处理器的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 时间转换竟多出1年!Java开发中的20
- 下一篇: SpringBoot 中 4 大核心组件