汇编错误:first.asm:error A2025: Improper align/combine type

米格315 CSDN会员 米格315 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
代码如下:

;
;first.asm - A first assembly language program ;是一个注释,给出程序first.asm
;
;
;Code segment
;
_TEXT segment word public 'CODE'
assume cs:_Text,ds:_DATA,SS:_STACK
;
;Add two 16 bit values
;
addem proc far ;Entry point from DOS
mov ax,_DATA ;Point the data segment
mov ds,ax ;register to the data
;segment
mov ax,a ;AX=a
add ax,b ;AX=a+b
mov c,ax ;c=a+b
mov ax,4c00h ;AX=No error return
;code
int 21h ;Return to DOX
addem endp
_TEXT ends
;
; Data segment
;
_DATA segment word pubbilc 'DATA'
a dw 3
b dw 4
c dw ?
_DATA ends

;
;Stack segment
;
_STACK segment para stack 'STACK'
dw 128 dup (?)
_STACK ends
end addem ;Defines the entry point

在XP上用MASM 5.0 编译一直报这个ERROR:first.asm<27>:error A2025: Improper align/combine type。
网上查了一天了都不知道是什么原因。哪位朋友知道请指教。
...全文

相关推荐

高清彩版 Combine_Asynchronous_Programming_with_Swift_5.1_v1.0.0.pdf

高清彩版 Combine_Asynchronous_Programming_with_Swift_5.1_v1.0.0.pdf

weixin_38669689

js-snack-es6

js-snack-es6

沈临白

BitClub:NSURLSession

这是 readme.md

msjhfu

The Joy of JavaScript-2021.pdf

这是一本能让你的JavaScript水平登峰造极的小册子。作者 Luis Atencio 是 JavaScript 领域名副其实的专家,也是畅销书《JavaScript函数式编程指南》第1、2版的作者。在这本中,Luis 再次走出之前纯函数式编程环境的舒适圈,凭借多年来对 JS 的理解,分别从 Objects、Functions、Code 与 Data 四个层面对 JS 进行了更为深入的剖析。既有对以往 FP 编程的经验总结,又有 OOP 编程的最佳实践,还通过一个贯穿全书的区块链的示例展示了 JS 在诸多语音特性上的独特魅力。 只要按照本书脉络进行深入学习,相信您的 JavaScript 编程水平一定会有质的飞跃,同时也能从书中热情洋溢的描述中感受到作者对 JS 这门语言发自内心的热爱与执着。 本书已经有了俄语版和韩语版,可惜还没有中译本,但通篇行文流畅,可读性极强,具备高中英语水平即可展开学习,是近年来不可多得的一本从实战角度讲解 JavaScript 语言特性的佳作。 学完这本书,相信您也将对“阿特伍德”定律深信不疑:任何能用JS来开发的应用,最终都将用JS来实现。

安冬的码畜日常

C Programming

