Sunday, October 24, 2010

Compilation of various source - break


title Control-Break handler for Lattice C programs
name break
include dos.mac

;
; Control-Break Interrupt Handler for Lattice C programs
; Running on IBM PCs (and ROM BIOS compatibles)
;
; Ray Duncan, May 1985
;
; This module allows C programs running on the IBM PC
; To retain control when the user enters a Control-Break
; Or Control-C. This is accomplished by taking over the
; Int 23H (MS-DOS Control-Break) and Int 1BH (IBM PC
; ROM BIOS Keyboard Driver Control-Break) interrupt
; Vectors. The interrupt handler sets an internal
; Flag (which must be declared STATIC INT) to TRUE within
; The C program; the C program can poll or ignore this
; Flag as it wishes.
;
; The module follows the Lattice C parameter passing
; Conventions, and also relies on the Lattice file DOS.MAC
; For the definition of certain constants and macros.
;
; The Int 23H Control-Break handler is a function of MS-DOS
; And is present on all MS-DOS machines, however, the Int 1BH
; Handler is a function of the IBM PC ROM BIOS and will not
; Necessarily be present on other machines.
;
if lprog
args equ 6; offset of arguments, Large models
else
args聽聽聽 equ聽聽聽聽 4聽聽聽聽聽聽聽聽聽聽聽聽聽聽 ;offset of arguments, Small models
聽聽聽聽聽聽聽 endif

cr equ 0dh; ASCII carriage return
lf equ 0ah; ASCII line feed

聽聽聽聽聽聽聽 pseg

聽聽聽聽聽聽聽 public聽 capture,release ;function names for C

;
; The function CAPTURE is called by the C program to
; take over the MS-DOS and keyboard driver Control-
; Break interrupts (1BH and 23H).聽 It is passed the
; address of a flag within the C program which is set
; to TRUE whenever a Control-Break or Control-C
; is detected.聽 The function is used in the form:
;
;聽聽聽聽聽聽聽聽聽聽聽聽聽聽 static int flag;
;聽聽聽聽聽聽聽聽聽聽聽聽聽聽 capture(&flag)
;

capture proc聽聽聽 near聽聽聽聽聽聽聽聽聽聽聽 ;take over Control-Break

聽聽聽聽聽聽聽 push聽聽聽 bp聽聽聽聽聽聽聽聽聽聽聽聽聽 ;interrupt vectors
聽聽聽聽聽聽聽 mov聽聽聽聽 bp,sp
聽聽聽聽聽聽聽 push聽聽聽 ds

聽聽聽聽聽聽聽 mov聽聽聽聽 ax,word ptr [bp+args]
聽聽聽聽聽聽聽 mov聽聽聽聽 cs:flag,ax聽聽聽聽聽 ;save address of integer
聽聽聽聽聽聽聽 mov聽聽聽聽 cs:flag+2,ds聽聽聽 ;flag variable in C program

聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 ;pick up original vector contents
聽聽聽聽聽聽聽 mov聽聽聽聽 ax,3523h聽聽聽聽聽聽聽 ;for interrupt 23H (MS-DOS
聽聽聽聽聽聽聽 int聽聽聽聽 21h聽聽聽聽聽聽聽聽聽聽聽聽 ;Control-Break handler)
聽聽聽聽聽聽聽 mov聽聽聽聽 cs:int23,bx
聽聽聽聽聽聽聽 mov聽聽聽聽 cs:int23+2,es

聽聽聽聽聽聽聽 mov聽聽聽聽 ax,351bh聽聽聽聽聽聽聽 ;and interrupt 1BH
聽聽聽聽聽聽聽 int聽聽聽聽 21h聽聽聽聽聽聽聽聽聽聽聽聽 ;(IBM PC ROM BIOS keyboard driver
聽聽聽聽聽聽聽 mov聽聽聽聽 cs:int1b,bx聽聽聽聽 ;Control-Break interrupt handler)
聽聽聽聽聽聽聽 mov聽聽聽聽 cs:int1b+2,es

聽聽聽聽聽聽聽 push聽聽聽 cs聽聽聽聽聽聽聽聽聽聽聽聽聽 ;set address of new handler聽聽聽聽
聽聽聽聽聽聽聽 pop聽聽聽聽 ds
聽聽聽聽聽聽聽 mov聽聽聽聽 dx,offset ctrlbrk
聽聽聽聽聽聽聽 mov聽聽聽聽 ax,02523H聽聽聽聽聽聽 ;for interrupt 23H
int 21h
聽聽聽聽聽聽聽 mov聽聽聽聽 ax,0251bH聽聽聽聽聽聽 ;and interrupt 1BH
int 21h

