MASM中public的使用问题

太虚野老 2018-09-12 01:23:35
用法如下:
public _KeTryToAcquireQueuedSpinLockAtRaisedIrqlUP
_KeTryToAcquireQueuedSpinLockAtRaisedIrqlUP:
编译后错误信息如下:
error A2203: cannot declare scoped code label as PUBLIC : _KeTryToAcquireQueuedSpinLockAtRaisedIrqlUP
...全文
429 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
就你的代码,第7行提到第1行前面去
太虚野老 2018-09-14
  • 打赏
  • 举报
回复
说的具体点,把哪个public到代码段前面去。 写点代码。
  • 打赏
  • 举报
回复
public提到代码段前面去
太虚野老 2018-09-13
  • 打赏
  • 举报
回复
_TEXT$00   SEGMENT  PARA PUBLIC 'CODE'
        ASSUME  DS:FLAT, ES:FLAT, SS:NOTHING, FS:NOTHING, GS:NOTHING

        PAGE
        SUBTTL "Ke Acquire Spin Lock At DPC Level"
其它代码...
        public  _KeTryToAcquireQueuedSpinLockAtRaisedIrqlUP
_KeTryToAcquireQueuedSpinLockAtRaisedIrqlUP:

其它代码...
_TEXT$00   ends
完整的代码太长,太复杂,我只写这一部分,不知道有没有用。
  • 打赏
  • 举报
