Article View: be.comp.programming
Article #13321onbekende broncode
From: ikke
Date: Sat, 04 Aug 2001 16:50
Date: Sat, 04 Aug 2001 16:50
161 lines
5928 bytes
5928 bytes
Hallo iedereen,
Iemand vroeg mij onlangs om een programma aan te passen door iemand
anders geschreven.
Geen probleen, maar ik heb geen flauw benul in welke taal dit
geschreven is. Qbasic of clipper geprobeeld, niks lukt tot zover
Wanneer er iemand de syntax van onderstaande code herkent, laat eens
iets weten
Dank bij voorbaat...
Geert
VERBOFF
'PORTIN (101) = Bit 4
'PORTIN (102) = Bit 3
'PORTIN (103) = Bit 2
'PORTIN (104) = Bit 1
'PORTIN (105) = Machinenr. 1
'PORTIN (106) = Machinenr. 2
'PORTIN (107) = Reserve
'PORTIN (108) = Reserve
'PORTOUT(201) = Error Printer
'PORTOUT(202) = Error Bijna einde etikettenrol
'Toetsenbord:
'PRINTER AKTIE
'------- ------
'F1 Ingave Titernummers
'F2 Ingave
Fabricatienummers
'F3 Reset etikettenteller
'F4 Manuele ingave van
machine- en positienummer
'F5 Testtoets (Randomgenerator voor machine-
en positienummer)
'SHIFT + F1 Printkoptest
'SHIFT + F2 Stel tijd en datum in
'SHIFT + F3 Ingave aantal etiketten op een
rol
'SHIFT + F4 Ingave machinenummers
'SHIFT + F5 Ingave huidig maandnummer
'Setup Setup
'Feed Blanco etiket
'Shift + Feed Instellen Labelsensor
'Paswoord = 1138
'Het aantal etiketten waarop alarm dient gegeven te worden kan nooit
'groter zijn dan 10% van het totaal aantal etiketten op de rol
KILL "DOMO.SUP"
OPEN "CONSOLE:" FOR OUTPUT AS 1
PRINT #1 : PRINT #1,"Ontvangst prog." : PRINT #1,"Wachten AUB";
CLOSE 1
NEW
IMMEDIATE OFF
xINIT:
'****************************
'Initialisatie van de printer
'****************************
ON ERROR GOTO xFout : VERBOFF : NASC -2
BREAK 0 ON : ON BREAK 0 GOSUB xQuitPwd
BREAK 1 ON : ON BREAK 1 GOSUB xQuit
OPEN "CONSOLE:" FOR OUTPUT AS 1
OPEN "CONSOLE:" FOR INPUT AS 2
GOSUB xInstellingen
KEY (10) ON : KEY (11) ON : KEY (12) ON : KEY (13) ON : KEY (14)
ON
KEY (110) ON : KEY (111) ON : KEY (112) ON : KEY (113) ON : KEY (114)
ON
KEY (18) ON : KEY (19) ON : KEY (119) ON
ON KEY (10) GOSUB xTiterNrs : 'F1
ON KEY (11) GOSUB xFabricatieNrs : 'F2
ON KEY (12) GOSUB xResetSQTeller : 'F3
ON KEY (13) GOSUB xManueel : 'F4
ON KEY (14) GOSUB xRandomTest : 'F5
ON KEY (110) GOSUB xDrukkopcontrole : 'Shift + F1
..........................
xBEREKENHUIDIGMAANDNR:
'******************************
'Bereken het huidig maandnummer
'******************************
FORMAT DATE$ "YYYYMM"
IF xMaandRegDatum$=DATE$("F") THEN RETURN
IF VAL(DATE$("F"))-VAL(xMaandRegDatum$)<0 THEN
xNegeerPaswoord%=1
GOSUB xMaand
IF xLeesSUP%=1 THEN GOSUB xDatumEnTijd
xNegeerPaswoord%=0
GOSUB xBewaarSetup
RETURN
END IF
xJaarVerschil% =VAL(LEFT$ (DATE$("F"),4))-VAL(LEFT$
(xMaandRegDatum$,4))
xMaandVerschil%=VAL(RIGHT$(DATE$("F"),2))-VAL(RIGHT$(xMaandRegDatum$,2))
xMaand$=STR$(VAL(xMaand$)+((xJaarVerschil%*12)+xMaandVerschil%))
WHILE VAL(xMaand$)>99
xMaand$=STR$(VAL(xMaand$)-100)
WEND
WHILE LEN(xMaand$)<2
xMaand$="0"+xMaand$
WEND
GOSUB xBewaarSetup
RETURN
xWACHT:
'Wacht op een startimpuls voor het afdrukken van een reeks etiketten
'*******************************************************************
WHILE (PORTIN(105)=0 AND PORTIN(106)=0) AND xRndMachineNr%=0
'Wacht tot er een signaal komt van de PLC van de klant
'of tot op de testtoets (F5) wordt gedrukt
IF VAL(xEtikettenOpRol$)-xGedrukteSq%<=VAL(xAlarmOp$) AND
xBijnaEindeRol%=0 THEN PORTOUT(202) ON : xBijnaEindeRol%=1
IF VAL(xEtikettenOpRol$)-xGedrukteSq%> VAL(xAlarmOp$) AND
xBijnaEindeRol%=1 THEN PORTOUT(202) OFF : xBijnaEindeRol%=0
WEND
GOSUB xBerekenHuidigMaandNr
xBinair$=STR$(ABS(PORTIN(101)))+STR$(ABS(PORTIN(102)))+STR$(ABS(PORTIN(103)))+STR$(ABS(PORTIN(104)))
IF PORTIN(105)<>0 OR xRndMachineNr%=1 THEN xMachine%=1
IF PORTIN(106)<>0 OR xRndMachineNr%=2 THEN xMachine%=2
FORMAT TIME$ "HH:MM" : FORMAT DATE$ "DD/MM/YYYY"
xTijd$=TIME$("F") : xDatum$=DATE$("F")
IF xBinair$="0001" OR xRndPositieNr%=1 THEN xPositie$="1"
IF xBinair$="0010" OR xRndPositieNr%=2 THEN xPositie$="2"
IF xBinair$="0011" OR xRndPositieNr%=3 THEN xPositie$="3"
IF xBinair$="0100" OR xRndPositieNr%=4 THEN xPositie$="4"
IF xBinair$="0101" OR xRndPositieNr%=5 THEN xPositie$="5"
IF xBinair$="0110" OR xRndPositieNr%=6 THEN xPositie$="6"
IF xBinair$="0111" OR xRndPositieNr%=7 THEN xPositie$="7"
IF xBinair$="1000" OR xRndPositieNr%=8 THEN xPositie$="8"
IF xBinair$="1001" OR xRndPositieNr%=9 THEN xPositie$="9"
IF xBinair$="1010" OR xRndPositieNr%=10 THEN xPositie$="10"
IF xBinair$="1011" OR xRndPositieNr%=11 THEN xPositie$="11"
IF xBinair$="1100" OR xRndPositieNr%=12 THEN xPositie$="12"
IF VAL(xPositie$)<1 OR VAL(xPositie$)>12 THEN GOTO xWachtEinde
CLL
DIR 1 : ALIGN 8
FONT "Swiss 721 Bold BT",12
PRPOS 204,192 : PRTXT xTiterNr$(xMachine%)
PRPOS 588,192 : PRTXT xTiterNr$(xMachine%)
PRPOS 204,152 : PRTXT
xFabricatieNr$(xMachine%)+xMachineNr$(xMachine%)+xMaand$
PRPOS 588,152 : PRTXT
xFabricatieNr$(xMachine%)+xMachineNr$(xMachine%)+xMaand$
ALIGN 7
FONT "Swiss 721 BT",12
PRPOS 068,112 : PRTXT "POS"
PRPOS 452,112 : PRTXT "POS"
Technical Details
Message-ID:
<3b6c268d.91464068@news.skynet.be>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!195.238.2.15!skynet.be!louie!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit X-Google-Thread: fcea4,3aeb9211f5255097,start X-Google-Attributes: gidfcea4,public X-Google-ArrivalTime: 2001-08-04 09:54:30 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!195.238.2.15!skynet.be!louie!not-for-mail From: geert.demuynck@busybyte.be (ikke) Newsgroups: be.comp.programming Subject: onbekende broncode Date: Sat, 04 Aug 2001 16:50:09 GMT Message-ID: <3b6c268d.91464068@news.skynet.be> X-Newsreader: Forte Free Agent 1.21/32.243 Lines: 166 Organization: -= Skynet Usenet Service =- NNTP-Posting-Host: 194.78.200.171 X-Trace: 996944068 reader0.news.skynet.be 54321 194.78.200.171 X-Complaints-To: abuse@skynet.be