聽聽聽聽聽聽聽 pop聽聽聽聽 ds聽聽聽聽聽聽聽聽聽聽聽聽聽 ;restore registers and
聽聽聽聽聽聽聽 pop聽聽聽聽 bp聽聽聽聽聽聽聽聽聽聽聽聽聽 ;return to C program
ret

capture endp


;
; The function RELEASE is called by the C program to
; return the MS-DOS and keyboard driver Control-Break
; interrupt vectors to their original state.聽 Int 23h is
; also automatically restored by MS-DOS upon the termination
; of a process, however, calling RELEASE allows the C
; program to restore the default action of a Control-C
; without terminating.聽 The function is used in the form:
;
;聽聽聽聽聽聽聽聽聽聽聽聽聽聽 release()
;

release proc聽聽聽 near聽聽聽聽聽聽聽聽聽聽聽 ;restore Control-Break interrupt
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 ;vectors to their original state聽聽聽聽聽聽聽
聽聽聽聽聽聽聽 push聽聽聽 bp
聽聽聽聽聽聽聽 mov聽聽聽聽 bp,sp
聽聽聽聽聽聽聽 push聽聽聽 ds

聽聽聽聽聽聽聽 mov聽聽聽聽 dx,cs:int1b聽聽聽聽 ;set interrupt 1BH
聽聽聽聽聽聽聽 mov聽聽聽聽 ds,cs:int1b+2聽聽 ;(MS-DOS Control-Break
聽聽聽聽聽聽聽 mov聽聽聽聽 ax,251bh聽聽聽聽聽聽聽 ;interrupt handler)聽聽聽聽
int 21h

聽聽聽聽聽聽聽 mov聽聽聽聽 dx,cs:int23聽聽聽聽 ;set interrupt 23H
聽聽聽聽聽聽聽 mov聽聽聽聽 ds,cs:int23+2聽聽 ;(IBM PC ROM BIOS keyboard driver
聽聽聽聽聽聽聽 mov聽聽聽聽 ax,2523h聽聽聽聽聽聽聽 ;Control-Break interrupt handler)
int 21h

聽聽聽聽聽聽聽 pop聽聽聽聽 ds聽聽聽聽聽聽聽聽聽聽聽聽聽 ;restore registers and
聽聽聽聽聽聽聽 pop聽聽聽聽 bp聽聽聽聽聽聽聽聽聽聽聽聽聽 ;return to C program
ret

release endp

;
; This is the actual interrupt handler which is called by
; the ROM BIOS keyboard driver or by MS-DOS when a Control-C
; or Control-Break is detected.聽 Since the interrupt handler
; may be called asynchronously by the keyboard driver, it
; is severely restricted in what it may do without crashing
; the system (e.g. no calls on DOS allowed).聽 In this
; version, it simply sets a flag within the C program to
; TRUE to indicate that a Control-C or Control-Break has
; been detected; the address of this flag was passed
; by the C program during the call to the CAPTURE function.
;

ctrlbrk proc聽聽聽 far聽聽聽聽聽聽聽聽聽聽聽聽 ;Control-Break interrupt handler

聽聽聽聽聽聽聽 push聽聽聽 bx聽聽聽聽聽聽聽聽聽聽聽聽聽 ;save affected registers
聽聽聽聽聽聽聽 push聽聽聽 ds

聽聽聽聽聽聽聽 mov聽聽聽聽 bx,cs:flag聽聽聽聽聽 ;set flag within C program
聽聽聽聽聽聽聽 mov聽聽聽聽 ds,cs:flag+2聽聽聽 ;to "True"
聽聽聽聽聽聽聽 mov聽聽聽聽 word ptr ds:[bx],-1

聽聽聽聽聽聽聽 pop聽聽聽聽 ds聽聽聽聽聽聽聽聽聽聽聽聽聽 ;restore registers and exit
聽聽聽聽聽聽聽 pop聽聽聽聽 bx

聽聽聽聽聽聽聽 iret

ctrlbrk endp


flag聽聽聽 dw聽聽聽聽聽 0,0聽聽聽聽聽聽聽聽聽聽聽聽 ;long address of C program''s
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 ;Control-Break detected flag

int23聽聽 dw聽聽聽聽聽 0,0聽聽聽聽聽聽聽聽聽聽聽聽 ;original contents of MS-DOS
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 ;Control-Break Interrupt 23H
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 ;vector

int1b聽聽 dw聽聽聽聽聽 0,0聽聽聽聽聽聽聽聽聽聽聽聽 ;original contents of ROM BIOS
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 ;keyboard driver Control-Break
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 ;Interrupt 1BH vector


聽聽聽聽聽聽聽 endps

end