回复
应该是可以的,要看代码
最实用,最简单编程软件。masm编程器汇编语言程序格式及MASM 汇编语言的实现也是先利用某种编辑器编写汇编语言源程序(*.ASM),然后经过汇编得到目标模块文件(*.OBJ)、连接后形成可执行文件(*.EXE)。 1、汇编语言程序的语句格式 汇编语源程序由语句序列构成。语句一般由分隔符分成的四个部分组成,它们有两种格式: (1)执行性语句——由硬指令构成的语句,它通常对应一条机器指令,出现在程序的代码段: 标号:硬指令助记符 操作数,操作数 ;注释 (2)说明性语句——由伪指令构成的语句,它通常指示汇编程序如何汇编源程序: 名字 伪指令助记符 参数,参数,... ;注释 ◆执行性语句,冒号前的标号反映该指令的逻辑地址;说明性语句的名字可以是变量名、段名、子程序名或宏名等等,既反映逻辑地址又具有自身的各种属性。标号和名字很容易通过是否具有冒号来区分。 ◆硬指令助记符可以是任何一条处理器指令,也可以是一条宏指令,伪指令助记符主要完成一些不产生CPU动作的说明性工作,在程序执行前由汇编程序完成处理。 ◆处理器指令的操作数可以是立即数、寄存器和存储单元。伪指令的参数可以是常数、变量名、表达式等,可以有多个,参数之间用逗号隔开。 ◆语句由分号开始的部分是注释。 2、汇编语言源程序 这个以前已经学过,主要有简化段定义格式和完整段定义格式 3、宏汇编程序MASM MASM6.11,安装文件5张软盘,默认安装在C:\MASM目录下,完整的MASM汇编系统包含很多文件,但最基本的有如下几个: ML.EXE 汇编程序 ML.ERR 汇编错误信息文件 DOSXNT.EXE MS-DOS扩展文件 LINK.EXE 连接文件 LIB.EXE 子程序库管理文件 如果采用集成开发环境PWB,主要涉及如下文件: PWWB.EXE 程序员工作平台 NMAKER.EXE 工程维护程序 NMAKE.EXE nmaker的MS-DOS扩展驱动程序 CV.EXE 源代码调试器CodeView CVPACK.EXE 调试信息压缩器,它为CODEVIEW准备一个可执行文件 HELPMAKE.EXE 帮助文件维护程序 BSCMAKE.EXE 浏览数据库创建程序 SBRPACK.EXE 浏览信息程序 PWBRMAKE.EXE BSCMAKE兼容驱动程序 *.MXT 各种PWB扩展工具文件 *.XXT 各种语言的PWB扩展文件 4、汇编语言的命令行开发过程 (1)原程序的编写 用编辑软件书写*.asm源程序,如 LI6-1.ASM ;LI6-1.ASM .MODEL SMALL .STACK .DATA STRING DB 'Hello,Everybody!' .CODE .STARTUP MOV DX,OFFSET STRING MOV AH,9 INT 21H .EXIT 0 END (2)原程序的汇编 汇编是将原程序翻译成由机器代码组成的目标模块文件的过程,如下: ML /c LI6-1.ASM 如果源程序没有语法错误,则生成一个目标模块文件LI6-1.OBJ (3)目标文件的连接 连接程序能把一个或多个目标文件和库文件和成一个可执行文件(.EXE、.COM文件),如下: LINK LI6-1.OBJ 连接程序的一般格式: LINK [/参数选项] OBJ文件列表 [EXE文件名,MAP文件名,库文件][;] 连接程序可以将多个模块文件连接起来,形成一个可执行文件;多个模块文件用“+”分隔。给出EE文件名就可以替代与第一个模块文件名相同的缺省名。给出MAP文件名将创建连接映像文件,否则不生成映像文件。库文件是指连接程序需要的子程序库等。“;”表示采用缺省值 事实上,ML汇编程序可以自动调用LINK连接程序(ML表示MASM和LINK),实现汇编和连接依次进行,如下即可完成可执行文件的生成: ML LI6-1.ASM ML的命令行格式如下: ML [/参数选项] 文件列表 [/LINK连接参数选项] 参数选项如下(注意参数是大小写敏感的): /AT——允许tiny存储模式(创建一个COM文件) /c——只汇编源程序,不进行自动连接 /fl 文件名——川建一个汇编列表文件(扩展名LST) /Fr 文件名——创建一个可在PWB下浏览的.SBR源浏览文件 /Fo 文件名——根据指定的文件名生成模块文件,而不是采用缺省名 /Fe 文件名——根据指定的文件名生成可执行文件,而不是采用缺省名 /Fm 文件名——创建一个连接映像文件(扩展名MAP) /I 路径名——设置需要包含进(INCLUDE)源程序的文件的所在路径 /Sg——在生
v2.1151 1. 解决EnumWindow有时候会卡死的问题 2. KeyDownStr KeyUpStr KeyPressStr更名KeyDownChar KeyUpChar KeyPressChar 增加付费接口KeyPressStr 3. 去掉属性dx.public.keypad.patch,dx.public.keypad.sync和dx.public.mouse.sync. 增加收费接口EnableKeypadPatch EnableKeypadSync EnableMouseSync 4. 解决后台特征码失效的BUG。(上一个版本的问题) 5. 优化FindXXXX等的查询速度. 同时接口FindIntEx FindFloatEx FindDoubleEx FindStringEx FindDataEx参数变更. 6. 解决FindMultiColor和FindMultiColorEx在某些时候会找不到的BUG 7. 加强绑定模式1. 增加付费接口DmGuard 8. 增加付费接口FaqCaptureFromFile 【插件特色】 1. 文字识别领域,目前插件界,识别速度和准确率No.1 7000汉字,全屏识别,只需要几百毫秒,性能强劲! 2. 后台键鼠方面,目前插件界功能最齐全,最强悍的后台键鼠 3. 图色方面,高速找图找色,取色 4. 支持MASM Call代码嵌入执行 【功能特点】 文字识别方面 1. 所有文字识别接口都支持后台gdi 后台gdi2 后台dx 后台dx2 后台dx3 以及前台normal 2. 支持RGB HSV颜色识别 3. 支持RGB HSV差色识别 4. 支持多种颜色混合识别(最多10种) 5. 支持连体字识别 6. 支持背景色识别 7. 支持点阵模糊识别(防杂点干扰) 8. 支持查找指定字符串在屏幕的坐标 9. 支持查找指定字符串在屏幕上的所有坐标 10. 支持在未知文字的情况下进行词组识别 11. 支持在没有字库的情况下,进行词组范围识别 12. 支持多字库,最多10个字库。方便针对不同的情况制作字库. 13. 完全兼容91OCR字库(txt字库,mdb不支持) 14. 支持字库自定义加密解密 15. 支持识别指定图片的文字 16. 支持在代码添加字库 图色方面 1. 所有图色接口都支持后台gdi 后台gdi2 后台dx 后台dx2 后台dx3 以及前台normal 2. 支持颜色查找,多种颜色查找,并可指定搜索的方向以及相似度 3. 支持图形查找,多个图形查找,并可指定搜索的方向以及相似度 4. 支持直接获取某点的颜色(RGB,HSV) 5. 支持直接对某点的颜色进行比较,可指定相似度 6. 可直接对任意区域进行截图,并保存为bmp(24位色) 7. 可获取某范围的RGB和HSV颜色均值 8. 支持图片透明色 9. 支持多图查找 10. 支持直接获取图像数组,方便二次开发 11. 支持多点找色 键鼠方面 1. 所有键鼠接口都支持windows消息模拟,dx以及前台 2. 前台完全模拟,功能和按键自带的完全一样 3. 后台windows消息模拟(类似于按键自带的后台键鼠) 4. dx键盘几乎支持所有游戏后台组合键.(首创) 5. 后台dx (首创,支持大型的3D以及2D游戏键鼠的模拟) 后台方面 1. 两个函数,搞定前后台的切换,非常简单快捷. 窗口方面 1. 支持任意绘制的信息提示窗口,可以随着游戏窗口的移动而移动 2. 信息提示窗口可以鼠标拖动,更加方便快捷 3. 支持获取通过正常手段获取不到的窗口句柄,比如QQ系列游戏 4. 支持枚举窗口 5. 支持获取窗口各种状态 6. 支持对窗口进行各种操作,关闭,最小化等等 内存方面 1. 支持CE格式的内存读取 2. 支持各种数据类型的搜索,以及多次搜索(类似CE) 3. 强力内存接口,按键自带的读不到,可以试试这个 4. 强力的内存写接口(简单游版本不支持) 汇编方面(简单游版本不支持) 1. 支持MASM语法的汇编语句,支持本进程以及目标进程的汇编代码嵌入执行(俗语Call) 2. 支持机器码和MASM语句的互转 答题器 1. 支持前后台的截图发送到服务端 2. 支持前后台的截取动画发送到服务端
代码部分来自Google的重建IBMPC BIOS项目(https://sites.google.com/site/pcdosretro/ibmpcbios),其的BIOS镜像(*.rom)可用于各种IBM PC模拟器,可按情况使用。源代码可以用masm编译,站内英文说明文件如下: IBM PC BIOS source code reconstruction This is a reconstruction of the IBM PC, PC XT, PC AT and PC XT 286 BIOS source code using scanning and transcription of the BIOS listings found in the IBM Technical Reference manuals. This historically relevant source code is presented here for software preservation. The following BIOS source code has been reconstructed: IBM PC version 1 04/21/81 IBM PC version 2 10/19/81 IBM PC version 3 10/27/82 IBM PC XT version 1 11/08/82 (also used on the Portable PC) IBM PC XT version 2 01/10/86 IBM PC XT version 3 05/09/86 IBM PC AT version 1 01/10/84 IBM PC AT version 2 06/10/85 IBM PC AT version 3 11/15/85 (used on the PC AT models 319 and 339) IBM PC XT 286 04/21/86 Notes: • All 3 versions of the IBM PC BIOS and the first version of the IBM PC XT BIOS were built using Intel ASM86 on an Intel development system. In each case the BIOS source code is a single large file and the BIOS code is 8KB which resides at F000:E000 • The IBM PC AT version 1 BIOS was built using IBM MASM 1.0 on DOS. This is the first IBM BIOS which uses multiple source files. Since IBM MASM 1.0 did not support the 80286 there is a macro file (IAPX286.MAC) which is used to generate the necessary opcodes. This is also the first BIOS to be split into two parts: the main BIOS code resides at F000:0000 and the compatibility section (ORGS.ASM) resides at F000:E000. An additional file FILL.ASM has been added to define the area between the end of the main BIOS code and the compatibility section to allow the BIOS to be linked properly. It is currently unknown how this was originally handled. • The IBM PC AT version 2 and 3 BIOS and the IBM PC XT 286 BIOS were built using IBM MASM 2.0 on DOS. These are similar to the PC AT version 1 BIOS but there are fewer source files as some files were combined and a bit of cleanup was done. IAPX286.INC is used to generate the protected-mode 80286 opcodes which IBM MASM 2.0 did not support. FILL.ASM serves the same purpose as it does for the PC AT version 1 BIOS though in each case the file is specific to the particular BIOS being built. • The IBM PC XT version 2 and 3 BIOS were built using IBM MASM 2.0 on DOS. The later PC XT BIOS code was restructured to be similar to the PC AT BIOS code so there are multiple source files. Like the PC AT BIOS the code is split into two parts though the compatibility section is in the file POST.ASM. Again the additional file FILL.ASM is used to define the area between the end of the main BIOS code and the compatibility section. • The following code is present in all versions of the PC AT BIOS and the PC XT 286 BIOS but does not appear in the published listings. It is inferred from the public symbols in ORGS.ASM and code disassembly. It is unknown what purpose this code serves. .XLIST ;;- ORG 0FF5AH ORG 01F5AH HRD PROC FAR CALL DISK_SETUP RET HRD ENDP FLOPPY PROC FAR CALL DSKETTE_SETUP RET FLOPPY ENDP SEEKS_1 PROC FAR CALL SEEK RET SEEKS_1 ENDP TUTOR: JMP K16 .LIST • In all cases the 32KB ROM BASIC code which resides at F6000 is not available as its source code was never published. • Versions of MASM later than 4.0 cannot be used to build the IBM BIOS source code since older constructs and macros are used. More information about functionality changes in the IBM PC BIOS code is listed here: IBM PC BIOS version history
This is the complete source code for winquake, glquake, quakeworld, and glquakeworld. The projects have been tested with visual C++ 6.0, but masm is also required to build the assembly language files. It is possible to change a #define and build with only C code, but the software rendering versions lose almost half its speed. The OpenGL versions will not be effected very much. The gas2masm tool was created to allow us to use the same source for the dos, linux, and windows versions, but I don't really recommend anyone mess with the asm code. The original dos version of Quake should also be buildable from these sources, but we didn't bother trying. The code is all licensed under the terms of the GPL (gnu public license). You should read the entire license, but the gist of it is that you can do anything you want with the code, including sell your new version. The catch is that if you distribute new binary versions, you are required to make the entire source code available for free to everyone. Our previous code releases have been under licenses that preclude commercial exploitation, but have no clause forcing sharing of source code. There have been some unfortunate losses to the community as a result of mod teams keeping their sources closed (and sometimes losing them). If you are going to publicly release modified versions of this code, you must also make source code available. I would encourage teams to even go a step farther and investigate using public CVS servers for development where possible. The primary intent of this release is for entertainment and educational purposes, but the GPL does allow commercial exploitation if you obey the full license. If you want to do something commercial and you just can't bear to have your source changes released, we could still negotiate a separate license agreement (for $$$), but I would encourage you to just live with the GPL. All of the Quake data files remain copyrighted and licensed under the original terms, so you cannot redistribute data from the original game, but if you do a true total conversion, you can create a standalone game based on this code. I will see about having the license changed on the shareware episode of quake to allow it to be duplicated more freely (for linux distributions, for example), but I can't give a timeframe for it. You can still download one of the original quake demos and use that data with the code, but there are restrictions on the redistribution of the demo data. If you never actually bought a complete version of Quake, you might want to rummage around in a local software bargain bin for one of the originals, or perhaps find a copy of the "Quake: the offering" boxed set with both mission packs. Thanks to Dave "Zoid" Kirsh and Robert Duffy for doing the grunt work of building this release. John Carmack Id Software

21,459

社区成员

发帖
与我相关
我的任务
社区描述
汇编语言(Assembly Language)是任何一种用于电子计算机、微处理器、微控制器或其他可编程器件的低级语言,亦称为符号语言。
社区管理员
  • 汇编语言
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