![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
汇编
fengye207161
这个作者很懒,什么都没留下…
展开
-
板凳——————————————————(枯藤 )MIX汇编 前导(7)
//2020年08月13日 05时26分36秒assume cs:codesgcodesg segmentmov ax, 2000hmov ss, axmov sp, 0add sp, 4pop axpop bxpush axpush bxpop axpop bxmov ax, 4c00hint 21codesg endsendassume cs:codesgcodesg segmentmov ax, 2000hmov ds, axmov bx, 1000hmov原创 2020-08-17 04:27:49 · 137 阅读 · 0 评论 -
板凳——————————————————(枯藤 )MIX汇编 前导(6)
//2019年天津大学智算学部汇编语言程序设计-李罡//2020年08月09日 15时05分15秒The direction depends on DF, if DF = 1 they decreasecld # clear the DF (= 0), increasestd # set the DF (= 0), decrease.section .datavalue1:.ascii “This is a test string.\n”.section .bss.lcomm outpu原创 2020-08-09 17:26:51 · 176 阅读 · 0 评论 -
板凳——————————————————(枯藤 )MIX汇编 前导(5)
2020年08月08日 15时11分33秒/*32-Bits, C LIB2020年08月08日 15时11分33秒.section .dataoutput:.ascii “Hello Wold!\n”length = .-output.section .text.globl mainmain:nopmovl $4, %eaxmovl $1, %ebxmovl $output, %ecxmovl $length, %edxint $0x80movl $1, %eaxmov原创 2020-08-08 20:41:38 · 165 阅读 · 0 评论 -
板凳——————————————————(枯藤 )MIX汇编 前导(4)
https://www.dazhuanlan.com/2020/01/17/5e216a2472e4c/汇编学习笔记这里主要讲述的是函数的调用,在汇编中是怎么实现的。但是我还是没看懂,要一点点的画寄存器的状态图吧。首先,碰到了几个问题,我使用的Linux环境是64位的。如果使用pushl和popl, 会出现 “invalid instruction suffix for push”这是因为pushl和popl都是适用在32bit系统上的,因为64-bit 的系统,不接受32-bit的数值,所以用p原创 2020-08-04 22:13:02 · 349 阅读 · 0 评论 -
板凳——————————————————(枯藤 )MIX汇编 前导(3)
.section .dataoutput:.ascii “The value is x\n”values:.int 1, 3, 5, 7, 9.section .text.globl mainmain:nopmovl $output, %esimovl $0, %edi #将0移入索引寄存器loop:movl values(, %edi, 4), %eax #加载数据的第一个字addl $0x30, %eaxmovb原创 2020-08-04 14:11:16 · 122 阅读 · 0 评论 -
板凳——————————————————(枯藤 )MIX汇编 前导(2)
wannian07@wannian07-PC:~$ gedit test.c#include <stdio.h>int main(int argc, char *argv[]){ printf("Hello %s\n","World!"); return 0; }wannian07@wannian07-PC:~$ gcc -S test.cwannian07@wannian07-PC:~$ gcc test.s -o testwannian07@wannian原创 2020-08-03 15:44:30 · 139 阅读 · 0 评论 -
板凳——————————————————(枯藤 )MIX汇编 前导(1)
.section .data ;数据段开始, 列出程序数据所需的所有内存存储空间.section .text ;文本段开始, 存放程序指令的部分.globl _start ;将在汇编或链接进程中被其他内容替换 .globl表示汇编程序不应在汇编之后废弃此符号, 链接器需要它._start: movl $1, %eax ;将数字1移入%eax. $表示要使用立即寻址方式寻址. 没$, 将会进行直接寻址, 加载地址1中的数字 ; 数字...原创 2020-07-15 17:28:31 · 229 阅读 · 0 评论