相关链接:



Report Download Managers



Photoshop SAVE Format



Longhorn Beta1 Only Compatible With Two Kinds Of Graphics Chips



Tencent no winner already had three incidents



Dell CEO Or After Class Due To Financial Scandals



excel in all TYPES of data input methods and



Guiyang Information Industry Bureau of his party visited the headquarters of King Abacus



Baidu will increase the proportion into win-win situation with the station



MP4 to FLV



TOD to WMV



MOV to iPod



Easy TO use Browsers



Production activities yourself menu bar



Feeling so Steady and VB API (1)



Shop Seasonal - Screen Savers



Wednesday, October 13, 2010

3G is not a cover


With several major 3G operator's specific position on the Chinese 3G start-up idea has become increasingly clear, up to now, China has already launched 3G into the basic facts, then we need to explore is how a previous law, how to send license , operators on how the layout.

In fact, the topic of the 3G I have talked a lot, and the reason turned out one more time again, is to see a lot of comments recently out of which more representative is: According to China Mobile's 3G development ideas, even if its to build TD-SCDMA network equipment vendors may be difficult to get short-term relatively large income; In addition, some people think that China Mobile has recently launched upgrade EDGE and TD may have conflicts.

For these remarks, I would like on to the next one of my basic viewpoints: from the present perspective, skip the 3G De Xiang Fa yes impossible, WiMax 绛?technology is difficult to enter the market short-term Huan mainstream, Gang Gang I am in a blog 涓?Yijingxiangxi expounded on this point, 4G technologies such as standardization is not clear, but industrialization is take a long time, in this based on the 3G launch has become inevitable.

In addition, I would like to stress that the input is on the 3G, this is equipment manufacturers are most concerned about the global 3G long-term slump, a large number of major equipment manufacturers have invested in 3G at a lot of money, after the update has made the rapid 3G equipment manufacturers must continue to invest, which is able to eventually recover input costs, the only way to 3G, so in the evolution of 3G technology, the equipment manufacturers to upgrade to a passive race.

Recently, China Mobile boss Wang on the 2G network to rely on local building 3G networks think so many people worried, 3G investment in the end is there? I think this is not necessary to worry about, according to Wang's idea, through the transformation of 2G 3G core network to achieve a shared purpose and, in fact, this attitude is one thing to be happy, description, led by China Mobile China 3G war is likely to be staged in advance, while in the long ago, China Mobile is also non-public Xing said it would consider upgrading nationwide EDGE, equipment manufacturers from this progressive strategy to move benefit, because the quick success of the entire pie is no good 3G, 3G pie made the larger, individual cake higher interest.

In addition, there is no escaping the fact that, at present it from the network construction cost, there is a polarization of the situation, it is said very little, a few hundred million people say a lot, to hundreds of billions. In fact, these figures are correct, the key to it is not at once put into the. Network construction costs from the point of view, including two wireless networks and most of the core network, including wireless network investment in basic accounting for about 75%, even if the 2G operators to transform the core network and location, resources, and a large number of inputs is also necessary .

From the above, I think that China's 3G is not a cover, it is hard cash to prop up the market, hold and cultivate the market demand will benefit operators, equipment manufacturers will be assigned to the of that one. But, the 3G, should also include a 2.5G, 2.75G and 3G market after.

Data from the current Chinese market demands, large market demand for 3G has not formed, 3G licensing policy has not yet enacted, in this case, before the development of 3G technology will be the main force, and in possession of a very long time substantial part of the share, such as moving from GPRS to EDGE in the transition; the former is bound to promote the development of 3G, 3G directness back forward, but you can not deny that they are 3G.

A month ago, I wrote a chapter blog: 3G narrowly on the interests of China telecommunications market, now look, this line of thinking is the need of our operators and equipment manufacturers to think carefully, and only a narrow 3G excluding simple argument, a comprehensive understanding of 3G meaning, can be better to guide and nurture the market may be in a very long period of time, we do not find the killer application of 3G.






相关链接:



Collective Wisdom light green hope



SARFT Responded: "shield Acronym" Department Of Misunderstanding



Command & Conquer 3 - the most difficult opponents experience



Nine Ways to recruit good staff



Comment Covert Surveillance



Myself A Good Looking Word Text Box



Bangalore, Dalian, China-style Heavy Road Test



TOD Converter



Job On The Road A Few Lessons To Remember



for you Download Managers



XviD to iPhone



Jsp custom tag in depth FROM shallow to explain in detail



The NUMBER of SLM earnings



Perfect Songs I Enjoy The Cool Music Box Full Support Win7



introduction AD Blockers



3GPP to WMV



Saturday, October 9, 2010

Customer is not his wife is a lover of God is



