西西河

主题:【转贴】‘词话体’创作范例 -- 坐看风起云涌时

共:💬22 🌺8
全看分页树展 · 主题 跟帖
家园 【文摘】汇编语言版

发信人: GeorgeSoros (George Soros), 信区: Joke

标 题: 汇编语言版

发信站: 水木社区 (Tue Nov 14 22:22:39 2006), 站内

【 在 venta (The last of the three) 的大作中提到: 】

: 谁来个汇编语言的

.386

.model flat, stdcall

option casemap: none

include \masm32\include\windows.inc

include \masm32\include\kernel32.inc

includelib \masm32\lib\kernel32.lib

include \masm32\include\user32.inc

includelib \masm32\lib\user32.lib

.data

RoomNum DB 4 DUP(?)

A DB "Boy1", 0

B DB "Girl1", 0

C DB "Girl2", 0

D DB "Police1", 0

Alert DB "xxx is missing.", 0

MessageTitle DB " I got them", 0

Message DB "SEX INTERRUPTED!", 0

.code

start:

call AllocNewRoom

cmp ax, 0

je exit

mov RoomNum, ax

push RoomNum

push 24

push offset A

call CheckIn

push RoomNum

push 24

push offset B

call CheckIn

push offset A

call SetModileOff

push offset B

call SetModileOff

push offset A

call GetNumber

push ax

push offset C

call CallMobile

cmp ax, NOSIGNAL

jne AllRight

push offset Alert

push offset D

call ReportTo

push offset A

push Lingshan

call Search

cmp ax, 0

je NotFound

push offset B

push Lingshan

call Search

cmp ax, 0

je NotFound

push MB_OK

push offset MessageTitle

push offset Message

push 0

call MessageBox

AllRight:

NotFound:

push offset A

call SetModileOn

push offset B

call SetModileOn

exit:

push 0

call ExitProcess

end start

全看分页树展 · 主题 跟帖


有趣有益,互惠互利;开阔视野,博采众长。
虚拟的网络,真实的人。天南地北客,相逢皆朋友

Copyright © cchere 西西河