вот чем отличается:
Код:
; /+===========================================================+/
; // //
; // Open all Needed Libraries and Try Optional Ones. //
; // //
;/+===========================================================+/
OpenLibs
;==== Exec Always needed !
move.l #EM0,Exitmessage
move.l Execbase,a6
move #39,d0 ;version
lea IntName,a1
call OpenLibrary
move.l d0,Intuibase
tst.l d0
beq .fail
;==== Dos needed for VBL task (NO MORE VBLTASK).
;==== dos always needed.
IFNE Own_Dosbase
move.l #EM1,Exitmessage
move #36,d0 ;version
lea DosName,a1
call OpenLibrary
move.l d0,_DOSBase
tst.l d0
beq .fail
ENDC
;==== ASL needed for screen request.
move.l #EM2,Exitmessage
move #36,d0 ;version
lea _AslName,a1
call OpenLibrary
move.l d0,Aslbase
tst.l d0
beq.b .fail
;==== Graphics always needed.
move.l #EM3,Exitmessage
move #39,d0 ;version
lea GraName,a1
call OpenLibrary
move.l d0,GfxBase
tst.l d0
beq.b .fail
;==== Cybergraphics.library can be here or NOT !!
;==== if d0 = 0, CGX Screens are impossible.
move #39,d0 ;version number was not checked.
lea Cgxname,a1 ;"39" must work for CGX3 and 4.
call OpenLibrary
move.l d0,Cgxbase ;can not cause error.
;===== we MUST open timer.device to synchronise the scripts.
; OpenDevice("timer.device",0L, (struct IORequest *) AudioIO ,0L);
;== alloc some iorequest
;error = OpenDevice(devName, unitNumber, iORequest, flags)
;D0 A0 D0 A1 D1
move.l #IOTV_SIZE,d0 ;size of "iorequest for timer device" structure.
jsr _AllocRmb
tst.l d0
beq.s .fail
move.l d0,TimerDev
move.l d0,a1
move.l Execbase,a6
lea Timername,a0
move.l #UNIT_MICROHZ,d0 ; It has precision down to about 2 microseconds,...
clr.l d1
call OpenDevice
move.l d0,TimerDevResult ;used for closing
tst.l d0 ; 0 if successful
beq .nodevice
clr.l d0
bra.s .yesdevice
.nodevice
moveq.l #-1,d0
.yesdevice
;Note: if CGX is not present, 0 is returned as base.
; It can be a nice way to decide if the screen will be
; AGA or CGX.
;
.ok
moveq.l #-1,d0 ;no error!!!
.fail
rts
=)
Ребятки, либо я плохой учитель либо вы аккордионисты.