汇编-实现基本链表
来源:互联网 发布:vba 数据库 编辑:程序博客网 时间:2024/06/06 04:54
学习汇编的时候写的,有点粗糙
写于2008年
mAlloc proc nSize:dword add nSize,4 invoke GlobalAlloc,GMEM_ZEROINIT or GMEM_FIXED,nSize retmAlloc endp init_L proc _struct1LOCAL _headaddress invoke mAlloc,sizeof _struct mov _headaddress,eax assume eax:ptr _struct mov [eax].address,eax assume eax:NOTHING mov eax,_headaddress retinit_L endp getdata_L proc _L,_i xor ecx,ecx mov eax,_L .while ecx<=65536 assume eax:ptr _struct .if ecx==_i mov eax,eax .break ret .endif mov eax,[eax].next inc ecx .endw retgetdata_L endpinsert_L proc _L,_iLOCAL _firstaddressLOCAL _posaddress mov eax,_L mov _firstaddress,eax xor ecx,ecx .while ecx<_i push ecx assume eax:ptr _struct invoke mAlloc,sizeof _struct mov _posaddress,eax mov [eax].address,eax m2m [eax].back,_firstaddress mov eax,_firstaddress m2m [eax].next,_posaddress m2m _firstaddress,_posaddress pop ecx inc ecx .endw mov eax,_L retinsert_L endpdelete_L proc _L,_i LOCAL _address mov eax,_L xor ecx,ecx .while ecx<65536 push ecx assume eax:ptr _struct .if ecx==_i m2m _address,[eax].next mov eax,[eax].back m2m [eax].next,_address .break ret .endif mov eax,[eax].next pop ecx inc ecx .endw retdelete_L endp
0 0
- 汇编-实现基本链表
- 链表基本实现
- c和汇编实现 一些基本字符串处理函数
- 汇编实现乘法口诀表
- 链表的基本实现
- 汇编寄存器基本指令
- 基本汇编指令
- 基本汇编指令集
- 基本汇编指令
- 基本汇编指令集
- 1:汇编基本元素
- 汇编 基本框架
- 汇编基本指令
- 嵌入汇编基本语法
- 汇编的基本语法
- 基本汇编指令
- 基本汇编指令
- 嵌入式汇编基本语法
- 从JVM并发看CPU内存指令重排序(Memory Reordering)
- Linux问题解决_arch系统安装完没有声音
- 设计模式6大原则
- 第一章 知识导图
- cocos2d-x 3.0 调度器(scheduler)
- 汇编-实现基本链表
- AdapterView.OnItemClickListener() 参数解释
- POJ 3279 Fliptile
- undefined reference to ‘raise’
- androidAnnotations框架使用
- 关于-isKindOfClass
- 浅层深度学习的自然语言研究(1)
- 汇编-获取函数名称
- 轻松实现SQL Server与Access、Excel数据表间的导入导出