汇编
fengye207161
这个作者很懒,什么都没留下…
展开
-
板凳——————————————————(枯藤 )MIX汇编 前导(7)
//2020年08月13日 05时26分36秒 assume cs:codesg codesg segment mov ax, 2000h mov ss, ax mov sp, 0 add sp, 4 pop ax pop bx push ax push bx pop ax pop bx mov ax, 4c00h int 21 codesg ends end assume cs:codesg codesg segment mov ax, 2000h mov ds, ax mov bx, 1000h mov原创 2020-08-17 04:27:49 · 133 阅读 · 0 评论 -
板凳——————————————————(枯藤 )MIX汇编 前导(6)
//2019年天津大学智算学部汇编语言程序设计-李罡 //2020年08月09日 15时05分15秒 The direction depends on DF, if DF = 1 they decrease cld # clear the DF (= 0), increase std # set the DF (= 0), decrease .section .data value1: .ascii “This is a test string.\n” .section .bss .lcomm outpu原创 2020-08-09 17:26:51 · 174 阅读 · 0 评论 -
板凳——————————————————(枯藤 )MIX汇编 前导(5)
2020年08月08日 15时11分33秒 /* 32-Bits, C LIB 2020年08月08日 15时11分33秒 .section .data output: .ascii “Hello Wold!\n” length = .-output .section .text .globl main main: nop movl $4, %eax movl $1, %ebx movl $output, %ecx movl $length, %edx int $0x80 movl $1, %eax mov原创 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 .data output: .ascii “The value is x\n” values: .int 1, 3, 5, 7, 9 .section .text .globl main main: nop movl $output, %esi movl $0, %edi #将0移入索引寄存器 loop: movl values(, %edi, 4), %eax #加载数据的第一个字 addl $0x30, %eax movb原创 2020-08-04 14:11:16 · 120 阅读 · 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.c wannian07@wannian07-PC:~$ gcc test.s -o test wannian07@wannian原创 2020-08-03 15:44:30 · 136 阅读 · 0 评论 -
板凳——————————————————(枯藤 )MIX汇编 前导(1)
.section .data ;数据段开始, 列出程序数据所需的所有内存存储空间 .section .text ;文本段开始, 存放程序指令的部分 .globl _start ;将在汇编或链接进程中被其他内容替换 .globl表示汇编程序不应在汇编之后废弃此符号, 链接器需要它. _start: movl $1, %eax ;将数字1移入%eax. $表示要使用立即寻址方式寻址. 没$, 将会进行直接寻址, 加载地址1中的数字 ; 数字...原创 2020-07-15 17:28:31 · 219 阅读 · 0 评论