⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dototal.asm

📁 汇编&c语言code
💻 ASM
字号:
; Turbo Assembler    Copyright (c) 1988, 1991 By Borland International, Inc.

; DOTOTAL.ASM - Example for interfacing C++ and Turbo Assembler

; From the Turbo Assembler User's Guide - Interfacing Turbo Assembler
;                                          with Borland C++

       DOSSEG                       ;select Intel-convention
                                    ;segment ordering
       .MODEL  SMALL                ;select small model 
                                    ;(nearcode and data)
       .DATA                        ;TC-compatible initialized
                                    ;data segment
       EXTRN   _Repetitions:WORD    ;externally defined
       PUBLIC  _StartingValue       ;available to other modules
_StartingValue  DW  0
       .DATA?                       ;TC-compatible uninitialized
                                    ;data segment
RunningTotal    DW  ?
       .CODE                        ;TC-compatible code segment
       PUBLIC  _DoTotal
_DoTotal        PROC                ;function (near-callable in
                                    ;small model)
       mov     cx,[_Repetitions]    ;# of counts to do
       mov     ax,[_StartingValue]
       mov     [RunningTotal],ax    ;set initial value
TotalLoop:
       inc     [RunningTotal]       ;RunningTotal++
       loop    TotalLoop
       mov     ax,[RunningTotal]    ;return final total
       ret
_DoTotal        ENDP
       END

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -