home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magazyn Amiga Shareware Floppies
/
ma45.dms
/
ma45.adf
/
Listingi
/
MagazynAMIGA3
/
KursAMOSA.txt
< prev
next >
Wrap
Text File
|
2002-10-23
|
2KB
|
86 lines
' ******* DOS: Zabezpieczenie *******
MASKA$="HSPARWED"
PLIK$=Fsel$("")
If PLIK$="" Then End
PLIK$=PLIK$+Chr$(0)
'--------------------- bity protekcji
If Instr(MASKA$,"D")=0 Then Add BITY,1
If Instr(MASKA$,"E")=0 Then Add BITY,2
If Instr(MASKA$,"W")=0 Then Add BITY,4
If Instr(MASKA$,"R")=0 Then Add BITY,8
If Instr(MASKA$,"A") Then Add BITY,16
If Instr(MASKA$,"P") Then Add BITY,32
If Instr(MASKA$,"S") Then Add BITY,64
If Instr(MASKA$,"H") Then Add BITY,128
' -------------------- ustaw
Dreg(1)=Varptr(PLIK$)
Dreg(2)=BITY
_PROTECT=Doscall(-186)
If _PROTECT=0
Print "B¥d!"
End If
' ******* Exec: taski *******
Print "Zwyka pr©dko:";
Gosub TEST
Wait Key
Home
Cls 1
'------------------ zamykamy taski
Print "Task zamkni©ty:";
_FORBID=Execall(-132)
Gosub TEST
'------------------ otw¢rz zamkni©te taski
_PERMIT=Execall(-138)
End
'------------------ zmierz pr©dko
TEST:
T=Timer
For I=0 To 320
For I2=10 To 190
Plot I,I2
Next I2
Next I
T=(Timer-T)/50
Print T;" sekund!"
Return
' ******* DOS: Czas systemowy *******
'------------------- bufor
TEKST$=Space$(12)+Chr$(0)
'------------------- we« czas systemowy
Dreg(1)=Varptr(TEKST$)
_DATESTAMP=Doscall(-192)
'------------------- policz
G=Leek(Varptr(TEKST$)+4)
S=Leek(Varptr(TEKST$)+8)/50
M=G mod 60 : G=G/60
G$="00" : M$="00" : S$="00" :
Right$(G$,Len(Str$(G))-1)=Str$(G)-" "
Right$(M$,Len(Str$(M))-1)=Str$(M)-" "
Right$(S$,Len(Str$(S))-1)=Str$(S)-" "
'------------------- wywietl
Print G$+":"+M$+":"+S$
' ******* Exec: Jak sprawdziê wektory? *******
EXECBASE=Leek(4)
'---------------- sprawd« wektory
For I=0 To 4
Read WEKTOR$,ADRES
N=Leek(EXECBASE+ADRES)
Print WEKTOR$;Hex$(N,8);
If N Then Print " co tu mamy" Else Print " ok"
Next
'------------ nazwa wektora, adres
Data "ColdCapture ",$2A
Data "CoolCapture ",$2E
Data "WarmCapture ",$32
Data "KickMemPtr ",$222
Data "KickTagPtr ",$226