From 4d05b9cf95a85431bef77c6ba30dc92206e916a4 Mon Sep 17 00:00:00 2001 From: "Oleg N. Cher" Date: Mon, 9 Nov 2020 03:49:10 +0200 Subject: [PATCH] / DosDev: supported calling Turbo C under Win64. --- .gitignore | 2 +- DosDev/ASCII.EXE | Bin 6196 -> 6180 bytes DosDev/Bin/bu.bat | 13 +++ DosDev/Bin/build.bat | 35 +++--- DosDev/Bin/cc.bat | 9 ++ DosDev/Bin/compile.bat | 27 ++--- DosDev/Bin/config.cfg | 2 - DosDev/CMDLNTST.EXE | Bin 6760 -> 6648 bytes DosDev/DYNMEM.EXE | Bin 7254 -> 7182 bytes DosDev/Docu/1.txt | 12 ++ DosDev/Docu/ReadMe.txt | 5 + DosDev/EMPTY.EXE | Bin 2342 -> 2326 bytes DosDev/KUBIK.EXE | Bin 10084 -> 10068 bytes DosDev/Lib/Bin/bu.bat | 8 ++ DosDev/Lib/Bin/build.bat | 31 ++--- DosDev/Lib/Bin/buildxdv.bat | 39 +++++-- DosDev/Lib/Bin/cc.bat | 22 ++++ DosDev/Lib/Bin/clear.bat | 5 +- DosDev/Lib/Bin/compile.bat | 17 ++- DosDev/Lib/Bin/lib.bat | 6 + DosDev/Lib/C/CmdLine.c | 13 +-- DosDev/Lib/C/CmdLine.h | 19 ---- DosDev/Lib/C/CmdLine.oh | 17 +++ DosDev/Lib/C/Console.c | 43 ++++--- DosDev/Lib/C/{Console.h => Console.oh} | 24 ++-- DosDev/Lib/C/Math.c | 18 +-- DosDev/Lib/C/{Math.h => Math.oh} | 10 +- DosDev/Lib/C/Platform.c | 15 ++- DosDev/Lib/C/Platform.h | 21 ---- DosDev/Lib/C/Platform.oh | 14 +++ DosDev/Lib/C/SYSTEM.c | 30 ++--- DosDev/Lib/C/{SYSTEM.h => SYSTEM.oh} | 57 ++++++---- DosDev/Lib/C/Strings.c | 17 ++- DosDev/Lib/C/Strings.h | 16 --- DosDev/Lib/C/Strings.oh | 12 ++ DosDev/Lib/DOSDEV.LIB | Bin 22528 -> 24576 bytes DosDev/Lib/Mod/{CmdLine.Mod => CmdLine.ob3} | 12 +- DosDev/Lib/Mod/{Console.Mod => Console.ob3} | 22 ++-- DosDev/Lib/Mod/{Math.Mod => Math.ob3} | 10 +- DosDev/Lib/Mod/{Platform.Mod => Platform.ob3} | 15 --- DosDev/Lib/Mod/Strings.Mod | 31 ----- DosDev/Lib/Mod/Strings.ob3 | 31 +++++ DosDev/Lib/Obj/CmdLine.c | 41 ------- DosDev/Lib/Obj/Console.c | 64 ----------- DosDev/Lib/Obj/Console.h | 21 ---- DosDev/Lib/Obj/Math.c | 106 ------------------ DosDev/Lib/Obj/Ofront+.par | 1 + DosDev/Lib/Obj/Ofront.par | 12 -- DosDev/Lib/Obj/Platform.c | 51 --------- DosDev/Lib/Obj/Strings.c | 39 ------- DosDev/Lib/Obj/Strings.h | 16 --- DosDev/Lib/SYST_Cfg.h | 4 +- DosDev/Lib/Sym/CmdLine.sym | Bin 74 -> 77 bytes DosDev/Lib/Sym/Console.sym | Bin 4237 -> 4233 bytes DosDev/Lib/Sym/Math.sym | Bin 146 -> 146 bytes DosDev/Lib/Sym/Platform.sym | Bin 100 -> 64 bytes DosDev/Lib/Sym/Strings.sym | Bin 61 -> 59 bytes DosDev/Mod/{ASCII.Mod => ASCII.ob3} | 2 +- DosDev/Mod/{CmdLnTst.Mod => CmdLnTst.ob3} | 4 +- DosDev/Mod/{DynMem.Mod => DynMem.ob3} | 8 +- DosDev/Mod/{Empty.Mod => Empty.ob3} | 0 DosDev/Mod/{Kubik.Mod => Kubik.ob3} | 2 +- DosDev/Mod/{TstInPar.Mod => TstInPar.ob3} | 6 +- DosDev/Obj/ASCII.c | 18 +-- DosDev/Obj/CmdLnTst.c | 38 +++---- DosDev/Obj/DynMem.c | 43 +++---- DosDev/Obj/Empty.c | 8 +- DosDev/Obj/Kubik.c | 56 ++++----- DosDev/Sym/ASCII.sym | Bin 8 -> 0 bytes DosDev/Sym/CmdLnTst.sym | Bin 11 -> 0 bytes DosDev/TSTINPAR.EXE | Bin 7354 -> 0 bytes 71 files changed, 471 insertions(+), 749 deletions(-) create mode 100644 DosDev/Bin/bu.bat create mode 100644 DosDev/Bin/cc.bat delete mode 100644 DosDev/Bin/config.cfg create mode 100644 DosDev/Docu/1.txt create mode 100644 DosDev/Docu/ReadMe.txt create mode 100644 DosDev/Lib/Bin/bu.bat create mode 100644 DosDev/Lib/Bin/cc.bat create mode 100644 DosDev/Lib/Bin/lib.bat delete mode 100644 DosDev/Lib/C/CmdLine.h create mode 100644 DosDev/Lib/C/CmdLine.oh rename DosDev/Lib/C/{Console.h => Console.oh} (76%) rename DosDev/Lib/C/{Math.h => Math.oh} (61%) delete mode 100644 DosDev/Lib/C/Platform.h create mode 100644 DosDev/Lib/C/Platform.oh rename DosDev/Lib/C/{SYSTEM.h => SYSTEM.oh} (86%) delete mode 100644 DosDev/Lib/C/Strings.h create mode 100644 DosDev/Lib/C/Strings.oh rename DosDev/Lib/Mod/{CmdLine.Mod => CmdLine.ob3} (61%) rename DosDev/Lib/Mod/{Console.Mod => Console.ob3} (93%) rename DosDev/Lib/Mod/{Math.Mod => Math.ob3} (88%) rename DosDev/Lib/Mod/{Platform.Mod => Platform.ob3} (52%) delete mode 100644 DosDev/Lib/Mod/Strings.Mod create mode 100644 DosDev/Lib/Mod/Strings.ob3 delete mode 100644 DosDev/Lib/Obj/CmdLine.c delete mode 100644 DosDev/Lib/Obj/Console.c delete mode 100644 DosDev/Lib/Obj/Console.h delete mode 100644 DosDev/Lib/Obj/Math.c create mode 100644 DosDev/Lib/Obj/Ofront+.par delete mode 100644 DosDev/Lib/Obj/Ofront.par delete mode 100644 DosDev/Lib/Obj/Platform.c delete mode 100644 DosDev/Lib/Obj/Strings.c delete mode 100644 DosDev/Lib/Obj/Strings.h rename DosDev/Mod/{ASCII.Mod => ASCII.ob3} (84%) rename DosDev/Mod/{CmdLnTst.Mod => CmdLnTst.ob3} (80%) rename DosDev/Mod/{DynMem.Mod => DynMem.ob3} (89%) rename DosDev/Mod/{Empty.Mod => Empty.ob3} (100%) rename DosDev/Mod/{Kubik.Mod => Kubik.ob3} (96%) rename DosDev/Mod/{TstInPar.Mod => TstInPar.ob3} (89%) delete mode 100644 DosDev/Sym/ASCII.sym delete mode 100644 DosDev/Sym/CmdLnTst.sym delete mode 100644 DosDev/TSTINPAR.EXE diff --git a/.gitignore b/.gitignore index 28c394e6d..b0e04cb4b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ Bin/graphviz/ Bin/proguard/ -DosDev/Obj/*.OBJ +DosDev/Obj/*.obj DosDev2/ DroNDK/ DroSDK/ diff --git a/DosDev/ASCII.EXE b/DosDev/ASCII.EXE index 866f484e74097f9e74cf369bfbdae4d4572f6ff0..f1c542038fa76b94104be9ffe829d82306018ba7 100644 GIT binary patch delta 430 zcmdmDu*87hH%f(pmw}N%fq{?V|No4Q{GS*ZttT@vO<+7Wc`{R!z%eH6^PgAo{TEAP zdeO-EB6IRzCM8C-$qLL5^cGhzb%$|uyRmhO)i5otVmi)N#-zY-oUMc@f#JVd8Pf}X zhRFXwvHyG}Or`H8JF}=U)=kc0kr7$P14w;PK?Cks%BY2iL5Ru+cW43h)d#3nCc6J$Na1X8(+ z&4~XH6GJI`_=`FJBVRjpn;n?^o6Usrz-9yX35<-Uiw|-z8m?pi$^MYtisLPNJVz$S zYL2ZOM>!NYesNsoxXE#sqn^`{>k{WD&NYxl=KG-lhTAjaW5#Y>}bSAg?80mr#TPr;(6cAd6!$sS>sc~#2`R2 z#3WMAEL&Ru7X@MsIzr%7x`Wv-|2~=0E@Auz;;Pui<1i{ReLt=&c=kgK9w47!yg)s> zioqjn(+Xxto4WXz_%3D>9SdBP`3lB|NKqy(O&6bDa*>pO2}e0OIEQ`%q}hP}u-ujQ zJV<*nNgZTGi5K>Y(=F0F=N0AXJRf)=o+%&ow|m9Db?0Sb=T!%|D5)cm6Lt0M&>TwI zfOBD&Ot)_HKNFL@s_<(xh;X!BW^EcFA>A}DD|{eAZ&vXmv8$fY!~L0h`B0pq7Y>H# zT}56{#ylmd&=19ZdPZHv{rx>1vR0G#waK_Hi`~mSABmrI7^3D;tp<<@J~J3>X(rp& zZZc#ptFn--v#)G~S^97Gmu<1vdLgx`YpLb_?>&yOZ1bC5QnWSPNONbcdBbF2%^0)B v6JyC(OtNIu#9eC>PB*WoOR88oJg;^zLEN%;)H|3U#*b{I?j7*yhaUd{&e5h6 diff --git a/DosDev/Bin/bu.bat b/DosDev/Bin/bu.bat new file mode 100644 index 000000000..afe0eed41 --- /dev/null +++ b/DosDev/Bin/bu.bat @@ -0,0 +1,13 @@ +@ECHO OFF +CLS +CD Obj +SET PATH=..\BIN\TC201\BIN +SET Lib=..\Lib +SET Mod=%%Mod%% +tcc.exe -1 -O -d -f87 -Z -I..\BIN\TC201\INCLUDE -I..\LIB\C -L..\BIN\TC201\LIB -IOBJ -I%Lib% %Lib%\DOSDEV.LIB %Mod%.c +IF errorlevel 1 PAUSE +IF EXIST %Mod%.exe MOVE %Mod%.exe ..\%Mod%.exe +CLS +..\%Mod%.exe +PAUSE +EXIT diff --git a/DosDev/Bin/build.bat b/DosDev/Bin/build.bat index dbab98e8c..5a5eb7c0d 100644 --- a/DosDev/Bin/build.bat +++ b/DosDev/Bin/build.bat @@ -1,17 +1,18 @@ -@FOR /F "tokens=*" %%f IN (..\Bin\config.cfg) DO %%f -@SET PATH=..\BIN\TC201\BIN -@SET Lib=..\Lib -@SET This=%CD:~-3% -@SET DOSBoxOpt=%DOSBoxOpt:~1,-1% - -IF /%DOSBox%==/ GOTO :nodosbox -%DOSBox% %DOSBoxOpt% -c "mount c .." -c "c:" -c "cd %This%" -c "path %PATH%" -c "tcc -1 -O -d -f87 -Z -I..\BIN\TC201\INCLUDE -L..\BIN\TC201\LIB -IOBJ -I%Lib% %Lib%\DOSDEV.LIB %1.c" -c "@IF errorlevel 1 PAUSE" -c "@IF EXIST %1.exe REN %1.exe ..\%1.exe" -c "CLS" -c "@..\%1.exe" -c PAUSE -c EXIT -@EXIT - -:nodosbox -tcc -1 -O -d -f87 -Z -I..\BIN\TC201\INCLUDE -L..\BIN\TC201\LIB -IOBJ -I%Lib% %Lib%\DOSDEV.LIB %1.c -@IF errorlevel 1 PAUSE -@IF EXIST %1.exe MOVE %1.exe .. -@CLS -@..\%1.exe -@PAUSE \ No newline at end of file +@ECHO OFF +IF EXIST "%ProgramFiles(x86)%" GOTO vDos + +SET PATH=..\BIN\TC201\BIN +SET Lib=..\Lib +tcc.exe -1 -O -d -f87 -Z -I..\BIN\TC201\INCLUDE -L..\BIN\TC201\LIB -IOBJ -I%Lib% %Lib%\DOSDEV.LIB %1.c +IF errorlevel 1 PAUSE +IF EXIST %1.exe MOVE %1.exe .. +CLS +..\%1.exe +PAUSE +EXIT + +:vDos + +CD .. +SET Mod=%1 +START vDosPlus.exe /set frame=on;window=50;autoexec=Bin\bu.bat diff --git a/DosDev/Bin/cc.bat b/DosDev/Bin/cc.bat new file mode 100644 index 000000000..7040cb374 --- /dev/null +++ b/DosDev/Bin/cc.bat @@ -0,0 +1,9 @@ +@ECHO OFF +CLS +CD Obj +SET PATH=..\BIN\TC201\BIN +SET Lib=..\Lib +SET Mod=%%Mod%% +tcc.exe -1 -O -d -f87 -Z -I..\BIN\TC201\INCLUDE -I..\LIB\C -IOBJ -L..\BIN\TC201\LIB -I%Lib% -c %Mod%.c +IF errorlevel 1 PAUSE +EXIT diff --git a/DosDev/Bin/compile.bat b/DosDev/Bin/compile.bat index 770cffac7..9568d56ac 100644 --- a/DosDev/Bin/compile.bat +++ b/DosDev/Bin/compile.bat @@ -1,13 +1,14 @@ -@FOR /F "tokens=*" %%f IN (..\Bin\config.cfg) DO %%f -@SET PATH=..\BIN\TC201\BIN -@SET Lib=..\Lib -@SET This=%CD:~-3% -@SET DOSBoxOpt=%DOSBoxOpt:~1,-1% - -IF /%DOSBox%==/ GOTO :nodosbox -%DOSBox% %DOSBoxOpt% -c "mount c .." -c "c:" -c "cd %This%" -c "path %PATH%" -c "tcc -1 -O -d -f87 -Z -I..\BIN\TC201\INCLUDE -IOBJ -L..\BIN\TC201\LIB -I%Lib% -c %1.c" -c "@IF errorlevel 1 PAUSE" -c EXIT -@EXIT - -:nodosbox -tcc -1 -O -d -f87 -Z -I..\BIN\TC201\INCLUDE -IOBJ -L..\BIN\TC201\LIB -I%Lib% -c %1.c -@IF errorlevel 1 PAUSE \ No newline at end of file +@ECHO OFF +IF EXIST "%ProgramFiles(x86)%" GOTO vDos + +SET PATH=..\BIN\TC201\BIN +SET Lib=..\Lib +tcc.exe -1 -O -d -f87 -Z -I..\BIN\TC201\INCLUDE -IOBJ -L..\BIN\TC201\LIB -I%Lib% -c %1.c +@IF errorlevel 1 PAUSE +EXIT + +:vDos + +CD .. +SET Mod=%1 +START vDosPlus.exe /set frame=on;window=50;autoexec=Bin\cc.bat diff --git a/DosDev/Bin/config.cfg b/DosDev/Bin/config.cfg deleted file mode 100644 index 697678a00..000000000 --- a/DosDev/Bin/config.cfg +++ /dev/null @@ -1,2 +0,0 @@ -REM SET DOSBox="C:\Program Files (x86)\DOSBox-0.74\DOSBox.exe" -SET DOSBoxOpt="-noconsole" \ No newline at end of file diff --git a/DosDev/CMDLNTST.EXE b/DosDev/CMDLNTST.EXE index 1109072fbd9efadd6214574e0f29dcdd4287008e..e51328801bf9865af9ef8cfeeec8fbc823de33fc 100644 GIT binary patch delta 721 zcmZvWUr1A77{kp~JlVtM)|UG_bE7w`K#&yUw`+YBgY z%}rPXAlL^q;5ZN7D!(8cpa^B*5T(dehp=yc{gubj?jZXVwte&u+K+5RoAFY-pkmT5 z5?x4Yb-3WgmWsOz8qW8H?bnd3*o&|vWDo?Fh6^cVWl%^+p?i2W2dotGF{_KMuZ)4I zEDAfp46@$=vch6jz%>S#%E7Qb42`O9$DvUY(g=Wm1-tJ&OLrF%$VxMC0>xXb1f!-I zHGxP|8l@((XcAOmd#kX=40Z?_4of(m1d4sLJE6mla6Bn=8?TNyff)+<-RE>6AL`$_ z>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S6 zBxXwDd`Zk&qIK`^Lu{T!J3BT*kAZ7Ylsi!ce?S0qd>o2VtJ8Aw=O+{Tv{Wd`_n zHftX<%QiNU)U@R#m520sF!GqfeUfTcGyi$$On4)4+XH-;q*_B3^&zFJ@jQ@tp0`SE ztM~Mscged5^qJV733=XjRz%vHKAb=B*7 zWS<<%Q)L!fcyq}qX{U30g<&B`VQj2;_bST#ND^OLo;QBspe^LyLn3AsR(Hvp_VNMw{|-J=se{7kF(o(*(tjs zt`^rHT*sY%ay{c}cO7)CaewN5+Wo3~OZj8P_Lj3h+vwg7QaJlU`JA*KgKWRS3XmnR zEUh>dEiP+^loaaCvgy=t)4i4c1crSY!)^>va|M&>X)UtET9>p0#Q3g7bziG>_OVnw zZBPODNpdD^Y z*xQR$gGJIe2&a`}P+dZA8rnq`j0@ua7UQ3IV>SsaST}#j64w?C6%E-DAQ_Vy#7Lij z5e3hgWJq5>^kpDvfGqlsqT#Im{&m}TZuB&Gc6c83v|@kM^PneJp0V@srMV80%-}W~ zB8BIu*i|r}C=Rtq!Q3k%m(AaGHV)#$RM*w`5&nzR_SEF`tt&V0$U#r!|GBbbWKbgf zktKn2l016Vj%(Qj8c1e~;N|CT$SC+yX7I12ANx`4S^enB+of-^eC2N>DW~6BRpUZe z_*8@?^p<_NYKsNy-rK4S7$9tN^S>7_bw`$ZB1<{a<2Cdzz1t*1_xNh16Z###b@=_g z@36z#?e(}`|DP}DFwi;sIC)I3TOGyZ50J$fidkYY<+t?ISe|)L0AA2jGQorFnupl# zhV*-BxTr0?vaZ-~a#s diff --git a/DosDev/Docu/1.txt b/DosDev/Docu/1.txt new file mode 100644 index 000000000..c7c62192f --- /dev/null +++ b/DosDev/Docu/1.txt @@ -0,0 +1,12 @@ +Техническое задание + +Разработать подпрограмму, выводящую спрайт (с попиксельной точностью) +любой высоты и любой ширины, заданными в пикселях + +PutSpr (x, y: INTEGER; spr: Sprite) + +Формат спрайта + +ширина (в пикселях) +высота (в пикселях) +данные спрайта \ No newline at end of file diff --git a/DosDev/Docu/ReadMe.txt b/DosDev/Docu/ReadMe.txt new file mode 100644 index 000000000..4aed4030b --- /dev/null +++ b/DosDev/Docu/ReadMe.txt @@ -0,0 +1,5 @@ +To launch Turbo C under Win64, just install vDosPlus - www.vdosplus.org + +http://vdosplus.org/files/vDosPlus-201708-Ed2018.zip + +Add a path to the installed vDosPlus to system variable Path diff --git a/DosDev/EMPTY.EXE b/DosDev/EMPTY.EXE index 9c7e9ffbcb52019b17abe8e44f1ba810b6b2b459..78e073bffa999c8a46e7123add692d3b04d73691 100644 GIT binary patch delta 319 zcmW-cze@sP9LC@8>-)a`7(5X>Awn#dAh;mwLRuokEt<+s@NZ~3Y_H{bqk=C~LsTM2 ziA!V9AUFsum0O!ogK)2=(S`|2GGcVM`VzjOh8cmRU5m^$J+JeSCx7t#(`MJh{d(_%pcbq6>jHbF(G>N7D6IXas7 zCd+s18A~6*bap6Klo1d!TpnKghP@?q7oWr`xabOr$KfmPK>*H2#>o_&5}Zg7(uY2L Fz#rGwbqW9g delta 349 zcmXAl%}WAN6vf{e=RLK+uf;$ck%Bgnft3)os3<|ARpl4>53~sit5y5qMFlUcpd=Bb zB!r+pKyV?{B61fk3fdSGGN=$O@-@~yoW;Gr#W~!pujq3xr-nfZNPxJAl)Ja?7LX8% za)gc$O3Ks0$YZUwNXf?UTah=C70{1zuhGB7n}&8+-R7L8Pt^1IR|JkK}E*DBJhGK-h6C^ahc za(Yb`XNWk?Yse0oq)99~_#hb`PaRImVn|A4-@-95Dka3rQg#Ny=cPoFh)#GT@IEZD zW$?9u?-+=Wfp1W<5palJ2iXN?O_bS)B&r-lT1V=@x79(wA%YG<$H6U$pRl!!ES9jn z%?0dia|0*DDz>))hsa^Ovv0xd5+B(E2tp@C`Xg7sqr%+XhP~Nk#mLAkah}C8lr6 zNBUx-XeB5pSFAu1*FgE*R+e}Vtqz~H(q7QhR)EEE(0{Y_6IP-W6vGPK;!RNgu$8wV zAx5PN(DkW z-(GV(X|9`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bz{D7&+@zV>valV$rm|Nv${kLoVny6jPI=DJdKf;)r$UWMb;ZBe!ltw_y+YQZR{n@D{i=P)(Is2Ccj-RdJu*Il zL&8RD;JwNKU2i{OU%4;y-v!vVh!4>x91mlT?sXKEhDpzP$~4vfiEFl!4$>Jx b2&1lU)cQ;pY7KWGG>IqivBGKRbz}Vl$}j*U diff --git a/DosDev/Lib/Bin/bu.bat b/DosDev/Lib/Bin/bu.bat new file mode 100644 index 000000000..c3298d49c --- /dev/null +++ b/DosDev/Lib/Bin/bu.bat @@ -0,0 +1,8 @@ +@ECHO OFF +CLS +CD Lib\Obj +SET PATH=..\..\BIN\TC201\BIN +SET Mod=%%Mod%% +tcc.exe -1 -O -d -f87 -Z -I..\..\BIN\TC201\INCLUDE -I..\C -I.. -L..\..\BIN\TC201\LIB -c %Mod% +IF errorlevel 1 PAUSE +EXIT diff --git a/DosDev/Lib/Bin/build.bat b/DosDev/Lib/Bin/build.bat index 06a8d8f90..b22cb80f0 100644 --- a/DosDev/Lib/Bin/build.bat +++ b/DosDev/Lib/Bin/build.bat @@ -1,22 +1,13 @@ -@CD .. -@SET path=..\BIN\TC201\BIN -@SET RootBin=..\..\Bin -@IF EXIST %1.lib DEL %1.lib +@ECHO OFF +CD ..\.. +SET PATH=..\BIN\TC201\BIN +SET RootBin=..\..\Bin +IF EXIST %1.lib DEL %1.lib %RootBin%\smartlib %1.c %1 -@FOR %%i IN (%1???.c) DO ( - tcc -1 -O -d -f87 -Z -I..\BIN\TC201\INCLUDE -IOBJ -L..\BIN\TC201\LIB -c %%i - @IF errorlevel 1 PAUSE +FOR %%i IN (%1???.c) DO ( + SET Mod=%%i + START vDosPlus.exe /set frame=on;window=50;autoexec=Lib\Bin\bu.bat ) -@FOR %%i IN (%1???.o) DO TLIB /C %1 +%%i -@PAUSE -@Bin\clear - - - - - - - - - - +FOR %%i IN (%1???.o) DO TLIB /C %1 +%%i +PAUSE +Bin\clear.bat diff --git a/DosDev/Lib/Bin/buildxdv.bat b/DosDev/Lib/Bin/buildxdv.bat index dc4df456d..712929f2c 100644 --- a/DosDev/Lib/Bin/buildxdv.bat +++ b/DosDev/Lib/Bin/buildxdv.bat @@ -1,11 +1,30 @@ -@CD .. -@SET path=..\BIN\TC201\BIN -@SET RootBin=..\..\Bin -%RootBin%\smartlib %1.c %2 -@FOR %%i IN (%2???.c) DO ( - tcc -1 -O -d -f87 -Z -I..\BIN\TC201\INCLUDE -IOBJ -L..\BIN\TC201\LIB -c %%i - @IF errorlevel 1 PAUSE +@ECHO OFF +SET SmartLib=..\..\..\Bin\smartlib.exe +IF EXIST ..\C\%1.c GOTO c_lib + +:o_lib + +%SmartLib% %1.c %2 +GOTO compile + +:c_lib + +IF EXIST ..\Obj\%1.oh DEL %1.oh +IF EXIST ..\Obj\%1.c DEL %1.c +%SmartLib% ..\C\%1.c %2 + +:compile + +FOR %%i IN (%2???.c) DO ( + SET Mod=%%i + CD ..\.. + vDosPlus.exe /set frame=on;window=50;autoexec=Lib\Bin\bu.bat + CD Lib\Obj ) -@FOR %%i IN (%2???.OBJ) DO TLIB /C dosdev +%%i -@CALL Bin\clear -@CD OBJ +FOR %%i IN (%2???.OBJ) DO ( + SET Mod=%%i + CD ..\.. + vDosPlus.exe /set frame=on;window=50;autoexec=Lib\Bin\lib.bat + CD Lib\Obj +) +..\Bin\clear.bat diff --git a/DosDev/Lib/Bin/cc.bat b/DosDev/Lib/Bin/cc.bat new file mode 100644 index 000000000..e3ef9c5ec --- /dev/null +++ b/DosDev/Lib/Bin/cc.bat @@ -0,0 +1,22 @@ +@ECHO OFF +CLS +CD Lib\Obj +SET PATH=..\..\BIN\TC201\BIN +SET Mod=%%Mod%% + +IF EXIST ..\C\%Mod%.c GOTO c_lib + +:o_lib_obj + +tcc.exe -1 -O -d -f87 -Z -I..\..\BIN\TC201\INCLUDE -L..\..\BIN\TC201\LIB -I.. -c %Mod%.c +GOTO exit + +:c_lib + +IF EXIST ..\C\%Mod%.oh DEL %Mod%.oh >NUL +IF EXIST ..\C\%Mod%.c DEL %Mod%.c >NUL +tcc.exe -1 -O -d -f87 -Z -I..\..\BIN\TC201\INCLUDE -I..\C -L..\..\BIN\TC201\LIB -I.. -c ..\C\%Mod%.c + +:exit +IF errorlevel 1 PAUSE +EXIT diff --git a/DosDev/Lib/Bin/clear.bat b/DosDev/Lib/Bin/clear.bat index 1be4b7a3d..540228cf5 100644 --- a/DosDev/Lib/Bin/clear.bat +++ b/DosDev/Lib/Bin/clear.bat @@ -1,3 +1,2 @@ -@DEL *.OBJ -@DEL *_0??.c -@DEL *.sbm +@DEL *.OBJ >NUL +@DEL *_0??.c >NUL diff --git a/DosDev/Lib/Bin/compile.bat b/DosDev/Lib/Bin/compile.bat index 0aaf0ce4f..92638301e 100644 --- a/DosDev/Lib/Bin/compile.bat +++ b/DosDev/Lib/Bin/compile.bat @@ -1,4 +1,13 @@ -@CD .. -@SET path=..\BIN\TC201\BIN -tcc -1 -O -d -f87 -Z -I..\BIN\TC201\INCLUDE -IOBJ -L..\BIN\TC201\LIB -c %1.c -@IF errorlevel 1 PAUSE \ No newline at end of file +@ECHO OFF +IF EXIST "%ProgramFiles(x86)%" GOTO vDos + +SET PATH=..\BIN\TC201\BIN +tcc.exe -1 -O -d -f87 -Z -I..\BIN\TC201\INCLUDE -IOBJ -L..\BIN\TC201\LIB -c %1.c +IF errorlevel 1 PAUSE +EXIT + +:vDos + +CD ..\.. +SET Mod=%1 +START vDosPlus.exe /set frame=on;window=50;autoexec=Lib\Bin\cc.bat diff --git a/DosDev/Lib/Bin/lib.bat b/DosDev/Lib/Bin/lib.bat new file mode 100644 index 000000000..dc1c58c10 --- /dev/null +++ b/DosDev/Lib/Bin/lib.bat @@ -0,0 +1,6 @@ +@ECHO OFF +CD Lib\Obj +SET PATH=..\..\BIN\TC201\BIN +SET Mod=%%Mod%% +TLIB.exe /C ..\DOSDEV +%Mod% +EXIT diff --git a/DosDev/Lib/C/CmdLine.c b/DosDev/Lib/C/CmdLine.c index a7239675d..7f87bc467 100644 --- a/DosDev/Lib/C/CmdLine.c +++ b/DosDev/Lib/C/CmdLine.c @@ -1,6 +1,5 @@ -/* Ofront 1.2 -xtspkae */ -#include "SYSTEM.h" -#include "CmdLine.h" +#include "SYSTEM.oh" +#include "CmdLine.oh" typedef CHAR (*CmdLine_ArgPtr)[128]; @@ -11,21 +10,21 @@ typedef /*typedef CHAR CmdLine_String[128];*/ -export void CmdLine_GetParam (INTEGER n, CHAR *param, LONGINT param__len); +export void CmdLine_GetParam (SHORTINT n, CHAR *param, SHORTINT param__len); /*================================== Header ==================================*/ -export INTEGER CmdLine_paramCount; +export SHORTINT CmdLine_paramCount; /*--------------------------------- Cut here ---------------------------------*/ #define CmdLine_argc() SYSTEM_argc #define CmdLine_argv() (long)SYSTEM_argv -void CmdLine_GetParam (INTEGER n, CHAR *param, LONGINT param__len) +void CmdLine_GetParam (SHORTINT n, CHAR *param, SHORTINT param__len) { CmdLine_ArgVec av = NIL; if (n <= CmdLine_paramCount) { av = (CmdLine_ArgVec)CmdLine_argv(); - __COPY(*(*av)[__X(n, 128)], param, param__len); + __COPY(*(*av)[n], param, param__len); } else { __COPY("", param, param__len); } diff --git a/DosDev/Lib/C/CmdLine.h b/DosDev/Lib/C/CmdLine.h deleted file mode 100644 index ea9a7bc9b..000000000 --- a/DosDev/Lib/C/CmdLine.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Ofront 1.2 -xtspkae */ - -#ifndef CmdLine__h -#define CmdLine__h - -#include "SYSTEM.h" - -typedef - CHAR CmdLine_String[128]; - - -import INTEGER CmdLine_paramCount; - - -import void CmdLine_GetParam (INTEGER n, CHAR *param, LONGINT param__len); -#define CmdLine__init() { CmdLine_paramCount = SYSTEM_argc - 1; } - - -#endif diff --git a/DosDev/Lib/C/CmdLine.oh b/DosDev/Lib/C/CmdLine.oh new file mode 100644 index 000000000..f2cc06e47 --- /dev/null +++ b/DosDev/Lib/C/CmdLine.oh @@ -0,0 +1,17 @@ +#ifndef CmdLine__oh +#define CmdLine__oh + +#include "SYSTEM.oh" + +typedef + CHAR CmdLine_String[128]; + + +import SHORTINT CmdLine_paramCount; + + +import void CmdLine_GetParam (SHORTINT n, CHAR *param, SHORTINT param__len); +#define CmdLine__init() { CmdLine_paramCount = SYSTEM_argc - 1; } + + +#endif diff --git a/DosDev/Lib/C/Console.c b/DosDev/Lib/C/Console.c index 07d95f024..f4e5f8573 100644 --- a/DosDev/Lib/C/Console.c +++ b/DosDev/Lib/C/Console.c @@ -1,57 +1,56 @@ -/* Ofront 1.2 -xtspkae */ -#include "Console.h" -#include "SYSTEM.h" +#include "Console.oh" +#include "SYSTEM.oh" #include #pragma inline #include /* StdIO */ -export void Console_At_StdIO (INTEGER x, INTEGER y); +export void Console_At_StdIO (SHORTINT x, SHORTINT y); export void Console_WriteCh_StdIO (CHAR ch); -export void Console_WriteInt_StdIO (LONGINT n); +export void Console_WriteInt_StdIO (INTEGER n); export void Console_WriteLn_StdIO (void); export void Console_WriteStr_StdIO (CHAR *str); export void Console_WriteStrLn_StdIO (CHAR *str); /* ConIO */ -export void Console_At_ConIO (INTEGER x, INTEGER y); -export void Console_SetColors_ConIO (SYSTEM_BYTE colors); +export void Console_At_ConIO (SHORTINT x, SHORTINT y); +export void Console_SetColors_ConIO (BYTE colors); export void Console_WriteCh_ConIO (CHAR ch); -export void Console_WriteInt_ConIO (LONGINT n); +export void Console_WriteInt_ConIO (INTEGER n); export void Console_WriteLn_ConIO (void); export void Console_WriteStr_ConIO (CHAR *str); export void Console_WriteStrLn_ConIO (CHAR *str); /* DIRECT */ -export void Console_At_DIRECT (INTEGER x, INTEGER y); -export void Console_Clear_DIRECT (SYSTEM_BYTE colors); -export void Console_SetColors_DIRECT (SYSTEM_BYTE colors); +export void Console_At_DIRECT (SHORTINT x, SHORTINT y); +export void Console_Clear_DIRECT (BYTE colors); +export void Console_SetColors_DIRECT (BYTE colors); export void Console_WriteLn_DIRECT (void); export void Console_WriteStrLn_DIRECT (CHAR *str); export void Console_WriteStr_DIRECT (CHAR *str); -extern SYSTEM_BYTE Console_attrib; +extern BYTE Console_attrib; /*================================== Header ==================================*/ -SYSTEM_BYTE Console_attrib = 7; +BYTE Console_attrib = 7; /*--------------------------------- Cut here ---------------------------------*/ /* #include #define Console_writeLInt(n) printf("%lld", n) */ -void Console_At_StdIO (INTEGER x, INTEGER y) +void Console_At_StdIO (SHORTINT x, SHORTINT y) { gotoxy(x, y); } /*--------------------------------- Cut here ---------------------------------*/ -void Console_SetColors_StdIO (SYSTEM_BYTE colors) +void Console_SetColors_StdIO (BYTE colors) { textattr(colors); } /*--------------------------------- Cut here ---------------------------------*/ -void Console_WriteInt_StdIO (LONGINT n) +void Console_WriteInt_StdIO (INTEGER n) { printf("%ld", n); } @@ -84,19 +83,19 @@ void Console_WriteLn_StdIO (void) /* ConIO */ -void Console_At_ConIO (INTEGER x, INTEGER y) +void Console_At_ConIO (SHORTINT x, SHORTINT y) { gotoxy(x, y); } /*--------------------------------- Cut here ---------------------------------*/ -void Console_SetColors_ConIO (SYSTEM_BYTE colors) +void Console_SetColors_ConIO (BYTE colors) { textattr(colors); } /*--------------------------------- Cut here ---------------------------------*/ -void Console_WriteInt_ConIO (LONGINT n) +void Console_WriteInt_ConIO (INTEGER n) { cprintf("%ld", n); } @@ -129,7 +128,7 @@ void Console_WriteLn_ConIO (void) /* DIRECT */ -void Console_At_DIRECT (INTEGER x, INTEGER y) { +void Console_At_DIRECT (SHORTINT x, SHORTINT y) { static union REGS reg; reg.x.ax = 0x0200; reg.x.bx = 0; @@ -138,7 +137,7 @@ void Console_At_DIRECT (INTEGER x, INTEGER y) { } /*Console_At_DIRECT*/ /*--------------------------------- Cut here ---------------------------------*/ -void Console_Clear_DIRECT (SYSTEM_BYTE colors) { +void Console_Clear_DIRECT (BYTE colors) { static union REGS reg; Console_At_DIRECT(0, 0); Console_attrib = colors; reg.h.al = ' '; @@ -165,7 +164,7 @@ void Console_WriteStrLn_DIRECT (CHAR *str) } /*--------------------------------- Cut here ---------------------------------*/ -void Console_SetColors_DIRECT (SYSTEM_BYTE colors) { +void Console_SetColors_DIRECT (BYTE colors) { Console_attrib = colors; } /*Console_SetColors_DIRECT*/ diff --git a/DosDev/Lib/C/Console.h b/DosDev/Lib/C/Console.oh similarity index 76% rename from DosDev/Lib/C/Console.h rename to DosDev/Lib/C/Console.oh index 961b8485c..cd4b8abc9 100644 --- a/DosDev/Lib/C/Console.h +++ b/DosDev/Lib/C/Console.oh @@ -1,34 +1,34 @@ -#ifndef Console__h -#define Console__h +#ifndef Console__oh +#define Console__oh -#include "SYSTEM.h" +#include "SYSTEM.oh" #include "Cons_Cfg.h" /* StdIO */ -import void Console_At_StdIO (INTEGER x, INTEGER y); -import void Console_SetColors_StdIO (SYSTEM_BYTE colors); +import void Console_At_StdIO (SHORTINT x, SHORTINT y); +import void Console_SetColors_StdIO (BYTE colors); import void Console_WriteCh_StdIO (CHAR ch); -import void Console_WriteInt_StdIO (LONGINT n); +import void Console_WriteInt_StdIO (INTEGER n); import void Console_WriteLn_StdIO (void); import void Console_WriteStr_StdIO (CHAR *str); import void Console_WriteStrLn_StdIO (CHAR *str); /* ConIO */ -import void Console_At_ConIO (INTEGER x, INTEGER y); -import void Console_SetColors_ConIO (SYSTEM_BYTE colors); +import void Console_At_ConIO (SHORTINT x, SHORTINT y); +import void Console_SetColors_ConIO (BYTE colors); import void Console_WriteCh_ConIO (CHAR ch); -import void Console_WriteInt_ConIO (LONGINT n); +import void Console_WriteInt_ConIO (INTEGER n); import void Console_WriteLn_ConIO (void); import void Console_WriteStr_ConIO (CHAR *str); import void Console_WriteStrLn_ConIO (CHAR *str); /* DIRECT */ -import void Console_At_DIRECT (INTEGER x, INTEGER y); -import void Console_Clear_DIRECT (SYSTEM_BYTE colors); +import void Console_At_DIRECT (SHORTINT x, SHORTINT y); +import void Console_Clear_DIRECT (BYTE colors); import void Console_WriteLn_DIRECT (void); import void Console_WriteStr_DIRECT (CHAR *str); import void Console_WriteStrLn_DIRECT (CHAR *str); -import void Console_SetColors_DIRECT (SYSTEM_BYTE colors); +import void Console_SetColors_DIRECT (BYTE colors); #define Console__init() diff --git a/DosDev/Lib/C/Math.c b/DosDev/Lib/C/Math.c index a4a4b514c..9816515f9 100644 --- a/DosDev/Lib/C/Math.c +++ b/DosDev/Lib/C/Math.c @@ -1,5 +1,5 @@ -#include "SYSTEM.h" -#include "Math.h" +#include "SYSTEM.oh" +#include "Math.oh" export REAL Math_ArcTan (REAL x); export REAL Math_Cos (REAL x); @@ -7,10 +7,10 @@ export REAL Math_Exp (REAL x); export REAL Math_Ln (REAL x); export REAL Math_Sin (REAL x); export REAL Math_Sqrt (REAL x); -export INTEGER Math_RndRange (INTEGER rangeMin, INTEGER rangeMax); +export SHORTINT Math_RndRange (SHORTINT rangeMin, SHORTINT rangeMax); void Math_NextRnd (void); -void Math_PutSeed (LONGINT seed); +void Math_PutSeed (INTEGER seed); #include #include @@ -18,7 +18,7 @@ void Math_PutSeed (LONGINT seed); #define Math_rand() rand() #define Math_randomize() randomize() -extern LONGINT Math_z; +extern INTEGER Math_z; /*================================== Header ==================================*/ #define Math_sin(x) (sin(x)) @@ -68,10 +68,10 @@ REAL Math_Ln (REAL x) } /*--------------------------------- Cut here ---------------------------------*/ -LONGINT Math_z; +INTEGER Math_z; /*--------------------------------- Cut here ---------------------------------*/ -void Math_PutSeed (LONGINT seed) +void Math_PutSeed (INTEGER seed) { seed = (int)__MOD(seed, 2147483647); if (seed == 0) { @@ -84,7 +84,7 @@ void Math_PutSeed (LONGINT seed) /*--------------------------------- Cut here ---------------------------------*/ void Math_NextRnd (void) { - LONGINT lo, hi, test; + INTEGER lo, hi, test; hi = __DIV(Math_z, 127773); lo = (int)__MOD(Math_z, 127773); test = 16807 * lo - 2836 * hi; @@ -96,7 +96,7 @@ void Math_NextRnd (void) } /*--------------------------------- Cut here ---------------------------------*/ -INTEGER Math_RndRange (INTEGER rangeMin, INTEGER rangeMax) +SHORTINT Math_RndRange (SHORTINT rangeMin, SHORTINT rangeMax) { __ASSERT(rangeMin <= rangeMax, 0); Math_NextRnd(); diff --git a/DosDev/Lib/C/Math.h b/DosDev/Lib/C/Math.oh similarity index 61% rename from DosDev/Lib/C/Math.h rename to DosDev/Lib/C/Math.oh index 7ca8c997f..b4169b055 100644 --- a/DosDev/Lib/C/Math.h +++ b/DosDev/Lib/C/Math.oh @@ -1,9 +1,7 @@ -/* Ofront 1.2 -xtspkae */ +#ifndef Math__oh +#define Math__oh -#ifndef Math__h -#define Math__h - -#include "SYSTEM.h" +#include "SYSTEM.oh" import REAL Math_ArcTan (REAL x); @@ -11,7 +9,7 @@ import REAL Math_Cos (REAL x); import REAL Math_Exp (REAL x); import REAL Math_Ln (REAL x); import void Math_Randomize (void); -import INTEGER Math_RndRange (INTEGER rangeMin, INTEGER rangeMax); +import SHORTINT Math_RndRange (SHORTINT rangeMin, SHORTINT rangeMax); import REAL Math_Sin (REAL x); import REAL Math_Sqrt (REAL x); import void Math__init (void); diff --git a/DosDev/Lib/C/Platform.c b/DosDev/Lib/C/Platform.c index 5d17357cc..40672599a 100644 --- a/DosDev/Lib/C/Platform.c +++ b/DosDev/Lib/C/Platform.c @@ -1,21 +1,20 @@ -/* Ofront 1.2 -xtspkae */ -#include "SYSTEM.h" -#include "Platform.h" +#include "SYSTEM.oh" +#include "Platform.oh" -export SET Platform_BITS (INTEGER i); +export SET Platform_BITS (SHORTINT i); export void Platform_DISPOSE (SYSTEM_PTR *mem); -export INTEGER Platform_ORD (SET s); +export SHORTINT Platform_ORD (SET s); /*================================== Header ==================================*/ -SET Platform_BITS (INTEGER i) +SET Platform_BITS (SHORTINT i) { return __VAL(SET, i); } /*--------------------------------- Cut here ---------------------------------*/ -INTEGER Platform_ORD (SET s) +SHORTINT Platform_ORD (SET s) { - return __VAL(INTEGER, s); + return __VAL(SHORTINT, s); } /*--------------------------------- Cut here ---------------------------------*/ diff --git a/DosDev/Lib/C/Platform.h b/DosDev/Lib/C/Platform.h deleted file mode 100644 index 283170ddd..000000000 --- a/DosDev/Lib/C/Platform.h +++ /dev/null @@ -1,21 +0,0 @@ -/* Ofront 1.2 -xtspkae */ - -#ifndef Platform__h -#define Platform__h - -#include "SYSTEM.h" - -typedef - CHAR *Platform_STRING; - - - - -import SET Platform_BITS (INTEGER i); -import void Platform_DISPOSE (SYSTEM_PTR *mem); -import INTEGER Platform_ORD (SET s); -#define Platform_Unsigned(i) ((unsigned)(i)) -#define Platform__init() - - -#endif diff --git a/DosDev/Lib/C/Platform.oh b/DosDev/Lib/C/Platform.oh new file mode 100644 index 000000000..6fced5d34 --- /dev/null +++ b/DosDev/Lib/C/Platform.oh @@ -0,0 +1,14 @@ +#ifndef Platform__oh +#define Platform__oh + +#include "SYSTEM.oh" + +typedef + CHAR *Platform_STRING; + + +import void Platform_DISPOSE (SYSTEM_PTR *mem); +#define Platform__init() + + +#endif diff --git a/DosDev/Lib/C/SYSTEM.c b/DosDev/Lib/C/SYSTEM.c index a17c0394b..c3edadb53 100644 --- a/DosDev/Lib/C/SYSTEM.c +++ b/DosDev/Lib/C/SYSTEM.c @@ -12,7 +12,7 @@ * */ -#include "SYSTEM.h" +#include "SYSTEM.oh" #ifndef __STDC__ # include "stdarg.h" #else @@ -24,33 +24,33 @@ extern void exit (int status); /* runtime system routines */ extern void SYSTEM_INIT (int argc, long argvadr); extern void SYSTEM_HALT (int n); -extern INTEGER SYSTEM_ASH (INTEGER x, SHORTINT n); -extern LONGINT SYSTEM_ASHL (LONGINT x, SHORTINT n); +extern SHORTINT SYSTEM_ASH (SHORTINT x, BYTE n); +extern INTEGER SYSTEM_ASHL (INTEGER x, BYTE n); extern long SYSTEM_MOD (unsigned long x, unsigned long y); extern int SYSTEM_STRCMP (CHAR *x, CHAR *y); -export SYSTEM_PTR SYSTEM_NEWBLK (LONGINT size); +export SYSTEM_PTR SYSTEM_NEWBLK (SHORTINT size); #define SYSTEM_malloc(size) (SYSTEM_PTR)malloc(size) /*================================== Header ==================================*/ /* runtime system variables */ -LONGINT SYSTEM_argc; -LONGINT SYSTEM_argv; +SHORTINT SYSTEM_argc; +SYSTEM_ADRINT SYSTEM_argv; /*--------------------------------- Cut here ---------------------------------*/ -INTEGER SYSTEM_ASH (INTEGER x, SHORTINT n) +SHORTINT SYSTEM_ASH (SHORTINT x, BYTE n) { if (n >= 0) return x << n; return x >> (-n); -} //SYSTEM_ASH +} /*--------------------------------- Cut here ---------------------------------*/ -LONGINT SYSTEM_ASHL (LONGINT x, SHORTINT n) +INTEGER SYSTEM_ASHL (INTEGER x, BYTE n) { if (n >= 0) return x << n; return x >> (-n); -} //SYSTEM_ASHL +} /*--------------------------------- Cut here ---------------------------------*/ long SYSTEM_MOD (unsigned long x, unsigned long y) @@ -77,7 +77,7 @@ void SYSTEM_HALT (int n) } /*--------------------------------- Cut here ---------------------------------*/ -SYSTEM_PTR SYSTEM_NEWBLK (LONGINT size) +SYSTEM_PTR SYSTEM_NEWBLK (SHORTINT size) { SYSTEM_PTR mem = SYSTEM_malloc(size); __ASSERT(mem != NIL, 0xFF); @@ -87,13 +87,13 @@ SYSTEM_PTR SYSTEM_NEWBLK (LONGINT size) /*--------------------------------- Cut here ---------------------------------*/ /* #define _DYNARRAY struct { - LONGINT len[1]; // Length of allocated memory: LEN() + INTEGER len[1]; // Length of allocated memory: LEN() CHAR data[1]; // Array data } */ -SYSTEM_PTR SYSTEM_NEWARR (LONGINT size) +SYSTEM_PTR SYSTEM_NEWARR (SHORTINT size) { - SYSTEM_PTR arrPtr = SYSTEM_NEWBLK(sizeof(LONGINT) + size); - *((LONGINT*)arrPtr) = size; + SYSTEM_PTR arrPtr = SYSTEM_NEWBLK(sizeof(SHORTINT) + size); + *((SHORTINT*)arrPtr) = size; return arrPtr; } diff --git a/DosDev/Lib/C/SYSTEM.h b/DosDev/Lib/C/SYSTEM.oh similarity index 86% rename from DosDev/Lib/C/SYSTEM.h rename to DosDev/Lib/C/SYSTEM.oh index d39c8c96e..881fc7a6b 100644 --- a/DosDev/Lib/C/SYSTEM.h +++ b/DosDev/Lib/C/SYSTEM.oh @@ -1,5 +1,5 @@ -#ifndef SYSTEM__h -#define SYSTEM__h +#ifndef SYSTEM__oh +#define SYSTEM__oh /* @@ -24,22 +24,33 @@ uses double # as concatenation operator /* basic types */ typedef char BOOLEAN; typedef unsigned char CHAR; -typedef short int SHORTINT; -typedef int INTEGER; -typedef long LONGINT; +typedef signed char BYTE; +typedef int SHORTINT; +typedef int SYSTEM_ARRLEN; +typedef long INTEGER; +/*typedef long LONGINT;*/ +typedef long SYSTEM_ADRINT; typedef float REAL; typedef double LONGREAL; -typedef unsigned long SET; +typedef unsigned int SET; typedef void *SYSTEM_PTR; typedef unsigned long SYSTEM_ADR; -typedef signed char BYTE; + +/* Unsigned variants are for use by shift and rotate macros */ + +typedef unsigned char __U_CHAR; +typedef unsigned char __U_BYTE; +typedef unsigned int __U_SHORTINT; +typedef unsigned long __U_INTEGER; +/*typedef unsigned long __U_LONGINT;*/ +typedef unsigned int __U_SET; /* runtime system routines */ extern long SYSTEM_DIV(); extern long SYSTEM_MOD(); extern long SYSTEM_ENTIER(); -extern INTEGER SYSTEM_ASH (INTEGER x, SHORTINT n); -extern LONGINT SYSTEM_ASHL (LONGINT x, SHORTINT n); +extern SHORTINT SYSTEM_ASH (SHORTINT x, BYTE n); +extern INTEGER SYSTEM_ASHL (INTEGER x, BYTE n); extern long SYSTEM_ABS(); int SYSTEM_XCHK (int i, int ub); extern long SYSTEM_RCHK(); @@ -47,7 +58,7 @@ extern double SYSTEM_ABSD(); extern int SYSTEM_STRCMP(); extern SYSTEM_PTR SYSTEM_NEWREC(); extern SYSTEM_PTR SYSTEM_NEWBLK(); -extern SYSTEM_PTR SYSTEM_NEWARR (LONGINT size); +extern SYSTEM_PTR SYSTEM_NEWARR (SHORTINT size); extern SYSTEM_PTR SYSTEM_REGMOD(); #ifdef SYSTEM_IncRef extern void SYSTEM_INCREF(); @@ -118,7 +129,7 @@ extern void SYSTEM_ENUMR(); #ifdef SYSTEM_NoGC # define __NEW(p, t) p=SYSTEM_NEWBLK(sizeof(struct t)) # define __NEWARR(typ, elemsz, elemalgn, nofdim, nofdyn, va_alist) \ - SYSTEM_NEWARR(elemalgn*va_alist); + SYSTEM_NEWARR(elemalgn*va_alist) #else # define __NEW(p, t) p=SYSTEM_NEWREC((long)t##__typ) # define __NEWARR SYSTEM_NEWARR @@ -179,10 +190,10 @@ extern void SYSTEM_ENUMR(); #else #define __TDESC(t__desc, m, n) \ static struct t__desc {\ - long tproc[m]; \ - long ptr[n+1]; \ + char tproc[m]; \ + char ptr[n+1]; \ } t__desc - #define __TDFLDS(name, size) 0 + #define __TDFLDS(name, size) {0, 0} #endif #define __BASEOFF (__MAXEXT+1) @@ -215,15 +226,15 @@ extern void SYSTEM_ENUMR(); #endif /* runtime system variables */ -extern LONGINT SYSTEM_argc; -extern LONGINT SYSTEM_argv; +extern SHORTINT SYSTEM_argc; +extern SYSTEM_ADRINT SYSTEM_argv; extern void (*SYSTEM_Halt)(); -extern LONGINT SYSTEM_halt; +extern INTEGER SYSTEM_halt; extern SYSTEM_PTR SYSTEM_modules; -extern LONGINT SYSTEM_heapsize; -extern LONGINT SYSTEM_allocated; -extern LONGINT SYSTEM_lock; -extern SHORTINT SYSTEM_gclock; +extern INTEGER SYSTEM_heapsize; +extern INTEGER SYSTEM_allocated; +extern INTEGER SYSTEM_lock; +extern BYTE SYSTEM_gclock; extern BOOLEAN SYSTEM_interrupted; /* ANSI prototypes; not used so far @@ -232,8 +243,8 @@ void SYSTEM_INIT(int argc, long argvadr); void SYSTEM_FINI(void); int SYSTEM_XCHK (int i, int ub); long SYSTEM_RCHK(long i, long ub); -INTEGER SYSTEM_ASH (INTEGER x, SHORTINT n); -LONGINT SYSTEM_ASHL (LONGINT x, SHORTINT n); +SHORTINT SYSTEM_ASH (SHORTINT x, BYTE n); +INTEGER SYSTEM_ASHL (INTEGER x, BYTE n); long SYSTEM_ABS(long i); double SYSTEM_ABSD(double i); void SYSTEM_INHERIT(long *t, long *t0); diff --git a/DosDev/Lib/C/Strings.c b/DosDev/Lib/C/Strings.c index 9185b6930..4958fb79c 100644 --- a/DosDev/Lib/C/Strings.c +++ b/DosDev/Lib/C/Strings.c @@ -1,29 +1,28 @@ -/* Ofront 1.2 -xtspkae */ -#include "SYSTEM.h" -#include "Strings.h" +#include "SYSTEM.oh" +#include "Strings.oh" typedef CHAR *Strings_PtrSTR; -export void Strings_IntToStr (LONGINT n, CHAR *str, LONGINT str__len); -export LONGINT Strings_Length (CHAR *str, LONGINT str__len); +export void Strings_IntToStr (INTEGER n, CHAR *str, SHORTINT str__len); +export SHORTINT Strings_Length (CHAR *str, SHORTINT str__len); #include #define Strings_sprintf(str, str__len, n) sprintf(str, "%ld", n) #define Strings_sprintfL(str, str__len, n) sprintf(str, "%lld", n) /*================================== Header ==================================*/ -void Strings_IntToStr (LONGINT n, CHAR *str, LONGINT str__len) +void Strings_IntToStr (INTEGER n, CHAR *str, SHORTINT str__len) { Strings_sprintf(str, str__len, n); } /*--------------------------------- Cut here ---------------------------------*/ -LONGINT Strings_Length (CHAR *str, LONGINT str__len) +SHORTINT Strings_Length (CHAR *str, SHORTINT str__len) { - LONGINT len; + INTEGER len; len = 0; - while (len < str__len && str[__X(len, str__len)] != 0x00) { + while (len < str__len && str[len] != 0x00) { len += 1; } return len; diff --git a/DosDev/Lib/C/Strings.h b/DosDev/Lib/C/Strings.h deleted file mode 100644 index c64167e6c..000000000 --- a/DosDev/Lib/C/Strings.h +++ /dev/null @@ -1,16 +0,0 @@ -/* Ofront 1.2 -xtspkae */ - -#ifndef Strings__h -#define Strings__h - -#include "SYSTEM.h" - - - - -import void Strings_IntToStr (LONGINT n, CHAR *str, LONGINT str__len); -import LONGINT Strings_Length (CHAR *str, LONGINT str__len); -#define Strings__init() - - -#endif diff --git a/DosDev/Lib/C/Strings.oh b/DosDev/Lib/C/Strings.oh new file mode 100644 index 000000000..b22048707 --- /dev/null +++ b/DosDev/Lib/C/Strings.oh @@ -0,0 +1,12 @@ +#ifndef Strings__oh +#define Strings__oh + +#include "SYSTEM.oh" + + +import void Strings_IntToStr (INTEGER n, CHAR *str, SHORTINT str__len); +import SHORTINT Strings_Length (CHAR *str, SHORTINT str__len); +#define Strings__init() + + +#endif diff --git a/DosDev/Lib/DOSDEV.LIB b/DosDev/Lib/DOSDEV.LIB index 995383bae89e4f8a0627227d217975143d119140..b33bf782d9663b7fb98771f02f3169c6920f20c9 100644 GIT binary patch literal 24576 zcmeHPdvH@{c0X5d%WrJn0sAg7VdJb~$xqgs#74G)cjX6uT;c>NSsz1w%Mk;|1@PfX|uC*V+{@oJ4wTIhp?rSw!7&vq$v#@;t-G3bM8x5 z)*}eCEEQa~u#+V)xvKR7nEwW;yHuI|y+ z=8hKe>B@6@z(1l=Go^U689<|Dvgt?%Iz6L(UI&JtDyZ(5$^%B7;Sj#E1OMcR3Schc ztP^3$oW!@hpuo#=f8uyqOwI$hD_#YJSAIBNKzOBx@IwBXbP2E8HbfTA`qu#i(Bb>& z;C>zKGx}_r$tK;|4=x$;>FWFV^6XsK%vu3HC4Qw}P8`2dlXL&=ieE9|XNZg6kzCN( zA8T#fTtm-xdVU?H4H#Jl5mP&YddUBv45|V4<@h)qkE`K%d=oC^Og0%1TK*(|rfX*3 zbQ+u~;+Qjeoa$dhu<=rbyq0Z99Pcud^O@Tf?=HgoSMl*qL!3Jro9k-eM^j<4i{}uX zclMIrXa0bF~lQ26#SImmpDJ=Cg;A} zm7gud&%ejzX9{NsCQGs>ZSAer#ufzSU4I8piwcQ^-I=g0GnbyLXo@1U7 zuvExzWl`ezRhpc8Z&&=*5Pr+zwAMh`1($DcghL0wRp4E9Z{m1YnVfrWSG-pd-Yetd zoeQ$H5F!2V2%u|QTM_8<{*kRE_58-xCzJDKtLDA1zH4E z`YMi14ef0R>T-XE2rA;(HS?V?=P8-lW~p{=F4tsdcgz`s(G z#%@ipl2`C<&8!}vYo?mCJB?$$wMaw{rhy*)3{us@Ukq<9DkiCSn#VgNX!qxdqq`h$ z@+N9`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c zGpb?@j*W<1?&!H21$3+L>njF?j_kpRe^W(a6OMx#fz_i=k}vLn`k}9UW7CT=|5A2L zW?r&^{Z!sJmawG?|5EmZvcG{{M@!F|O4uGn7tHKC%6k?g;W z-3D<6=6t9@y%#J>EI7YI%NB+`2CvG5q)2WLlOwepQe^f$2CXdIR$RdA%7Rp60k1<4 zVRyI=-8Mj-zySed=^~rBObq_Psr_l{DBSz|P4JsHp!iW-oao0eUH}$UhqEM)?l#u{ z*U<|2i|qf6>|a6F1tW|0AhiW$?2F3&Ms|t9-^jKo`(^AIWq%{PS)ldGa^2p&1Wx+v|YGC%x=KXZolZT%ZoJem>YoZJ@ zSVxE7DEoi8*?3wL_nPp^H=?JfE2I0J(d`qtB0TeA|DP"; -PROCEDURE -writeInt (n: LONGINT) 'printf("%ld", n)'; -PROCEDURE -writeLInt (n: LONGINT) 'printf("%lld", n)'; -PROCEDURE -writeStr (str: ARRAY [1] OF CHAR) 'printf("%s", str)'; -PROCEDURE -writeStrLn (str: ARRAY [1] OF CHAR) 'printf("%s\n", str)'; +PROCEDURE -writeInt (n: INTEGER) 'printf("%ld", n)'; +PROCEDURE -writeLInt (n: INTEGER) 'printf("%lld", n)'; +PROCEDURE -writeStr (str: ARRAY OF CHAR) 'printf("%s", str)'; +PROCEDURE -writeStrLn (str: ARRAY OF CHAR) 'printf("%s\n", str)'; PROCEDURE -writeCh (ch: CHAR) 'printf("%c", ch)'; PROCEDURE -writeLn 'printf("\n")'; (** Write from next line (CR). *) -PROCEDURE At* (x, y: INTEGER); +PROCEDURE At* (x, y: SHORTINT); BEGIN END At; -PROCEDURE WriteInt* (n: LONGINT); (** Write signed long integer number into console. *) +PROCEDURE WriteInt* (n: INTEGER); (** Write signed long integer number into console. *) BEGIN - IF SIZE(LONGINT) = 4 THEN writeInt(n) END; - IF SIZE(LONGINT) = 8 THEN writeLInt(n) END; + IF SIZE(INTEGER) = 4 THEN writeInt(n) END; + IF SIZE(INTEGER) = 8 THEN writeLInt(n) END; END WriteInt; -PROCEDURE WriteStr* (str: ARRAY [1] OF CHAR); (* Write ANSI string into console. *) +PROCEDURE WriteStr* (str: ARRAY OF CHAR); (* Write ANSI string into console. *) (** UNSAFE! Make sure that value of array 'str' is null-terminated. *) BEGIN writeStr(str) END WriteStr; -PROCEDURE WriteStrLn* (str: ARRAY [1] OF CHAR); (* Write ANSI string into console. *) +PROCEDURE WriteStrLn* (str: ARRAY OF CHAR); (* Write ANSI string into console. *) (** UNSAFE! Make sure that value of array 'str' is null-terminated. *) BEGIN writeStrLn(str) END WriteStrLn; @@ -326,7 +326,7 @@ BEGIN writeCh(ch) END WriteCh; PROCEDURE WriteLn* ; (** Write from next line (CR). *) BEGIN writeLn END WriteLn; -PROCEDURE SetColors* (n: INTEGER); +PROCEDURE SetColors* (n: SHORTINT); BEGIN END SetColors; diff --git a/DosDev/Lib/Mod/Math.Mod b/DosDev/Lib/Mod/Math.ob3 similarity index 88% rename from DosDev/Lib/Mod/Math.Mod rename to DosDev/Lib/Mod/Math.ob3 index c73225175..1cfdcfa60 100644 --- a/DosDev/Lib/Mod/Math.Mod +++ b/DosDev/Lib/Mod/Math.ob3 @@ -8,7 +8,7 @@ CONST Modulo = 2147483647; (* =2^31-1 *) VAR - z: LONGINT; + z: INTEGER; PROCEDURE -includemath() "#include "; (* define the proper return types! *) PROCEDURE -includestdlib() "#include "; @@ -45,14 +45,14 @@ BEGIN RETURN ln(x) END Ln; PROCEDURE -randomize() "randomize()"; -PROCEDURE -rand (): INTEGER "rand()"; +PROCEDURE -rand (): SHORTINT "rand()"; (* For details on this random algorithm take a look at Park S.K. and Miller K.W. (1988). Random number generators, good ones are hard to find. Communications of the ACM, 31, 1192-1201. *) -PROCEDURE PutSeed (seed: LONGINT); +PROCEDURE PutSeed (seed: INTEGER); (* Set 'seed' as the new seed value. Any values for 'seed' are allowed, but values beyond the intervall [1..2^31-2] will be mapped into this range *) BEGIN @@ -70,7 +70,7 @@ CONST Q = 127773; (* m DIV a *) R = 2836; (* m MOD a *) VAR - lo, hi, test: LONGINT; + lo, hi, test: INTEGER; BEGIN hi := z DIV Q; lo := z MOD Q; @@ -83,7 +83,7 @@ BEGIN END NextRnd; (* Returns a random number within the range rangeMin to rangeMax inclusively. *) -PROCEDURE RndRange* (rangeMin, rangeMax: INTEGER): INTEGER; +PROCEDURE RndRange* (rangeMin, rangeMax: SHORTINT): SHORTINT; BEGIN ASSERT(rangeMin <= rangeMax); NextRnd; RETURN SHORT((z + rand()) MOD (rangeMax - rangeMin + 1)) + rangeMin diff --git a/DosDev/Lib/Mod/Platform.Mod b/DosDev/Lib/Mod/Platform.ob3 similarity index 52% rename from DosDev/Lib/Mod/Platform.Mod rename to DosDev/Lib/Mod/Platform.ob3 index 6c924efc3..0af60d842 100644 --- a/DosDev/Lib/Mod/Platform.Mod +++ b/DosDev/Lib/Mod/Platform.ob3 @@ -9,21 +9,6 @@ TYPE PROCEDURE -free (memblock: SYSTEM.PTR) "free(memblock)"; -PROCEDURE BITS* (i: INTEGER): SET; (** Convert INTEGER to SET. *) -BEGIN - RETURN SYSTEM.VAL(SET, i) -END BITS; - -PROCEDURE ORD* (s: SET): INTEGER; (** Convert SET to INTEGER. *) -BEGIN - RETURN SYSTEM.VAL(INTEGER, s) -END ORD; - -PROCEDURE Unsigned* (i: SYSTEM.LONGCARD): BYTE; -BEGIN - RETURN SHORT(SHORT(i)) -END Unsigned; - PROCEDURE DISPOSE* (VAR mem: SYSTEM.PTR); BEGIN free(mem); mem := NIL; diff --git a/DosDev/Lib/Mod/Strings.Mod b/DosDev/Lib/Mod/Strings.Mod deleted file mode 100644 index 997886aae..000000000 --- a/DosDev/Lib/Mod/Strings.Mod +++ /dev/null @@ -1,31 +0,0 @@ -MODULE Strings; (** portable layer for LibC - strings *) - -IMPORT SYSTEM; - -TYPE - PtrSTR = ARRAY [1] OF CHAR; - -PROCEDURE -includestdio() "#include "; -(*PROCEDURE -includestring() "#include ";*) - -PROCEDURE -sprintf (str: PtrSTR; n: LONGINT) 'sprintf(str, "%ld", n)'; -PROCEDURE -sprintfL (str: PtrSTR; n: LONGINT) 'sprintf(str, "%lld", n)'; -(*PROCEDURE -Length* (str: PtrSTR): LONGINT "strlen(str)";*) - -PROCEDURE IntToStr* (n: LONGINT; VAR str: ARRAY [1] OF CHAR); - (** UNSAFE! Make sure that size of array 'str' is enough. *) -BEGIN - IF SIZE(LONGINT) = 4 THEN sprintf(str, n) END; - IF SIZE(LONGINT) = 8 THEN sprintfL(str, n) END; -END IntToStr; - -PROCEDURE Length* (VAR str: ARRAY OF CHAR): LONGINT; -VAR - len: LONGINT; -BEGIN - len := 0; - WHILE (len < LEN(str)) & (str[len] # 0X) DO INC(len) END; - RETURN len -END Length; - -END Strings. diff --git a/DosDev/Lib/Mod/Strings.ob3 b/DosDev/Lib/Mod/Strings.ob3 new file mode 100644 index 000000000..37b608237 --- /dev/null +++ b/DosDev/Lib/Mod/Strings.ob3 @@ -0,0 +1,31 @@ +MODULE Strings; (** portable layer for LibC - strings *) + +IMPORT SYSTEM; + +TYPE + PtrSTR = POINTER TO ARRAY [notag] OF CHAR; + +PROCEDURE -includestdio() "#include "; +(*PROCEDURE -includestring() "#include ";*) + +(*PROCEDURE -sprintf (str: PtrSTR; n: SHORTINT) 'sprintf(str, "%ld", n)';*) +PROCEDURE -sprintfL (str: PtrSTR; n: INTEGER) 'sprintf(str, "%lld", n)'; +(*PROCEDURE -Length* (str: PtrSTR): INTEGER "strlen(str)";*) + +PROCEDURE IntToStr* (n: INTEGER; VAR str: ARRAY OF CHAR); + (** UNSAFE! Make sure that size of array 'str' is enough. *) +BEGIN + (*IF SIZE(INTEGER) = 4 THEN sprintf(str, n) END;*) + IF SIZE(INTEGER) = 8 THEN sprintfL(str, n) END; +END IntToStr; + +PROCEDURE Length* (str: ARRAY OF CHAR): INTEGER; +VAR + len: INTEGER; +BEGIN + len := 0; + WHILE (len < LEN(str)) & (str[len] # 0X) DO INC(len) END; + RETURN len +END Length; + +END Strings. diff --git a/DosDev/Lib/Obj/CmdLine.c b/DosDev/Lib/Obj/CmdLine.c deleted file mode 100644 index 3d5047543..000000000 --- a/DosDev/Lib/Obj/CmdLine.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Ofront 1.2 -xtspkae */ -#include "SYSTEM.h" - -typedef - CHAR (*CmdLine_ArgPtr)[128]; - -typedef - CmdLine_ArgPtr (*CmdLine_ArgVec)[128]; - -typedef - CHAR CmdLine_String[128]; - - -export INTEGER CmdLine_paramCount; - - -export void CmdLine_GetParam (INTEGER n, CHAR *param, LONGINT param__len); - -#define CmdLine_argc() SYSTEM_argc -#define CmdLine_argv() (long)SYSTEM_argv - -void CmdLine_GetParam (INTEGER n, CHAR *param, LONGINT param__len) -{ - CmdLine_ArgVec av = NIL; - if (n <= CmdLine_paramCount) { - av = (CmdLine_ArgVec)CmdLine_argv(); - __COPY(*(*av)[__X(n, 128)], param, param__len); - } else { - __COPY("", param, param__len); - } -} - - -export void *CmdLine__init(void) -{ - __DEFMOD; - __REGMOD("CmdLine", 0); -/* BEGIN */ - CmdLine_paramCount = CmdLine_argc() - 1; - __ENDMOD; -} diff --git a/DosDev/Lib/Obj/Console.c b/DosDev/Lib/Obj/Console.c deleted file mode 100644 index fb7a0e972..000000000 --- a/DosDev/Lib/Obj/Console.c +++ /dev/null @@ -1,64 +0,0 @@ -/* Ofront 1.2 -xtspkae */ -#include "SYSTEM.h" - - - - -export void Console_At (INTEGER x, INTEGER y); -export void Console_SetColors (INTEGER n); -export void Console_WriteCh (CHAR ch); -export void Console_WriteInt (LONGINT n); -export void Console_WriteLn (void); -export void Console_WriteStr (CHAR *str, LONGINT str__len); -export void Console_WriteStrLn (CHAR *str, LONGINT str__len); - -#include -#define Console_writeCh(ch) printf("%c", ch) -#define Console_writeInt(n) printf("%ld", n) -#define Console_writeLInt(n) printf("%lld", n) -#define Console_writeLn() printf("\n") -#define Console_writeStr(str, str__len) printf("%s", str) -#define Console_writeStrLn(str, str__len) printf("%s\n", str) - -void Console_At (INTEGER x, INTEGER y) -{ -} - -void Console_WriteInt (LONGINT n) -{ - Console_writeInt(n); -} - -void Console_WriteStr (CHAR *str, LONGINT str__len) -{ - Console_writeStr(str, str__len); -} - -void Console_WriteStrLn (CHAR *str, LONGINT str__len) -{ - Console_writeStrLn(str, str__len); -} - -void Console_WriteCh (CHAR ch) -{ - Console_writeCh(ch); -} - -void Console_WriteLn (void) -{ - Console_writeLn(); -} - -void Console_SetColors (INTEGER n) -{ -} - - -export void *Console__init(void) -{ - __DEFMOD; - __REGMOD("Console", 0); - __REGCMD("WriteLn", Console_WriteLn); -/* BEGIN */ - __ENDMOD; -} diff --git a/DosDev/Lib/Obj/Console.h b/DosDev/Lib/Obj/Console.h deleted file mode 100644 index 16e3dd80b..000000000 --- a/DosDev/Lib/Obj/Console.h +++ /dev/null @@ -1,21 +0,0 @@ -/* Ofront 1.2 -xtspkae */ - -#ifndef Console__h -#define Console__h - -#include "SYSTEM.h" - - - - -import void Console_At (INTEGER x, INTEGER y); -import void Console_SetColors (INTEGER n); -import void Console_WriteCh (CHAR ch); -import void Console_WriteInt (LONGINT n); -import void Console_WriteLn (void); -import void Console_WriteStr (CHAR *str, LONGINT str__len); -import void Console_WriteStrLn (CHAR *str, LONGINT str__len); -import void *Console__init(void); - - -#endif diff --git a/DosDev/Lib/Obj/Math.c b/DosDev/Lib/Obj/Math.c deleted file mode 100644 index a3e31a5ea..000000000 --- a/DosDev/Lib/Obj/Math.c +++ /dev/null @@ -1,106 +0,0 @@ -/* Ofront 1.2 -xtspkae */ -#include "SYSTEM.h" - - -static LONGINT Math_z; - - -export REAL Math_ArcTan (REAL x); -export REAL Math_Cos (REAL x); -export REAL Math_Exp (REAL x); -export REAL Math_Ln (REAL x); -static void Math_NextRnd (void); -static void Math_PutSeed (LONGINT seed); -export void Math_Randomize (void); -export INTEGER Math_RndRange (INTEGER rangeMin, INTEGER rangeMax); -export REAL Math_Sin (REAL x); -export REAL Math_Sqrt (REAL x); - -#define Math_arctan(x) (atan(x)) -#define Math_cos(x) (cos(x)) -#define Math_exp(x) (exp(x)) -#include -#include -#define Math_ln(x) (log(x)) -#define Math_rand() rand() -#define Math_randomize() randomize() -#define Math_sin(x) (sin(x)) -#define Math_sqrt(x) (sqrt(x)) - -REAL Math_Sin (REAL x) -{ - return Math_sin(x); -} - -REAL Math_Cos (REAL x) -{ - return Math_cos(x); -} - -REAL Math_ArcTan (REAL x) -{ - return Math_arctan(x); -} - -REAL Math_Exp (REAL x) -{ - return Math_exp(x); -} - -REAL Math_Sqrt (REAL x) -{ - return Math_sqrt(x); -} - -REAL Math_Ln (REAL x) -{ - return Math_ln(x); -} - -static void Math_PutSeed (LONGINT seed) -{ - seed = __MOD(seed, 2147483647); - if (seed == 0) { - Math_z = 1; - } else { - Math_z = seed; - } -} - -static void Math_NextRnd (void) -{ - LONGINT lo, hi, test; - hi = __DIV(Math_z, 127773); - lo = __MOD(Math_z, 127773); - test = 16807 * lo - 2836 * hi; - if (test > 0) { - Math_z = test; - } else { - Math_z = test + 2147483647; - } -} - -INTEGER Math_RndRange (INTEGER rangeMin, INTEGER rangeMax) -{ - __ASSERT(rangeMin <= rangeMax, 0); - Math_NextRnd(); - return (int)__MODF(Math_z + (LONGINT)Math_rand(), (LONGINT)((rangeMax - rangeMin) + 1)) + rangeMin; -} - -void Math_Randomize (void) -{ - Math_randomize(); - Math_PutSeed(Math_rand()); -} - - -export void *Math__init(void) -{ - __DEFMOD; - __REGMOD("Math", 0); - __REGCMD("Randomize", Math_Randomize); -/* BEGIN */ - Math_z = 1; - Math_Randomize(); - __ENDMOD; -} diff --git a/DosDev/Lib/Obj/Ofront+.par b/DosDev/Lib/Obj/Ofront+.par new file mode 100644 index 000000000..7f1d98dc6 --- /dev/null +++ b/DosDev/Lib/Obj/Ofront+.par @@ -0,0 +1 @@ +-sx3 -21 diff --git a/DosDev/Lib/Obj/Ofront.par b/DosDev/Lib/Obj/Ofront.par deleted file mode 100644 index 707411b82..000000000 --- a/DosDev/Lib/Obj/Ofront.par +++ /dev/null @@ -1,12 +0,0 @@ -CHAR 1 1 -BOOLEAN 1 1 -SHORTINT 1 1 -INTEGER 2 2 -LONGINT 4 4 -SET 2 2 -REAL 4 4 -LONGREAL 8 4 -PTR 4 4 -PROC 4 4 -RECORD 1 1 -ENDIAN 1 0 diff --git a/DosDev/Lib/Obj/Platform.c b/DosDev/Lib/Obj/Platform.c deleted file mode 100644 index 819218155..000000000 --- a/DosDev/Lib/Obj/Platform.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Ofront 1.2 -xtspkae */ -#include "SYSTEM.h" - -typedef - CHAR *Platform_STRING; - - - - -export SET Platform_BITS (INTEGER i); -export void Platform_DISPOSE (SYSTEM_PTR *mem); -export INTEGER Platform_ORD (SET s); -export BYTE Platform_Unsigned (LONGCARD i); - -#define Platform_free(memblock) free(memblock) - -/*============================================================================*/ - -SET Platform_BITS (INTEGER i) -{ - return __VAL(SET, i); -} - -/*----------------------------------------------------------------------------*/ -INTEGER Platform_ORD (SET s) -{ - return __VAL(INTEGER, s); -} - -/*----------------------------------------------------------------------------*/ -BYTE Platform_Unsigned (LONGCARD i) -{ - return (int)i; -} - -/*----------------------------------------------------------------------------*/ -void Platform_DISPOSE (SYSTEM_PTR *mem) -{ - Platform_free(*mem); - *mem = NIL; -} - -/*----------------------------------------------------------------------------*/ - -export void *Platform__init(void) -{ - __DEFMOD; - __REGMOD("Platform", 0); -/* BEGIN */ - __ENDMOD; -} diff --git a/DosDev/Lib/Obj/Strings.c b/DosDev/Lib/Obj/Strings.c deleted file mode 100644 index b451b0c6f..000000000 --- a/DosDev/Lib/Obj/Strings.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Ofront 1.2 -xtspkae */ -#include "SYSTEM.h" - -typedef - CHAR *Strings_PtrSTR; - - - - -export void Strings_IntToStr (LONGINT n, CHAR *str, LONGINT str__len); -export LONGINT Strings_Length (CHAR *str, LONGINT str__len); - -#include -#define Strings_sprintf(str, str__len, n) sprintf(str, "%ld", n) -#define Strings_sprintfL(str, str__len, n) sprintf(str, "%lld", n) - -void Strings_IntToStr (LONGINT n, CHAR *str, LONGINT str__len) -{ - Strings_sprintf(str, str__len, n); -} - -LONGINT Strings_Length (CHAR *str, LONGINT str__len) -{ - LONGINT len; - len = 0; - while (len < str__len && str[__X(len, str__len)] != 0x00) { - len += 1; - } - return len; -} - - -export void *Strings__init(void) -{ - __DEFMOD; - __REGMOD("Strings", 0); -/* BEGIN */ - __ENDMOD; -} diff --git a/DosDev/Lib/Obj/Strings.h b/DosDev/Lib/Obj/Strings.h deleted file mode 100644 index 35a50c6af..000000000 --- a/DosDev/Lib/Obj/Strings.h +++ /dev/null @@ -1,16 +0,0 @@ -/* Ofront 1.2 -xtspkae */ - -#ifndef Strings__h -#define Strings__h - -#include "SYSTEM.h" - - - - -import void Strings_IntToStr (LONGINT n, CHAR *str, LONGINT str__len); -import LONGINT Strings_Length (CHAR *str, LONGINT str__len); -import void *Strings__init(void); - - -#endif diff --git a/DosDev/Lib/SYST_Cfg.h b/DosDev/Lib/SYST_Cfg.h index d7fa9c747..746a3ce50 100644 --- a/DosDev/Lib/SYST_Cfg.h +++ b/DosDev/Lib/SYST_Cfg.h @@ -1,5 +1,3 @@ -/* Ofront 1.2 SYSTEM config */ - #ifndef __SYSTEM_Cfg__h #define __SYSTEM_Cfg__h @@ -22,6 +20,6 @@ /* #define SYSTEM_Cfg_TypeBoundProcDynCalls */ /* Garbage collector */ -#define SYSTEM_Cfg_NoGC +#define SYSTEM_NoGC #endif diff --git a/DosDev/Lib/Sym/CmdLine.sym b/DosDev/Lib/Sym/CmdLine.sym index 74b6f1efa1b6d5baa08cc22b8d86ea93b1237e0c..fd7bb6f77529b3413d4bc39da784d68bbd2ac60b 100644 GIT binary patch delta 56 zcmebBRs1gCoSWj4nU~5Sti<4)kyykaQY&8~Uc->bAfd#-pjI$ZPDY@hfl;icAh9Sh L*Ezp5uY>^rvilEw delta 53 zcmebElKU>;oSWj4nU~5SQtO54=q8x6aw;oNslK$!+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zn~3`I=QFZeUzAY1-?w#`|C<6m;oB6zett?Q6vn4a8rYW@9n5#UnnQlQMd)F?1=7Sm zLv*p;PGuVbhgluR7J}Hv6~?ObXl8*na%O?0l2_9Xbnhd5x=R zO3)kS`BI5aj2%umu3mDNb(TUcW>cjzg5gO z;kQJOft`E@th%}$Uy^1-!ki);+N$6 zTwajyE!A2c=;u;3u61^_6N>nQo36zB=xqyRO~O9@*G<5DI??@f%R=Q&=@A-~QdbUn@jDSNLW+Foa;>RIkT D3)OZs diff --git a/DosDev/Lib/Sym/Math.sym b/DosDev/Lib/Sym/Math.sym index cc68ef26b84630e54e4be805b3e561b0a4b710cc..d827ff92c262c54e3e69f6b5f372548d5b5f963f 100644 GIT binary patch literal 146 zcmew^;G0;I!608DUcpeoAmmt-9Fmv^=Q`&XGq8vJ&~L67$kieKYeI;Os=81wnZ!Ky~RrHBcLafhyqa!lDue E0HDq&q5uE@ diff --git a/DosDev/Lib/Sym/Platform.sym b/DosDev/Lib/Sym/Platform.sym index 245ea02282e13685ceb7ef02bcbd7e96cc0bb4e9..3c9117dd058b7803cefed7f4b16e4d175801ba7a 100644 GIT binary patch literal 64 zcmew^5Rj8tl9peT%OI@8;8a5|R&8!607+l7I>Oq~@iU HWH0~#3lR`n diff --git a/DosDev/Mod/ASCII.Mod b/DosDev/Mod/ASCII.ob3 similarity index 84% rename from DosDev/Mod/ASCII.Mod rename to DosDev/Mod/ASCII.ob3 index ffc5331f2..c5a6c13f4 100644 --- a/DosDev/Mod/ASCII.Mod +++ b/DosDev/Mod/ASCII.ob3 @@ -1,7 +1,7 @@ MODULE ASCII; IMPORT Console; VAR - n: INTEGER; + n: SHORTINT; BEGIN (*$MAIN*) FOR n := 32 TO 127 DO Console.WriteCh(CHR(n)) END; END ASCII. diff --git a/DosDev/Mod/CmdLnTst.Mod b/DosDev/Mod/CmdLnTst.ob3 similarity index 80% rename from DosDev/Mod/CmdLnTst.Mod rename to DosDev/Mod/CmdLnTst.ob3 index db810ece8..04a4adffc 100644 --- a/DosDev/Mod/CmdLnTst.Mod +++ b/DosDev/Mod/CmdLnTst.ob3 @@ -3,12 +3,12 @@ MODULE CmdLnTst; IMPORT CmdLine, IO := Console, Str := Strings; VAR - i, n: INTEGER; param: CmdLine.String; + i, n: SHORTINT; param: CmdLine.String; BEGIN (*$MAIN*) IO.WriteInt(CmdLine.paramCount); IO.WriteLn; FOR n := 1 TO CmdLine.paramCount DO - CmdLine.GetParam(n, param); + CmdLine.GetParam(n, @param); IO.WriteInt(n); IO.WriteStr(":"); IO.WriteStrLn(param); FOR i := 0 TO SHORT(Str.Length(param)) - 1 DO IO.WriteInt(ORD(param[i])); IO.WriteStr(","); diff --git a/DosDev/Mod/DynMem.Mod b/DosDev/Mod/DynMem.ob3 similarity index 89% rename from DosDev/Mod/DynMem.Mod rename to DosDev/Mod/DynMem.ob3 index c4a65b161..333a99a2d 100644 --- a/DosDev/Mod/DynMem.Mod +++ b/DosDev/Mod/DynMem.ob3 @@ -6,7 +6,7 @@ TYPE PersonPtr = POINTER TO Person; Person = RECORD name: ARRAY 20 OF CHAR; - age: INTEGER; + age: SHORTINT; sex: CHAR; (*"M" OR "F"*) next: PersonPtr; END; @@ -14,7 +14,7 @@ TYPE VAR john, mike, lisa, bob, iren, person: PersonPtr; list: POINTER TO ARRAY 5 OF PersonPtr; - n: INTEGER; + n: SHORTINT; BEGIN NEW(john); NEW(mike); NEW(lisa); NEW(bob); NEW(iren); @@ -43,7 +43,7 @@ BEGIN IO.WriteStrLn(list[n].name); IO.WriteCh(list[n].sex); IO.WriteLn; IO.WriteInt(list[n].age); IO.WriteLn; IO.WriteLn; - Platform.DISPOSE(list[n]); + Platform.DISPOSE(@list[n]); END; - Platform.DISPOSE(list); + Platform.DISPOSE(@list); END DynMem. \ No newline at end of file diff --git a/DosDev/Mod/Empty.Mod b/DosDev/Mod/Empty.ob3 similarity index 100% rename from DosDev/Mod/Empty.Mod rename to DosDev/Mod/Empty.ob3 diff --git a/DosDev/Mod/Kubik.Mod b/DosDev/Mod/Kubik.ob3 similarity index 96% rename from DosDev/Mod/Kubik.Mod rename to DosDev/Mod/Kubik.ob3 index dc3bda844..0445c222b 100644 --- a/DosDev/Mod/Kubik.Mod +++ b/DosDev/Mod/Kubik.ob3 @@ -10,7 +10,7 @@ CONST HowManyTimes = 1000; VAR (* Завести 6 переменных (по количеству граней кубика). *) - one, two, three, four, five, six, n, number: INTEGER; + one, two, three, four, five, six, n, number: SHORTINT; BEGIN Math.Randomize; (* Обнулить наши счётчики граней кубика. *) diff --git a/DosDev/Mod/TstInPar.Mod b/DosDev/Mod/TstInPar.ob3 similarity index 89% rename from DosDev/Mod/TstInPar.Mod rename to DosDev/Mod/TstInPar.ob3 index 52c1fab06..42adefabf 100644 --- a/DosDev/Mod/TstInPar.Mod +++ b/DosDev/Mod/TstInPar.ob3 @@ -1,8 +1,8 @@ MODULE TstInPar; IMPORT Console, P := Platform; TYPE - Struct = RECORD a, b: INTEGER END; - Struct1 = RECORD[1] a, b: INTEGER END; + Struct = RECORD a, b: SHORTINT END; + Struct1 = RECORD[1] a, b: SHORTINT END; StructPtr = POINTER TO Struct; Struct1Ptr = POINTER TO Struct1; @@ -13,7 +13,7 @@ VAR struct1: Struct1; struct1Ptr: Struct1Ptr; (* -PROCEDURE A(IN a: INTEGER); BEGIN END A; +PROCEDURE A(IN a: SHORTINT); BEGIN END A; *) PROCEDURE Write* (str: ARRAY OF CHAR); diff --git a/DosDev/Obj/ASCII.c b/DosDev/Obj/ASCII.c index 62832c5e0..47e707569 100644 --- a/DosDev/Obj/ASCII.c +++ b/DosDev/Obj/ASCII.c @@ -1,27 +1,27 @@ -/* Ofront 1.2 -xtspkaem */ -#include "SYSTEM.h" -#include "Console.h" +/* Ofront+ 1.0 -mx3 -21 */ +#include "SYSTEM.oh" +#include "Console.oh" -static INTEGER ASCII_n, ASCII__for__1; +static SHORTINT ASCII_n, ASCII__for__1; +/*============================================================================*/ -export main(int argc, char **argv) + +int main(int argc, char **argv) { __INIT(argc, argv); __IMPORT(Console__init); __REGMAIN("ASCII", 0); /* BEGIN */ ASCII_n = 32; - ASCII__for__1 = 127; - ASCII__for__1 = (ASCII__for__1 - ASCII_n) + 1; + ASCII__for__1 = 96; do { Console_WriteCh((CHAR)ASCII_n); ASCII_n += 1; - ASCII__for__1 -= 1; - } while (!(ASCII__for__1 == 0)); + } while (--ASCII__for__1); __FINI; } diff --git a/DosDev/Obj/CmdLnTst.c b/DosDev/Obj/CmdLnTst.c index 6ad902e62..fa40d25db 100644 --- a/DosDev/Obj/CmdLnTst.c +++ b/DosDev/Obj/CmdLnTst.c @@ -1,19 +1,21 @@ -/* Ofront 1.2 -xtspkaem */ -#include "SYSTEM.h" -#include "CmdLine.h" -#include "Console.h" -#include "Strings.h" +/* Ofront+ 1.0 -mx3 -21 */ +#include "SYSTEM.oh" +#include "CmdLine.oh" +#include "Console.oh" +#include "Strings.oh" -static INTEGER CmdLnTst_i, CmdLnTst_n; +static SHORTINT CmdLnTst_i, CmdLnTst_n; static CmdLine_String CmdLnTst_param; -static INTEGER CmdLnTst__for__2, CmdLnTst__for__1; +static SHORTINT CmdLnTst__for__2, CmdLnTst__for__1; +/*============================================================================*/ -export main(int argc, char **argv) + +int main(int argc, char **argv) { __INIT(argc, argv); __IMPORT(CmdLine__init); @@ -26,27 +28,25 @@ export main(int argc, char **argv) CmdLnTst_n = 1; CmdLnTst__for__2 = CmdLine_paramCount; if (CmdLnTst_n <= CmdLnTst__for__2) { - CmdLnTst__for__2 = (CmdLnTst__for__2 - CmdLnTst_n) + 1; + CmdLnTst__for__2 = (__U_SHORTINT)(CmdLnTst__for__2 - CmdLnTst_n) + 1; do { CmdLine_GetParam(CmdLnTst_n, (void*)CmdLnTst_param, 128); Console_WriteInt(CmdLnTst_n); - Console_WriteStr((CHAR*)":", (LONGINT)2); - Console_WriteStrLn(CmdLnTst_param, 128); + Console_WriteStr((CHAR*)":", 2); + Console_WriteStrLn((void*)CmdLnTst_param, 128); CmdLnTst_i = 0; - CmdLnTst__for__1 = (int)Strings_Length((void*)CmdLnTst_param, 128) - 1; + CmdLnTst__for__1 = (SHORTINT)Strings_Length((void*)CmdLnTst_param, 128) - 1; if (CmdLnTst_i <= CmdLnTst__for__1) { - CmdLnTst__for__1 = (CmdLnTst__for__1 - CmdLnTst_i) + 1; + CmdLnTst__for__1 = (__U_SHORTINT)(CmdLnTst__for__1 - CmdLnTst_i) + 1; do { - Console_WriteInt((int)CmdLnTst_param[__X(CmdLnTst_i, 128)]); - Console_WriteStr((CHAR*)",", (LONGINT)2); + Console_WriteInt((SHORTINT)CmdLnTst_param[CmdLnTst_i]); + Console_WriteStr((CHAR*)",", 2); CmdLnTst_i += 1; - CmdLnTst__for__1 -= 1; - } while (!(CmdLnTst__for__1 == 0)); + } while (--CmdLnTst__for__1); } Console_WriteLn(); CmdLnTst_n += 1; - CmdLnTst__for__2 -= 1; - } while (!(CmdLnTst__for__2 == 0)); + } while (--CmdLnTst__for__2); } __FINI; } diff --git a/DosDev/Obj/DynMem.c b/DosDev/Obj/DynMem.c index 678995ad8..5aa4e1985 100644 --- a/DosDev/Obj/DynMem.c +++ b/DosDev/Obj/DynMem.c @@ -1,28 +1,30 @@ -/* Ofront 1.2 -xtspkaem */ -#include "SYSTEM.h" -#include "Console.h" -#include "Platform.h" +/* Ofront+ 1.0 -mx3 -21 */ +#include "SYSTEM.oh" +#include "Console.oh" +#include "Platform.oh" typedef struct DynMem_Person *DynMem_PersonPtr; typedef struct DynMem_Person { - CHAR name[20]; - INTEGER age; + CHAR name [20]; + SHORTINT age; CHAR sex; DynMem_PersonPtr next; } DynMem_Person; static DynMem_PersonPtr DynMem_john, DynMem_mike, DynMem_lisa, DynMem_bob, DynMem_iren, DynMem_person; -static DynMem_PersonPtr (*DynMem_list)[5]; -static INTEGER DynMem_n; +static DynMem_PersonPtr (*DynMem_list) [5]; +static SHORTINT DynMem_n; -export LONGINT *DynMem_Person__typ; +export SYSTEM_ADRINT *DynMem_Person__typ; +/*============================================================================*/ + static void EnumPtrs(void (*P)(void*)) { P(DynMem_john); @@ -34,9 +36,9 @@ static void EnumPtrs(void (*P)(void*)) P(DynMem_list); } -__TDESC(DynMem_Person__desc, 1, 1) = {__TDFLDS("Person", 28), {24, -8}}; +__TDESC(DynMem_Person__desc, 2, 1) = {__TDFLDS("Person", 25), {23, -4}}; -export main(int argc, char **argv) +int main(int argc, char **argv) { __INIT(argc, argv); __IMPORT(Console__init); @@ -70,32 +72,31 @@ export main(int argc, char **argv) DynMem_iren->age = 43; DynMem_iren->next = DynMem_mike; DynMem_person = DynMem_john; - Console_WriteStrLn((CHAR*)"Female:", (LONGINT)8); + Console_WriteStrLn((CHAR*)"Female:", 8); while (DynMem_person != NIL) { if (DynMem_person->sex == 'F') { - Console_WriteStrLn(DynMem_person->name, 20); + Console_WriteStrLn((void*)DynMem_person->name, 20); } DynMem_person = DynMem_person->next; } Console_WriteLn(); - DynMem_list = __NEWARR(POINTER__typ, 4, 4, 1, 0, 5); + DynMem_list = __NEWARR(POINTER__typ, 2, 1, 1, 0, (SYSTEM_ARRLEN)5); (*DynMem_list)[0] = DynMem_john; (*DynMem_list)[1] = DynMem_mike; (*DynMem_list)[2] = DynMem_lisa; (*DynMem_list)[3] = DynMem_bob; (*DynMem_list)[4] = DynMem_iren; - DynMem_n = 4; - DynMem_n -= -1; + DynMem_n = 5; do { DynMem_n += -1; - Console_WriteStrLn((*DynMem_list)[__X(DynMem_n, 5)]->name, 20); - Console_WriteCh((*DynMem_list)[__X(DynMem_n, 5)]->sex); + Console_WriteStrLn((void*)(*DynMem_list)[DynMem_n]->name, 20); + Console_WriteCh((*DynMem_list)[DynMem_n]->sex); Console_WriteLn(); - Console_WriteInt((*DynMem_list)[__X(DynMem_n, 5)]->age); + Console_WriteInt((*DynMem_list)[DynMem_n]->age); Console_WriteLn(); Console_WriteLn(); - Platform_DISPOSE((void*)&(*DynMem_list)[__X(DynMem_n, 5)]); - } while (!(DynMem_n == 0)); + Platform_DISPOSE((void*)&(*DynMem_list)[DynMem_n]); + } while (DynMem_n); Platform_DISPOSE((void*)&DynMem_list); __FINI; } diff --git a/DosDev/Obj/Empty.c b/DosDev/Obj/Empty.c index 23496af93..27ccbe8b7 100644 --- a/DosDev/Obj/Empty.c +++ b/DosDev/Obj/Empty.c @@ -1,13 +1,15 @@ -/* Ofront 1.2 -xtspkaem */ -#include "SYSTEM.h" +/* Ofront+ 1.0 -mx3 -21 */ +#include "SYSTEM.oh" +/*============================================================================*/ -export main(int argc, char **argv) + +int main(int argc, char **argv) { __INIT(argc, argv); __REGMAIN("Empty", 0); diff --git a/DosDev/Obj/Kubik.c b/DosDev/Obj/Kubik.c index 24cdcdc1e..2e79ac0bf 100644 --- a/DosDev/Obj/Kubik.c +++ b/DosDev/Obj/Kubik.c @@ -1,16 +1,18 @@ -/* Ofront 1.2 -xtspkaem */ -#include "SYSTEM.h" -#include "Console.h" -#include "Math.h" +/* Ofront+ 1.0 -mx3 -21 */ +#include "SYSTEM.oh" +#include "Console.oh" +#include "Math.oh" -static INTEGER Kubik_one, Kubik_two, Kubik_three, Kubik_four, Kubik_five, Kubik_six, Kubik_n, Kubik_number, Kubik__for__1; +static SHORTINT Kubik_one, Kubik_two, Kubik_three, Kubik_four, Kubik_five, Kubik_six, Kubik_n, Kubik_number, Kubik__for__1; +/*============================================================================*/ -export main(int argc, char **argv) + +int main(int argc, char **argv) { __INIT(argc, argv); __IMPORT(Console__init); @@ -26,7 +28,6 @@ export main(int argc, char **argv) Kubik_six = 0; Kubik_n = 1; Kubik__for__1 = 1000; - Kubik__for__1 = (Kubik__for__1 - Kubik_n) + 1; do { Kubik_number = Math_RndRange(1, 6); if (Kubik_number == 1) { @@ -48,58 +49,57 @@ export main(int argc, char **argv) Kubik_six = Kubik_six + 1; } Kubik_n += 1; - Kubik__for__1 -= 1; - } while (!(Kubik__for__1 == 0)); + } while (--Kubik__for__1); Console_SetColors(3); - Console_WriteStr((CHAR*)"+---+------------+", (LONGINT)19); + Console_WriteStr((CHAR*)"+---+------------+", 19); Console_WriteLn(); - Console_WriteStr((CHAR*)"| ", (LONGINT)3); + Console_WriteStr((CHAR*)"| ", 3); Console_SetColors(4); Console_WriteInt(1); Console_SetColors(3); - Console_WriteStr((CHAR*)" | |", (LONGINT)16); + Console_WriteStr((CHAR*)" | |", 16); Console_WriteLn(); - Console_WriteStr((CHAR*)"+---+------------+", (LONGINT)19); + Console_WriteStr((CHAR*)"+---+------------+", 19); Console_WriteLn(); - Console_WriteStr((CHAR*)"| ", (LONGINT)3); + Console_WriteStr((CHAR*)"| ", 3); Console_SetColors(14); Console_WriteInt(2); Console_SetColors(3); - Console_WriteStr((CHAR*)" | |", (LONGINT)16); + Console_WriteStr((CHAR*)" | |", 16); Console_WriteLn(); - Console_WriteStr((CHAR*)"+---+------------+", (LONGINT)19); + Console_WriteStr((CHAR*)"+---+------------+", 19); Console_WriteLn(); - Console_WriteStr((CHAR*)"| ", (LONGINT)3); + Console_WriteStr((CHAR*)"| ", 3); Console_SetColors(2); Console_WriteInt(3); Console_SetColors(3); - Console_WriteStr((CHAR*)" | |", (LONGINT)16); + Console_WriteStr((CHAR*)" | |", 16); Console_WriteLn(); - Console_WriteStr((CHAR*)"+---+------------+", (LONGINT)19); + Console_WriteStr((CHAR*)"+---+------------+", 19); Console_WriteLn(); - Console_WriteStr((CHAR*)"| ", (LONGINT)3); + Console_WriteStr((CHAR*)"| ", 3); Console_SetColors(5); Console_WriteInt(4); Console_SetColors(3); - Console_WriteStr((CHAR*)" | |", (LONGINT)16); + Console_WriteStr((CHAR*)" | |", 16); Console_WriteLn(); - Console_WriteStr((CHAR*)"+---+------------+", (LONGINT)19); + Console_WriteStr((CHAR*)"+---+------------+", 19); Console_WriteLn(); - Console_WriteStr((CHAR*)"| ", (LONGINT)3); + Console_WriteStr((CHAR*)"| ", 3); Console_SetColors(1); Console_WriteInt(5); Console_SetColors(3); - Console_WriteStr((CHAR*)" | |", (LONGINT)16); + Console_WriteStr((CHAR*)" | |", 16); Console_WriteLn(); - Console_WriteStr((CHAR*)"+---+------------+", (LONGINT)19); + Console_WriteStr((CHAR*)"+---+------------+", 19); Console_WriteLn(); - Console_WriteStr((CHAR*)"| ", (LONGINT)3); + Console_WriteStr((CHAR*)"| ", 3); Console_SetColors(7); Console_WriteInt(6); Console_SetColors(3); - Console_WriteStr((CHAR*)" | |", (LONGINT)16); + Console_WriteStr((CHAR*)" | |", 16); Console_WriteLn(); - Console_WriteStr((CHAR*)"+---+------------+", (LONGINT)19); + Console_WriteStr((CHAR*)"+---+------------+", 19); Console_At(10, 1); Console_SetColors(4); Console_WriteInt(Kubik_one); diff --git a/DosDev/Sym/ASCII.sym b/DosDev/Sym/ASCII.sym deleted file mode 100644 index 282d5d3f12c0fc6328a1ea7e01df9048e9dd2e94..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8 Pcmew^;27-e>B#^94bB2_ diff --git a/DosDev/Sym/CmdLnTst.sym b/DosDev/Sym/CmdLnTst.sym deleted file mode 100644 index 9a93794e461ef250ef0052781234ad45235cfc51..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11 Scmew^;GCP{lNVB4!Te|S?>miPV0OZt-jVqzI|HUyL^Rw~l5ASt!{@FBW(0*zP71FV3_~JvspwvIyI5Ly=QkUq+3>MkL!BkzBYFbqSjwIFz3=hf2c;cj4YvQk%bi z){N=CaryWmHaIlPmlOQ!mju{?DYuWO!1ufQm(IxKP?0a| z0LpQktuf+Zm5WVa@R!^v*|rUIeFwd<5f$`C+FI_bI67g;@vny>J^1THQCnd|h%*Pa zv#q6E!6)apXOX<$vdRm*veM9kj$SY4y@KSde@7&5GfRpa5Gk&M?*^oN#5k2(`ND`T z&M0dUNWI1uwc&HEx1)_omJfc4q|@;!(=#`E#ny3X`UxmPvGsjqZXma>dy26x>?_)2U z+a;x_;mJGD|H@2Qep+-N>r|Gcm(a1`6`1D=Z1ojb)fL!^H1?#D!?@jB2iODc3_cg? z9PO80T)|@F|Jg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