C Programming.pdf Contents Computers 1 An Introduction to Computers........................................................................................1 Hardware and Software ....................................................................................1 Data and Information .......................................................................................2 Data Processing................................................................................................2 Programming Languages 4 What is Programming? ..................................................................................................4 From Problem to Program ................................................................................5 Programming Languages ...............................................................................................8 C 8 A look at C ....................................................................................................................8 Making C Run..................................................................................................9 Creating C Programs........................................................................................9 What Comprises a C Program?.......................................................................10 The Advantages of C ......................................................................................11 The Disadvantages of C..................................................................................11 A First C Program 11 The Program Example .................................................................................................11 #include ........................................................................................................12 <stdio.h>.......................................................................................................12 void ...............................................................................................................12 main ..............................................................................................................13 ( void )...........................................................................................................13 { .....................................................................................................................13 float ...............................................................................................................13 height, width, area, wood_length................................................................13 ; .....................................................................................................................14 scanf .............................................................................................................14 ( .....................................................................................................................14 "%f", ..............................................................................................................14 &height..........................................................................................................15 ) ; ...................................................................................................................15 scanf ( "%f", &width ) ;.................................................................................15 area = 2 * height * width ;............................................................................15 wood_length = 2 * ( height + width ) * 3.25 ;.................................................16 printf..............................................................................................................16 ( "The area of glass needed is : %f metres.\n",.........................................16 area ) ; ..........................................................................................................17 printf ( "The length of wood needed is : %f feet.\n", wood_length ) ; ......17 } .....................................................................................................................17 Punctuation ....................................................................................................17 Variables 18 ii Variables and Data .........................................................................................18 Types of Variables .......................................................................................................18 Declaration ..................................................................................................................18 int variables....................................................................................................19 float variables ................................................................................................19 char variables ................................................................................................19 Missing Types ................................................................................................19 Variable Declaration ....................................................................................................19 Giving Values to Variables ..........................................................................................20 Expressions ....................................................................................................21 Types of Data in Expressions..........................................................................22 Getting Values into the Program ..................................................................................23 Writing a Program 24 Comments......................................................................................................24 Program Flow ..............................................................................................................24 Conditional Execution - if...............................................................................25 Conditions and Relational Operators ..............................................................26 Combining Logical Operators.........................................................................27 Lumping Code Together.................................................................................27 Magic Numbers and #define..........................................................................28 Loops .............................................................................................................29 Breaking Out of Loops ...................................................................................32 Going Back to the Top of a Loop ....................................................................32 More Complicated Decisions ..........................................................................33 Complete Glazing Program ............................................................................33 Operator Shorthand........................................................................................34 Statements and Values....................................................................................35 Neater Printing...............................................................................................36 Functions 37 Functions So Far ..........................................................................................................37 Function Heading ...........................................................................................37 Function Body ................................................................................................38 return .............................................................................................................38 Calling a Function..........................................................................................38 Scope .............................................................................................................39 Variables Local to Blocks ...............................................................................40 Full Functions Example..................................................................................40 Pointers.......................................................................................................................42 NULL Pointers ...............................................................................................44 Pointers and Functions ...................................................................................44 Static Variables............................................................................................................45 Arrays 46 Why We Need Arrays ..................................................................................................46 Sorting ...........................................................................................................47 Array Types and Sizes..................................................................................................49 More Than One Dimension ............................................................................50 Switching 53 Making Multiple Decisions ..........................................................................................53 Strings 55 iii How long is a piece of string?.......................................................................................55 Putting Values into Strings ..........................................................................................56 Using Strings ...............................................................................................................57 The String Library .......................................................................................................58 strcpy .............................................................................................................59 strcmp ............................................................................................................59 strlen..............................................................................................................59 Reading and Printing Strings .......................................................................................59 Bomb Proof Input.........................................................................................................60 Structures 61 What is a Structure?.....................................................................................................61 How Structures Work...................................................................................................63 Pointers to structures....................................................................................................63 Defining your own Types .............................................................................................64 Files 65 When do we use Files? .................................................................................................65 Streams and Files ...........................................................................................65 fopen and fclose ...........................................................................................................66 Mode String ...................................................................................................68 File Functions ..............................................................................................................70 fread and fwrite ..............................................................................................70 The End of the File and Errors.....................................................................................71 Memory 72 Fetching Memory.........................................................................................................72 malloc ............................................................................................................72 free.................................................................................................................73 The heap......................................................................................................................73 C and Large Programs 74 Building Large Programs in C .....................................................................................74 The Compile and Link Process .......................................................................74 Referring to External Items ............................................................................75 The Make Program.........................................................................................76 Projects ..........................................................................................................76 The C Pre-Processor.....................................................................................................77 The #include Directive ...................................................................................77 Conditional Compilation ................................................................................77 A Sample Project .........................................................................................................78 The Problem...................................................................................................78 The Data Structure .........................................................................................78 Program Files.................................................................................................79 The Most Important Bit!.................................................................................84 Glossary of Terms 93

tech_savvy_guy
评论 3
收藏 已收藏
分享
返回顶部
米格315 CSDN会员
汇编语言 21,500 成员 41,619 内容