• xlat指令...


     1 ;就是一个串str1, lea ebx, str1 然后我们ebx+1总是加上的是一个字节, 无论(串是word, byte, dword)
     2 .386
     3 .model flat
     4 .stack 4096
     5 include io.h
     6 ExitProcess proto near32 stdcall, deExitCode:dword
     7 cr equ 0dh
     8 lf equ 0ah
     9 .data
    10 str1 byte 20 dup(?)
    11 stringss byte "请输入一个数字并求其平方:",  cr, lf 
    12 table dword 0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100
    13 .code
    14 _start:
    15 output stringss
    16 input str1, 20
    17 atod str1
    18 lea ebx, table
    19 add eax, eax;如果是dword的串,那么我们读取的第n个数据的值,那么首地址加上的值(到达该值中间的字节数)就是n*sizeof(dword)=n*4
    20 add eax, eax;
    21 xlat
    22 ;add eax, eax;模仿一下xlat的功能
    23 ;mov ax, word ptr [ebx+eax]
    24 dtoa str1, eax
    25 output str1
    26 invoke ExitProcess, 0
    27 public _start
    28 end
  • 相关阅读:
    awk
    django教材
    saltstack的安装过程
    OPENSTACK学习笔记(1)
    5G核心网架构
    内存采集
    分析CPU文件
    环境管理系统
    属性的两种定义方式
    Python 面向对象(初级篇)
  • 原文地址:https://www.cnblogs.com/hujunzheng/p/3807126.html
Copyright © 2020-2023  润新知