Customers are wives, need we can really operate, required to achieve life-long service. Customer is not just customer transactions occurred, including the potential development of the customer. For the latter, we have to careful management, that should be the same as the lover in hot pursuit, so I think the customers are his wife, need life-long service, and potential customers, they have to like Valentine's, requires hot pursuit!

Treatment of customers, we usually deal depending on whether he happened into two categories, namely, customers (closing) and potential customers (not traded). Turnover value of customers based on their own are divided into small, medium, large, VIP customers; no transaction sales transactions according to the possibility of customers, divided into A, B, C, D four grades.

Customers are his wife, need life-long service, and why?

Because often men and women after marriage, marriage will remain for some time. Maybe 2-3 years, both sides lost their passion and vitality for life, merely to maintain, and perhaps it is for kids. At this point, if you do not operate her, and usually there will be a number of complaints, grievances, nagging, complain, or even for each other, having an affair and so on. You have Haikudanlan between, eachother, life service will be gone. If you do not check and do not reflect, not aware, the service is always at a standstill, never hesitate, never creative. You will only make one lose out, lose power, results of your customers will really separate.

So, as customers like the wife, if you treat the customer is always static, content and form is almost no difference, let alone to help customers create value, generate new opportunities, let her and you build relationships with high loyalty , also just maintain the status quo, very easy to incite defection of your competitors.

Even if she does not leave you, you will not develop his values, or even a loss. For enterprises, the value is not particularly large. This customer loyalty is not even very concerned about your customers.

Potential customers, like lovers, need to chase the plane, why?

Because the potential customers for each company are looking forward to the development, while the two major potential customers is not a measure of business strength of protection. Development of potential customers the most important purpose is to let her be your real customers, which hope to become your life-long lover of his wife. But the deal lover, you can not see a simple chat will be your wife. You need to give your lover the performance of the stage, let her have a little favor for you, hand in hand chance to own their love is, and finally walked down the red carpet, into the wedding hall. This four-step needs at least the middle of the development. Similarly, treatment of lovers, according to the closeness of her relationship with you to determine the possibility of its development, which is necessary, but also in the process of service need to continue to serve, to provide a feat she was very surprised, very exciting time activities, a happy honeymoon and so on.鍙湁涓嶆柇鍒涢?鏂般?濂囥?鐗圭殑涓滆タ锛屾墠浼氭劅鍒颁綘涓庡叾浠栦汉涓嶄竴鏍凤紝鍚﹀垯浣犺儨绠楃殑鏈虹巼杈冨皬銆傚洜涓哄ス涓嶅儚鑰佸﹩锛屽ぉ缁忓湴涔夛紝娉曞緥瑙勫畾锛屼綘鑷冲皯涓?鏃堕棿鍙互楂樻灂鏃犲咖锛岀劧鑰屾儏浜轰笉琛岋紝鍙湁绱х揣鍦版姄浣忎竴娆℃満浼氾紝鐢ㄥ績鍦颁负鍏舵湇鍔★紝鐪熷績鍦板叧蹇冨ス锛屾墠浼氭湁鍙兘鎴愪负鑰佸﹩銆?br />
銆??鎵?互锛屾綔鍦ㄩ【瀹㈠儚鎯呬汉锛岀揣杩戒笉鑸?

銆??鏂囧姏鍐?瀹炴垬钀ラ攢涓撳;缁堢寤鸿绠$悊閿?敭涓撳;缁堢鍥㈣喘涓撳;鍥介檯鑱屼笟鍩硅甯堣涓氬崗浼氫笁鏄熷煿璁笀;缇庡浗ICQAC鍥介檯鑱屼笟鍩硅甯堛?澶氬鍩硅鍜ㄨ鏈烘瀯鐗硅仒鍏艰亴鍩硅璁插笀;涓浗鍩硅澶ц仈鐩熴?鍥介檯鑱屼笟鍩硅甯堣涓氫細鍛樸?涓浗鎬昏鍩硅浼氬憳......锛屾湁7骞寸粓绔攢鍞粡楠?浜斿勾涓氫綑鍩硅缁忓巻;







相关链接:



mfc80u dll was Not found error fix it safely



Dell amended financial statements over THE past four years, net profit is expected to cut 150 millio



Chip PC industry suppliers and the Evolution of two-man



Health And Nutrition for you



Reviews Covert Surveillance



DivX to MPEG



MP4 to 3G2



Official Contract Killer 3 Cheats



PPT To Teach You To Easily Modify The Colors In The Clip Art



A domestic room, map description IDC



21st Century Business Herald: reversal eBay



18th "Gold-collar workplace," Senior Human Resources Fair



FLV to VOB