Results 1 to 25 of 38
Thread: BASIC
Hybrid View
-
21st November 2008 10:26 #1Registered User
Join Date: Aug:2007
Location:
Posts: 1,335
-
21st November 2008 10:49 #2Prolemuris
Join Date: Oct:2006
Location: Varna
Posts: 4,296
GW-Basic User's Guide
STRIG, ON STRIG
-
26th November 2008 01:30 #3
Join Date: Apr:2006
Location:
Posts: 8,666
... ' . - qbasic ?
http://www.qbasicstation.com/index.php?c=t_adv
:
http://www.petesqbsite.com/
-
26th November 2008 20:15 #4Registered User
Join Date: Aug:2007
Location:
Posts: 1,335
.
:
First BASIC - .
Turbo BASIC - ,
Power BASCI .
QBASIC , , qbasic -
, ,
.
-
26th November 2008 20:50 #5Prolemuris
Join Date: Oct:2006
Location: Varna
Posts: 4,296
Quick Basic , MS
-
5th January 2009 17:05 #6Registered User
Join Date: Aug:2007
Location:
Posts: 1,335
.
?
2?
., ,
.
-
5th January 2009 17:18 #7
(chislo And 1) = 0 -->
Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others
-
5th January 2009 17:21 #8
, - .
.. , icaci.EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|
-
13th January 2009 10:00 #9Registered User
Join Date: Aug:2007
Location:
Posts: 1,335
.
FirstBASIC, ASM .Last edited by PET3; 18th January 2009 at 21:12.
, ,
.
-
18th January 2009 21:21 #10Registered User
Join Date: Aug:2007
Location:
Posts: 1,335
2.
136 16 .
.
. Microsoft (First BAISC) - ?!!! .
-. . -, . Demo :
cls
gosub init
rem *Cicle*
for b=Degbgn to Degend
a=b/10
gosub circ
gosub colors
pset (x,y)
next
stop
init:
screen 12
constant=3.1415926/180
rem *Radiuses*
Rx=100
Ry=70
rem *Location*
Lx=200
Ly=200
rem *Template*
circle (200,200),100,12,,,0.7
rem *Arch*
Degbgn=0
Degend=1800
colorh=14
colorl=11
return
circ:
rem *Deg to Rad & coordinates*
c=a*constant
cosx=cos(c)
siny=sin(c)
cox=cosx*Rx+Lx
x=ROUND (cox,0)
siy=siny*Ry+Ly
y=ROUND (siy,0)
return
even:
rem *Even or Uneven*
d=value/2
e=fix(d)
f=d-e
if f=0 then g=0:goto endeven
if f<>0 then g=1:goto endeven
endeven:
return
colors:
rem *Rows&Columns*
value=x
gosub even
Rowx=g
value=y
gosub even
Coly=g
if Rowx=0 and Coly=1 then color colorh
if Rowx=1 and Coly=0 then color colorh
if Rowx=1 and Coly=1 then color colorl
if Rowx=0 and Coly=0 then color colorl
return
.: , ,
, - 
24.01.2008{ "/"
even:
rem *Even or Uneven*
binar$=BIN$(value)
compare$=RIGHT(binar$,1)
if compare$=0 then g=0:goto endeven
if compare$=1 then g=1:goto endeven
endeven:
return
}14.01.2008Last edited by PET3; 24th January 2009 at 16:52.
, ,
.
-
20th January 2009 19:42 #11Registered User
Join Date: Aug:2007
Location:
Posts: 1,335
DOS. , .
16-, 32kB ( 10kB), , , 320MB, 2200
cls
open "test.iso" for binary as #1
lenght=LOF(1)
packets=lenght/10240
constant=100/packets
open "copy.iso" for binary as #copy
DO UNTIL y=-1
get$ #1,10240,st$
a=a+1
locate 10,50
percent=a*constant
if percent>100 then percent=100
print percent;"% "
put$ #copy,st$
y=EOF(1)
WEND
close #1
close #copy
DMA, 4 8237 - http://logiclab.teipir.gr/chiplisting/8237.pdfLast edited by PET3; 23rd January 2009 at 10:50.
, ,
.
-
25th January 2009 21:01 #12Registered User
Join Date: Aug:2007
Location:
Posts: 1,335
. - . 2 . . Demo , . , . . 3 / - "", "", " ". 2 - . - .
cls
clear
wordend=4
lenght=5
rem pointer=1 ' .
cycle:
word=word+1
gosub separators
pointer=lenght*word-lenght-1
gosub test
sepposition=instr(datas$,separator$)
difference=sepposition*word-pointer
result$=left$(datas$,difference)
gosub res
if word=wordend then endcycle
goto cycle
endcycle:
print xbgn;ybgn;xend;yend
stop
separators:
if word=1 then separator$=","
if word=2 then separator$="-"
if word=3 then separator$=","
if word=4 then separator$=" "
return
test:
if word=1 then datas$="4681,"
if word=2 then datas$="8337-"
if word=3 then datas$="9635,"
if word=4 then datas$="7215 "
return
res:
if word=1 then xbgn=val(result$)
if word=2 then ybgn=val(result$)
if word=3 then xend=val(result$)
if word=4 then yend=val(result$)
return
window 4681,8337-9635,7215
xbgn=4681 ybgn=8337 xend=9635 yend=7215
- " ", - . . , pointer file pointer SEEK. , window, file pointer 8 .
{30.01.2009} 2 , :
cls
clear
wordend=4
lenght=5
constpointer=0 'konstanta za premestvane na file pointer sled komandata
cycle:
word=word+1 'broq4 na cikyla
gosub separators
gosub test
sepposition=instr(datas$,separator$) 'opredelqne poziciqta na separatora
difference=lenght-1 'iz4islqvane na broq cifri v dumata
pointer=word*lenght-4 'iz4islqvane na4aloto na stringa
fpointer=pointer+constpointer 'iz4islqvane na file pointer
result$=left$(datas$,difference) 'izvejdane na rezultat v stringov vid
gosub res
if word=wordend then endcycle
goto cycle
endcycle:
print xbgn;ybgn;xend;yend
stop
separators:
if word=1 then separator$=","
if word=2 then separator$="-"
if word=3 then separator$=","
if word=4 then separator$=" "
return
test:
if word=1 then datas$="1675,"
if word=2 then datas$="8876-"
if word=3 then datas$="6769,"
if word=4 then datas$="8977 "
return
res:
if word=1 then xbgn=val(result$)
if word=2 then ybgn=val(result$)
if word=3 then xend=val(result$)
if word=4 then yend=val(result$)
return
, openfile, opendir, xframe, yframe, window, catalog, corner , , , .
{30.01.2009}Last edited by PET3; 30th January 2009 at 10:40.
, ,
.
-
3rd February 2009 11:13 #13Registered User
Join Date: Aug:2007
Location:
Posts: 1,335
. 1 .
cls
clear
open "catalog.fun" for input as #catalog
strng$=input$(6,#catalog)
gosub findcom
goto core
'....
endinter:
print "Command:"regcom;"Parameters:"xbgn;ybgn; xend;yend
close #catalog
stop
findcom:
flagcom=instr(strng$,"window")
if flagcom=1 then regcom=1:gosub wininit
'....
return
wininit:
wordend=4
lenght=5
constpoint=6
return
datacom:
seek #catalog,fpointer
datas$=input$(lenght,#catalog)
return
separators:
if word=1 then separator$=","
if word=2 then separator$="-"
if word=3 then separator$=","
if word=4 then separator$=" "
return
res:
if word=1 then xbgn=val(result$)
if word=2 then ybgn=val(result$)
if word=3 then xend=val(result$)
if word=4 then yend=val(result$)
return
core:
word=word+1 'broq4 na cikyla
pointer=word*lenght-4 'iz4islqvane na4aloto na stringa
fpointer=pointer+constpoint 'iz4islqvane na file pointer
gosub separators
gosub datacom
sepposition=instr(datas$,separator$) 'opredelqne poziciqta na separatora
difference=lenght-1 'iz4islqvane na broq cifri v dumata
result$=left$(datas$,difference) 'izvejdane na rezultat v stringov vid
gosub res
if word=wordend then endcore
goto core
endcore:
goto endinter
, ASCII . , Carriage Return , . #13 (- CR + End of Text ), #10 (- CR + Start of Text ) ASCII . , ReadFirst ReadNext, BIOS FindFirst FindNext , , , . . ReadFirst ReadNext .Last edited by PET3; 3rd February 2009 at 11:58.
, ,
.
-
24th July 2009 18:22 #14Registered User
Join Date: Aug:2007
Location:
Posts: 1,335
.
FILEATTR , - 00h AL 57h AH. 22272d AX.
INT21h CALL INTERRUPT .
. 24*60*60 = 86400s . , /60/60 . .
.
:
CLS
a=3
OPEN "first.dat" FOR output AS #1
WRITE #1, a
CLOSE #1
DELAY 3
OPEN "first.dat" FOR input AS #1
INPUT #1, a
y=FILEATTR (#1,2)
REG 1, 22272
REG 2, y
CALL INTERRUPT 33
u=REG (3)
PRINT "file time:" u
i=REG (4)
PRINT "file data:" i
CLOSE #1
PRINT "file variable:"a
PRINT "DOS handle is:"y
16:37 -31561s. 17:55 -28935s. .
24.07.2009 15096.
.
.
.: " -16" :
10h23min10s => *2048 + *32 + /2 => 21221d;
29.07.1987 => (-1980)*512 + *32 + => 3837d.
, .
cls
a=3
open "first.dat" for output as #1
write #1, a
close #1
delay 3
open "first.dat" for input as #1
input #1, a
y=fileattr (#1,2)
reg 1, 22272
reg 2, y
call interrupt 33
u=reg (3)
print "file time:" u
i=reg (4)
m=i/512
n=FIX(m)
l=1980+n
o=m-n
p=o*16
k=FIX(p)
q=p-k
j=q*32
print "file data:"i"="j"."k"."l
close #1
print "file variable:"a
print "DOS handle is:"yLast edited by PET3; 24th July 2009 at 19:56.
, ,
.
-
24th July 2009 19:38 #15Have no fear ike iz here.
CPU Cx486DLC@40MHz, RAM 4MB, VGA Trident 512KB, HDD Conner 160MB, Monitor 14" Color
-
24th July 2009 19:40 #16Registered User
Join Date: Aug:2007
Location:
Posts: 1,335
,
, ,
.
-
29th August 2009 19:47 #17Registered User
Join Date: Aug:2007
Location:
Posts: 1,335
ASCII ASC, ASCII, SCREEN . IF-THEN . .
ASCII .
.
---------- 19:47 ---------- 19:22 ----------
. .
s$=CHR$(y)Last edited by PET3; 29th August 2009 at 19:34.
, ,
.
-
3rd September 2009 20:43 #18Registered User
Join Date: Aug:2007
Location:
Posts: 1,335
, , , , , . Long File Name DOS . FAT12/16/32, (offset) . -:
- ?
, , 5000 RAM , .
+ Short File Name.
, file$=DIR$("*.*",16) Find First file$=DIR$ Find Next, :
Find First ascend/descend, Find Next Find Previous ( ) .Code:ATTRFILE: DEFQUD filelength 'define 15 digits variable filename$=LEFT$(file$,8) 'separate name and suffix filesuffix$=RIGHT$(file$,3) OPEN file$ FOR BINARY AS #1 filehandle=FILEATTR (#1,2) 'get DOS file handle REG 1,&H5700 REG 2,filehandle CALL INTERRUPT &H21 timefile=REG(3) 'raw time datefile=REG(4) 'raw date REM ******************** REM * Time calculating * REM ******************** sign=SGN(timefile) IF sign=-1 THEN hour1=65536+timefile:tme$="p" IF sign=+1 THEN hour1=timefile:tme$="a" hour2=hour1/2048 hour=FIX(hour2) minute1=hour*2048 minute2=hour1-minute1 minute3=minute2/32 minute=FIX(minute3) second1=minute*32 second2=minute2-second1 second=second2*2 REM ******************** REM * Date calculating * REM ******************** year1=datefile/512 year2=FIX(year1) year=1980+year2 month1=year1-year2 month2=month1*16 month=FIX(month2) day1=month2-month day=day1*32 REM ************************ REM * Date&Time separators * REM ************************ sep2points$=":" sepdash$="-" seppoint$="." REM ********************* REM * String conversion * REM ********************* hour$=STR$(hour) minute$=STR$(minute) second$=STR$(second) year$=STR$(year) month$=STR$(month) day$=STR$(day) REM ***************** REM * String format * REM ***************** str1=hour str1$=hour$ GOSUB STRFORMAT hour$=str2$ str1=minute str1$=minute$ GOSUB STRFORMAT minute$=str2$ str1=second str1$=second$ GOSUB STRFORMAT second$=str2$ str1=day str1$=day$ GOSUB STRFORMAT day$=str2$ str1=month str1$=month$ GOSUB STRFORMAT month$=str2$ str1=year str1$=year$ GOSUB STRFORMAT year$=str2$ filelength=LOF(1) 'get Real file size filelength$=STR$(filelenght) filelength$=REMOVE$(filelength$," ") 'Remove spaces strlength=LEN(filelength$) appendix=10-strlength nullstr$=" " FOR nullcount=1 TO appendix filelength$=nullstr$+filelength$ 'adding blank spaces NEXT nullcount CLOSE #1 REM ****************************** REM * File attributes processing * REM ****************************** attr=ATTRIB (file$) attr$=BIN$(attr) strlength=LEN(attr$) appendix=8-strlength zerostr$="0" FOR zerocount=1 TO appendix 'binary string format attr$=zerostr$+attr$ 'adding zeros in binary string NEXT zerocount REM ************************* REM * Attributes separating * REM ************************* attrR$=RIGHT$(attr$,1) attrR=VAL(attrR$) IF attrR=1 THEN attrR$="R" ELSE attrR$="-" FOR attr1=2 TO 8 attrT$=RIGHT$(attr$,attr1) 'Temp attribute attr2$=LEFT$(attrT$,1) attr2=VAL(attr2$) IF attr2=1 THEN ATTRPLUS: ELSE ATTRMINUS: ATTRPLUS: IF attr1=2 THEN attrH$="H" IF attr1=3 THEN attrS$="S" IF attr1=4 THEN attrV$="V" IF attr1=5 THEN attrD$="D" IF attr1=6 THEN attrA$="A" IF attr1=7 THEN attrX$="X" IF attr1=8 THEN attrY$="Y" GOTO ATTRCEND: ATTRMINUS: IF attr1=2 THEN attrH$="-" IF attr1=3 THEN attrS$="-" IF attr1=4 THEN attrV$="-" IF attr1=5 THEN attrD$="-" IF attr1=6 THEN attrA$="-" IF attr1=7 THEN attrX$="-" IF attr1=8 THEN attrY$="-" ATTRCEND: 'Attribute cycle end NEXT attr1 IF attrR$="R" AND attrD$="D" THEN attrI$="I" ELSE attrI$="-" 'XP Icon DIR REM ****************************************** REM * Completed attribute string - ARHSDIVXY * REM ****************************************** attributes$=attrA$+attrR$+attrH$+attrS$+attrD$+attrI$+attrV$+attrX$+attrY$ RETURN REM ***************** REM * String format * REM ***************** STRFORMAT: IF str1>9 THEN str2$=REMOVE$(str1$," ") ELSE str2$=str1$ RETURN
Last edited by PET3; 9th September 2009 at 09:43.
, ,
.
-
6th September 2009 18:17 #19Registered User
Join Date: Aug:2007
Location:
Posts: 1,335
IRQ
PowerBASIC (DOS) IRQ BASIC. DMA .
.
DOS, .
PowerBASIC ERROR errorcode.
.
( 3) 2us 1Ch , BLOAD. 1Ch EXE .
:
DOS ? DOS .
.
. , :
CLS
ON ERROR GOTO priority:
PRINT "Start"
ERROR 7 'Simulation "Out of Memory"
PRINT "End"
END
priority:
PRINT "On Error"
RESUME NEXT
:
Start
On Error
End
DOS ? DOS .
.Last edited by PET3; 6th September 2009 at 18:43.
, ,
.
-
6th September 2009 20:20 #20, ?PowerBASIC (DOS) IRQ BASIC.
, PowerBASIC?ON ERROR GOTO priority:
:( 3) 2us 1Ch , BLOAD.
http://www.htl-steyr.ac.at/~morg/pci...s/inte2tps.htmHave no fear ike iz here.
CPU Cx486DLC@40MHz, RAM 4MB, VGA Trident 512KB, HDD Conner 160MB, Monitor 14" Color
-
6th September 2009 21:01 #21Registered User
Join Date: Aug:2007
Location:
Posts: 1,335
-
23rd September 2009 20:17 #22Registered User
Join Date: Aug:2007
Location:
Posts: 1,335
, "the Giant Black Book for Computer Viruses".
http://vx.netlux.org/lib/vml01.html
DOS , ON ERROR GOTO . ON ERROR GOTO RESUME ., ,
.
-
6th September 2009 21:46 #23
: http://www.youtube.com/watch?v=J5LNTTGDKYo
PowerBASIC .Have no fear ike iz here.
CPU Cx486DLC@40MHz, RAM 4MB, VGA Trident 512KB, HDD Conner 160MB, Monitor 14" Color
-
8th September 2009 21:39 #24
/Off
" ":
PET3 " " - .Code:ATTRFILE: DEFQUD filelength 'define 15 digits variable filename$=LEFT$(file$,8) 'separate name and suffix filesuffix$=RIGHT$(file$,3) OPEN file$ FOR BINARY AS #1 filehandle=FILEATTR (#1,2) 'get DOS file handle REG 1,&H5700 REG 2,filehandle CALL INTERRUPT &H21 timefile=REG(3) 'raw time datefile=REG(4) 'raw date REM ******************** REM * Time calculating * REM ******************** sign=SGN(timefile) IF sign=-1 THEN hour1=65536+timefile:tme$="p" IF sign=+1 THEN hour1=timefile:tme$="a" hour2=hour1/2048 hour=FIX(hour2) minute1=hour*2048 minute2=hour1-minute1 minute3=minute2/32 minute=FIX(minute3) second1=minute*32 second2=minute2-second1 second=second2*2 REM ******************** REM * Date calculating * REM ******************** year1=datefile/512 year2=FIX(year1) year=1980+year2 month1=year1-year2 month2=month1*16 month=FIX(month2) day1=month2-month day=day1*32 REM ************************ REM * Date&Time separators * REM ************************ sep2points$=":" sepdash$="-" seppoint$="." REM ********************* REM * String conversion * REM ********************* hour$=STR$(hour) minute$=STR$(minute) second$=STR$(second) year$=STR$(year) month$=STR$(month) day$=STR$(day) REM ***************** REM * String format * REM ***************** str1=hour str1$=hour$ GOSUB STRFORMAT hour$=str2$ str1=minute str1$=minute$ GOSUB STRFORMAT minute$=str2$ str1=second str1$=second$ GOSUB STRFORMAT second$=str2$ str1=day str1$=day$ GOSUB STRFORMAT day$=str2$ str1=month str1$=month$ GOSUB STRFORMAT month$=str2$ str1=year str1$=year$ GOSUB STRFORMAT year$=str2$ filelength=LOF(1) 'get Real file size filelength$=STR$(filelenght) filelength$=REMOVE$(filelength$," ") 'Remove spaces strlength=LEN(filelength$) appendix=10-strlength nullstr$=" " FOR nullcount=1 TO appendix filelength$=nullstr$+filelength$ 'adding blank spaces NEXT nullcount CLOSE #1 REM ****************************** REM * File attributes processing * REM ****************************** attr=ATTRIB (file$) attr$=BIN$(attr) strlength=LEN(attr$) appendix=8-strlength zerostr$="0" FOR zerocount=1 TO appendix 'binary string format attr$=zerostr$+attr$ 'adding zeros in binary string NEXT zerocount REM ************************* REM * Attributes separating * REM ************************* attrR$=RIGHT$(attr$,1) attrR=VAL(attrR$) IF attrR=1 THEN attrR$="R" ELSE attrR$="-" FOR attr1=2 TO 8 attrT$=RIGHT$(attr$,attr1) 'Temp attribute attr2$=LEFT$(attrT$,1) attr2=VAL(attr2$) IF attr2=1 THEN ATTRPLUS: ELSE ATTRMINUS: ATTRPLUS: IF attr1=2 THEN attrH$="H" IF attr1=3 THEN attrS$="S" IF attr1=4 THEN attrV$="V" IF attr1=5 THEN attrD$="D" IF attr1=6 THEN attrA$="A" IF attr1=7 THEN attrX$="X" IF attr1=8 THEN attrY$="Y" GOTO ATTRCEND: ATTRMINUS: IF attr1=2 THEN attrH$="-" IF attr1=3 THEN attrS$="-" IF attr1=4 THEN attrV$="-" IF attr1=5 THEN attrD$="-" IF attr1=6 THEN attrA$="-" IF attr1=7 THEN attrX$="-" IF attr1=8 THEN attrY$="-" ATTRCEND: 'Attribute cycle end NEXT attr1 IF attrR$="R" AND attrD$="D" THEN attrI$="I" ELSE attrI$="-" 'XP Icon DIR REM ****************************************** REM * Completed attribute string - ARHSDIVXY * REM ****************************************** attributes$=attrA$+attrR$+attrH$+attrS$+attrD$+attrI$+attrV$+attrX$+attrY$ RETURN REM ***************** REM * String format * REM ***************** STRFORMAT: IF str1>9 THEN str2$=REMOVE$(str1$," ") ELSE str2$=str1$ RETURN
!
-
17th September 2009 08:54 #25Registered User
Join Date: Aug:2007
Location:
Posts: 1,335





Reply With Quote

Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in