- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
NUM EQU 3
.MODEL small
.STACK
.DATA
tempi DW 8,27,17,12,21,34,9,41,7,18,15,5
risultato DW NUM DUP (?)
.CODE
.STARTUP
PUSH OFFSET tempi
PUSH OFFSET risultato
CALL copiaVettore
ADD SP,4
MOV CX, 0
MOV CX,12
LEA BX, risultato
salta:
MOV DX, [BX]
ADD DX, 30h
ADD BX, 2
MOV AH, 2h
INT 21h
LOOP salta
.EXIT
copiaVettore PROC
PUSH BP
MOV BP, SP
PUSH DI
PUSH SI
MOV DI, [BP+4] ;risultato
MOV SI, [BP+6] ;sorgente
MOV CX, 12
ciclo1:
MOV AX, [SI]
MOV [DI], AX
ADD DI, 2
ADD SI, 2
LOOP ciclo1
POP SI
POP DI
POP BP
RET
copiaVettore ENDP
END
当过程 RET
结束时,调试器停止在 MOV CX, 12
上,并显示
unknown opcode skipped: 00 not 8086 instruction - not supported yet.
但是程序中的MOV CX, 12
运行良好。
最佳答案
这是一个很好的破坏例子。大多数人都会破坏寄存器,而您却“破坏”了代码:)
NUM EQU 3 ; <-- here's the problem
.MODEL small
.STACK
.DATA
tempi DW 8,27,17,12,21,34,9,41,7,18,15,5 ; 12 words source
risultato DW NUM DUP (?) ; but only 3 words data
由于您只有 3 个单词的空间用于复制,因此后面的 9 个单词将覆盖代码,从而破坏 RET 返回的代码
.CODE
.STARTUP
PUSH OFFSET tempi ; 3 bytes 12,0,21
PUSH OFFSET risultato ; 3 bytes 0,34,0
CALL copiaVettore ; 3 bytes 9,0,14
ADD SP,4 ; <-- this is where the RET will return,
MOV CX, 0 ; but starting from here the code
MOV CX,12 ; is overwritten with 0,7,0,18 ...
LEA BX, risultato
所以您期望的代码不再存在。
关于程序 RET 后程序集 x86 无限循环问题 MOV CX, 12,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51127666/
有什么区别: 1) !ret 2) ret != 0 ? if (ret != 0 || stack[fd] == NULL || stack[fd][0] == '\0') { if (!ret
我正在使用 java 客户端 (jrets) 来查询 RETS 服务器。此 rets 服务器不支持 OFFSET 功能。 服务器管理员告诉我使用 MODIFIED 字段作为翻阅记录的一种方式。但是,我
我想从 RETS 服务器下载所有属性(property) list ,包括所有照片 URL。我正在使用 DMQL2 和 PHRETS 库。属性和照片对象存储在 RETS 服务器的不同表中。 要获取所有
各位, 我将使用 RETS 进行真实项目。我有一份文件,说明我的经理实际上在寻找什么。但我真的不知道如何开始使用 RETS MLS,因为它有很多这样的文档。 通过一些研发,我几乎没有想出任何有值(va
我正在尝试在 Microsoft visual studio 2013 on C++ 上编译一个为 linux 编写的程序(是 C 和 C++ 的混合体 (#include .h),我将全部转换为 C
当我尝试像这样编写自己的decay_t时: #include template struct auto_decay { auto operator () () noexcept {
我经常看到通过测试小于零而不是显式定义来检查 POSIX 函数错误的代码,通常唯一的错误代码使用 -1。也就是 ret = function(); if (ret < 0) { ... } 对
考虑以下空 C 程序(标准保证编译器执行隐式 return 0): int main(int argc, char* argv[]) {} 您可以将任何逻辑添加到此函数中来操作 argc 和 argv
我在 ubuntu 12.04 和 auctex 11.86 上运行 emacs 23.3.1。每当我去编译 latex 文档(使用 C-c C-c)时,如果没有错误,一切都编译得很好。但是,如果有任
我有 RETS 元数据文件,我想将其转换为数据库模式,这样我就可以查询我的数据库而不是 RETS 服务器。 有谁知道可以使用 xml 并将其转换为数据库模式的工具?或者可能是数据库模式本身? 一切都包
由于 ret 指令是一个间接调用,x86 上的 ret 指令会停止流水线,还是以某种方式优化为更直接的调用? 最佳答案 根据英特尔优化引用手册,分支预测单元包含一个 Return Stack Buff
我有以下头文件: #include #include #include #include #include #include /** **/ // size: 1B typedef en
我目前正在开发一个网站并从 RETS(房地产交易标准)API 中提取列表。我的一切工作正常,但我的问题是在尝试深入挖掘查询时出现的。作为引用,我正在使用 Node RETS Client但我不确定它与
if(isset($_POST['update'])) { $rets_login_url = $Fetch['rets_url']; $rets_username = $Fetch['rets_us
我有这个函数,它主要由内联汇编码成。 long *toarrayl(int members, ...){ __asm{ push esp mov eax, me
int suma(int* array, int len) { asm(" xor %eax, %eax # resultado = 0 \n"
我对汇编很陌生,我不明白在 proc 结束时你用 ret 写一个数字的确切含义是什么。陈述。 像这样: Function Proc push ax cx . ...body... . pop cx a
我正在尝试使用 PHRETS 从 rets 服务器在 WordPress 中添加帖子。不幸的是,正在添加重复的帖子。我已使用 WP 查询使用元键和值检查现有帖子。当我尝试添加 10 或 50 个帖子时
我有以下程序: SECTION .text main: mov ebx, 10 mov ecx, 50 repeat: inc ebx loop repeat
假设我正在 x86 汇编中编写一个例程,例如“add”,它将两个作为参数传递的数字相加。 在大多数情况下,这是一个非常简单的方法: push ebp mov ebp, esp mov eax, [eb
我是一名优秀的程序员,十分优秀!