$skip $nolist **************************************************************************** PROGRAM SFUP-Library for the Heavac Dialog Familly FILENAME HEADL0.LIB AUTHOR ENGIBY, Avenches, N. Bovigny VERSION Voir Ci-dessous **************************************************************************** 31.03.2004 Error on PG5 1.2 fixed. Check _SASIXM replaced by _XMNUM Version $ 2.3.051 **************************************************************************** $endskip $group _Heavac $group _Dialog $include headl0_s.txt ;;textes standards $include headl0_u.txt ;;textes utilisateur $endgroup ;;_Dialog $endgroup ;;_Heavac ;;****************************************************************************** ;; D‚finition Macro DL0VERS ;; DL0 Versions ONLINE et OFFLINE ;; Le Fbox 'Versions' ne sert qu'a introduire des commantaires a propos ;; de la librairie et a indiquer le no de version OFFLINE et ONLINE. ;;****************************************************************************** _dl0vers macro Vers, ;;macro dummy, affichage version Cs ;;compteur indicateur de version ONLINE not_used LEQU Vers ;;Vers DEF non utilis‚ ;; 200 = Version 1.2 ;; *----Version principale ;; *---Petite modification ;; *--Vesion datTe ;;Le texte se trouve dans IDX (format %s) acc h ;;La version ONLINE est initialisTe pour ldl Cs ;;l'affichage ;; 200 ;;Version officielle 1.2 ;; 210 ;;Version 1.21 ;; 220 ;;Version $122 ;; 230 ;;Version $123 ;; 240 ;;Version $124 du 08.05.95 ;; 250 ;;Version $125 du 10.06.95 ;; 260 ;;Version $126 du 30.06.95 ;; 270 ;;Version $127 du 19.08.95 ;; 280 ;;Version $128 du 30.08.95 ;; 1399 ;;Version 1.3 Beta-A du 07.10.95 ;; 1398 ;;Version du 17.10.95 ;; 1397 ;;Version 1.3 Beta-B du 24.10.95 ;; 1396 ;;Version 1.3 Beta-C du 28.11.95 ;; 1395 ;;Version 1.3 Beta-D du 18.12.95 ;; 1300 ;;Version 1.3 officielle du 26.01.96 ;; 1310 ;;Version $131 du 09.09.96 ;; 1320 ;;Version $132 du 14.10.96 ;; 1330 ;;Version $133 du 07.11.96 ;; 1340 ;;Version $134 du 19.12.96 ;; 1350 ;;Version $135 du 10.02.97 ;; 1360 ;;Version $136 du 10.03.97 ;; 1370 ;;Version $137 du 11.03.97 PG4 $137 minimum ! ;; 1380 ;;Version $138 du 02.05.97 ;; 1499 ;;Version 1.4 Beta-A du 02.07.97 ;; 1498 ;;Version 1.4 Beta-B du 31.07.97 0 ;;from 03.09.97 version only in HVC General endm $list $nolist $skip ;;****************************************************************************** History: 02.11.99 Alarm buffer 4 (replace version 3). Added Clear_enable input. 13.12.99 Assembler error with Alarm buffer version 1. Fixed. ;;****************************************************************************** $endskip ;;****************************************************************************** ;; DIALOG ALARM BUFFER Version 1 ;;****************************************************************************** _dl0albuf macro vers, Fd,Rd, ;;dynamics Fs,Rs,led, ;;statics op,la,ta ;;option, longueur, texte utilisateur rdd lequ r [4] ;;__dlgalbuf needs 4 more rd __dlgalbuf vers, ,,, ;;input clear, output alarm Fd,Rd,Rdd, ;;dynamics Fs,Rs,led, ;;statics op,1, ;;option mark, full=1-ignore la,ta,1 ;;option, longueur, texte utilisateur endm ;;****************************************************************************** ;; DIALOG ALARM BUFFER Version 2 ;;****************************************************************************** _dl0albuf2 macro vers, clear,ala, ;;input-output Fd,Rd, ;;dynamics Fs,Rs,led, ;;statics op,la,ta, ;;option, longueur, texte utilisateur Sclr ;;set clear button rdd lequ r [4] ;;__dlgalbuf needs 4 more rd __dlgalbuf vers, clear,,ala, ;;input-output Fd,Rd,Rdd, ;;dynamics Fs,Rs,led, ;;statics op,1, ;;option mark, full=1-ignore la,ta, ;;option, longueur, texte utilisateur Sclr ;;set clear button endm ;;****************************************************************************** ;; DIALOG ALARM BUFFER Version 3 ;;****************************************************************************** _dl0albuf3 macro vers, clear,ala, ;;input-output Fd,Rd, ;;dynamics Fs,Rs,led, ;;statics opm,opb, ;;option mark, full la,ta, ;;option, longueur, texte utilisateur Sclr ;;set clear button rdd lequ rd+4 ;;Rd [8] __dlgalbuf vers, clear,,ala, ;;input-output Fd,Rd,Rdd, ;;dynamics Fs,Rs,led, ;;statics opm,opb, ;;option mark, full la,ta, ;;option, longueur, texte utilisateur Sclr ;;set clear button endm ;;****************************************************************************** ;; DIALOG ALARM BUFFER Version 4, with Clear Enable ;;****************************************************************************** _dl0albuf4 macro vers, clear,clear_en, ;;inputs ala, ;;outputs Fd,Rd, ;;dynamics Fs,Rs,led, ;;statics opm,opb, ;;option mark, full la,ta, ;;option, longueur, texte utilisateur Sclr ;;set clear button rdd lequ rd+4 ;;Rd [8] __dlgalbuf vers, clear,clear_en, ;;inputs ala, ;;outputs Fd,Rd,Rdd, ;;dynamics Fs,Rs,led, ;;statics opm,opb, ;;option mark, full la,ta, ;;option, longueur, texte utilisateur Sclr ;;set clear button endm ;;****************************************************************************** ;; MACRO Interne DLGALBUF ;; DIALOG ALARM BUFFER ;;****************************************************************************** __dlgalbuf macro vers, clear,clear_en, ;;input clear,clear enable ala, ;;output alarm Fd,Rd,Rdd, ;;dynamics Fs,Rs,led, ;;statics opm,opb, ;;option mark, buffer full leng,ta, ;;longueur, texte utilisateur Sclr ;;set clear button $ifnb ;;not used $endif $ifdef _cvcreport $REPORT DLG-ALBUF $endif ;; Flag & Register statics & dinamic ;;---------------------------------- clrb LEQU fs ;;clear button fdyn LEQU fs+1 ;;dyn clear input f_out LEQU fs+2 ;;active annonce alarm OUT from buffer ;;last LEQU fs+3 ;;last for albuf3 rerr LEQU rs ;;code d'erreur rpnt LEQU rs+1 ;;pointer = nb line in buffer remove LEQU rs+2 ;;alarm (line number) to remove ;;last LEQU rs+3 ;; E_ok LEQU 0 ;;OK E_ini1 LEQU 1 ;;initialisation E_ini2 LEQU 2 ;; E_ini3 LEQU 3 ;; E_ini4 LEQU 4 ;; E_regA LEQU 21 ;;registre alarme E_regR LEQU 22 ;;registre retour E_regQ LEQU 23 ;;registre quittance E_flagA LEQU 31 ;;flag alarme encore a traeter E_EDec LEQU 41 ;;error TFR dans DTcale alarmes E_EIns LEQU 42 ;;error TFR dans Insert alarm E_EQit LEQU 43 ;;error TFR dans QIT E_ERet LEQU 44 ;;error TFR dans RET E_Edtst LEQU 45 ;;error TFR dans DT or ST fd0 LEQU fd fd1 LEQU fd+1 fd2 LEQU fd+2 fd3 LEQU fd+3 rd0 LEQU rd rd1 LEQU rd+1 rd2 LEQU rd+2 rd3 LEQU rd+3 rd4 LEQU rdd rdpnt LEQU rdd+1 ;;pointer rdtxn LEQU rdd+2 ;;txt number rdwri LEQU rdd+3 ;;write pointer $if opm=1 ;;Mark Start-End first lequ 1 $else ;;Mark End or No mark first lequ 0 $endif ;;_DLGALTXT 0=vide Transmission alarme, no texte ;;_DLGALTXN Number of line for alarme texte ;;_DLGALFDT insert time & date ;;_DLGALRDT address of 1. reg date ;;_DLGALFSC insert status and counter ;;_DLGALRST address of 1. status flag ;;_DLGALRCT address of alarm counter ;;_DLGALQIT -1=vide Transmission ack alarme au terminal, no line ;;_DLGALQIA 0=vide " alarme au terminal, ASCII ;;_DLGALPNT Pointeur buffer. Pointe sur la prochaine place libre ;;_DLGALRET 0=vide Alarm returned to Low->remouve from buffer ;;_DLGALOUT 0=vide Alarm out from buffer (par terminal ou buffer FIFO) ;;_DLGALFUL 1=plein Alarm buffer full (avec option ignore) ;;_DLGALCLR Clear all alarm=set ack and set counter to 0 ;;_DLGALINT Alarm interupt _DLGALTXT lequ _Dialog._DLGALTXT ;;suppressed prefix _Heavac 21.08.98 _DLGALTXN lequ _Dialog._DLGALTXN _DLGALFDT lequ _Dialog._DLGALFDT _DLGALRDT lequ _Dialog._DLGALRDT _DLGALFSC lequ _Dialog._DLGALFSC _DLGALRST lequ _Dialog._DLGALRST _DLGALRCT lequ _Dialog._DLGALRCT _DLGALQIT lequ _Dialog._DLGALQIT _DLGALQIA lequ _Dialog._DLGALQIA _DLGALPNT lequ _Dialog._DLGALPNT _DLGALRET lequ _Dialog._DLGALRET _DLGALOUT lequ _Dialog._DLGALOUT _DLGALFUL lequ _Dialog._DLGALFUL _DLGALCLR lequ _Dialog._DLGALCLR _DLGALINT lequ _Dialog._DLGALINT ;;_DLGALDEF EQU 1 ;;publie la dTfinition du buffer alarme ;;pour que la macro _dl0SASI sache que ;;le texte existe et peut ˆtre lu. ;;Marche plus avec SASM005. ;;Doit ˆtre remplacT par Exist... ;; Init ;;=============== ;;$group _Heavac ;;$group _Dialog $init ldl rerr ;;init avec ok E_ok ld remove -1 acc h res clrb res fdyn res f_out ;;1. Contr(le que le pointeur soit au moins a la position 0 ou 1 ;;sur la ligne 'fin buffer' sans alarme cmp _DLGALPNT ;; pointeur < first k first jr n l_i1 ;;->init buffer ;;2. Contr(le que le pointeur ne soit pas aprFs la position max ;;selon la longueur du buffer cmp _DLGALPNT ;; pointeur >= leng+2 (longueur+dTbut+fin) k leng+first+1 jr p l_i2 ;;->init buffer ;;3. Contr(le que le pointeur soit bien sur la derniFre ligne ;;actuelle du buffer avec 'fin buffer' ld rd0 '0001' ;;no texte 'End buffer' mul _DLGALPNT k 4 rd1 add rd1 k 11 rd1 tfr X _DLGALBUF rd1 rd1 cmp rd0 rd1 acc z jr l l_i3 ;;init buffer $if first=1 ;;seulement avec Mark Start ;;4. Contr(le que le dTbut du buffer contienne ;;bien la marque 'dTbut buffer' ld rd0 '0000' ;;no texte 'Start buffer' tfr X _DLGALBUF k 11 rd1 cmp rd0 rd1 acc z jr l l_i4 ;;init buffer $endif ;;first=1 jr l_ie ;;->exit init l_i1: ldl rerr E_ini1 jr l_i l_i2: ldl rerr E_ini2 jr l_i l_i3: ldl rerr E_ini3 jr l_i l_i4: ldl rerr E_ini4 jr l_i l_i: __dlginibuf led,opm,rd0 ;;init buffer l_ie: ;;$endgroup ;;$endgroup $endinit ;; Buffer ;;============ Text _DLGTXO0+_DLGTXTO "" ;;Pour dTfinir l'entˆte dans la liste des objets "0000" ;;Version "ALBF" ;;Identification "0030", ;;No texte objet standard ta.04, ;;No texte objet user "0000" ;;No texte TlTments. Not used for alarm. Text _DLGALBUF [32+(leng+6+first+1)*16] ;;La lecture dans un long text prend TnormTment de temps ;;6 rTserve pour version FIFO ;;4 textes, 1 date, 1 statut ;;Text buffer alarme (toujours RAM) "0000" ;;Version "ALBF" ;;Identification "0030", ;;No texte objet standard ta.04, ;;No texte objet user " " ;;Not used " " ;; " ", ;; "0000", ;;longueur initiale=1 (n-1) ;initialisT en Reset ;; "0000 0000" ;;0 DTbut buffer ;par __dlginibuf ;; "0000 0001" ;;1 Fin buffer ;; 0___1___2___3___ ;; 0___ ;; ABCD ;; A : Line: '0','1' = une line ;; '2'..'6' = premiFre de 2..6 line ;; '+' = lignes suivantes ;; B : Type: '0' = Text ;; '1' = Date ;; '2' = Status + counter ;; C,D : (rTserve) ;; 1___: Variable Reg date ou Counter ;; 2___: Flag alarm_state (+1 = ack) ;; 3___: No texte alarme __dlgnxto ;; Reset ;;============== ;;$group _Heavac ;;$group _Dialog ;;__heareset l,run ;;jump if _reset=low (Marche pas a cause du $group ci-dessus) sth _DIALOG._RESET jr l run ldl _DLGALRET ;;ignorer un ev. ordre 0 ;;Ala-Ret pas encore exTcutT ldl rerr ;;error = ok E_ok ;; jr l_ir ;;->init runtime run: ;;Reset signals clearing alarms ;;Valide for one cycle only ;;------------------------------ acc h res _DLGALCLR ;;reset signal clear alarms ;;set for one cycle during runtime init ldl _DLGALOUT ;;annonce alarm out from buffer 0 ;; Controle of the reg ALARMS ;;=========================== cmp _DLGALTXT ;;reception alarm k 0 ;; jr p l_ok1 ldl _DLGALTXT 0 ldl rerr E_regA l_ok1: cmp _DLGALRET ;;return of alarme k 0 ;; jr p l_ok2 ldl _DLGALRET 0 ldl rerr E_regR l_ok2: ld rd0 -1 cmp _DLGALQIT ;;quittance alarme rd0 ;; jr p l_ok3 ld _DLGALQIT -1 ldl _DLGALQIA 0 ldl rerr E_regQ l_ok3: ;; Display amount of lines in buffer, buffer full ;;=============================================== sub _DLGALPNT k first rpnt $if opb=1 ;;Option buffer 'Ignore' cmp k leng+first ;;pos max rd0 ;;>=pos aprFs ins. acc n ;;buffer full, ignore out _DLGALFUL ;;pas trFs utile pour les alarme a plusieurs lignes ! $endif ;; Clear buffer ALARMES ;;======================= $ifnb sth clear ;;Clear input dyn fdyn ;; jr h l_ir ;;->init runtime $endif sth clrb ;;Clear button res clrb ;; jr h l_ir1 ;;->init runtime ;; Code RTception ALARMES ;;======================= ;;------------------------------------------ ;; Clear alarm if pointer is in reserve ;;------------------------------------------ $if opb=2 ;;Option buffer FIFO ;;L'alarme est insTrTe a la fin du buffer ;;sans contr(le de la longueur. ;;Si le buffer est plein, elle se trouve dans la rTserve de 4 lignes ;;On contr(le ici si le pointeur est dans la rTserve ;;et on efface une alarme au dTbut ;;Nouveau contr(le au prochain cycle. cmp k leng+first ;;pos max _DLGALPNT jr p l_m ;;->OK, buffer pas plus que plein ldl remove first ;;effacer la premiFre acc h set f_out ;;anouce alarme out from buffer jr l_q ;;->quit alarme, pas traiter d'alarme a ce cycle $endif ;;------------------------------ l_m: ;;Reception of alarm ;;------------------------------ cmp _DLGALTXT ;;reception alarme k 0 ;; jr z l_me ;;->pas d'alarme copy _DLGALTXN ;;Check DT and SC lines rdtxn ;;--------------------- sth _DLGALFDT ;;insert date & time jr l l_mndt ;;->no dt inc rdtxn ;;increment nb line l_mndt: sth _DLGALFSC ;;insert stat & count jr l l_mnsc ;;->no sc inc rdtxn l_mnsc: $if opb=1 ;;Option buffer full=ignore ;;------------------------- add _DLGALPNT ;;pointer next position rdtxn ;;number of text line to insert rd0 ;;pos dernier texte aprFs insertion cmp k leng+first ;;pos max rd0 ;;>=pos aprFs ins. jr p l_mnf ;;->buffer not full copy _DLGALTXT ;; _DLGALOUT ;;Indiquer alarme out pour mettre a jour le flag 'alarm in buffer' jr l_m0 ;;->end, mise a 0 l_mnf: $endif ;;opb=1 ;;Init pointers ;;------------- __dlgpnt _DLGALPNT,0,rd0 ;;rd0=pointeur lecture, fin de buffer mul rdtxn ;;number of line to insert k 4 ;,4 reg par texte rd1 add rd0 rd1 rd1 ;;pointeur Tcriture sei k 0 ;;Move 'End' mark ;;--------------- l_ml: tfr X _DLGALBUF ;;loop dTcaler ligne fin de buffer rd0 ;; rd2 tfr rd2 X _DLGALBUF rd1 __dlgalerr rerr,E_Edec inc rd0 inc rd1 ini k 3 ;; jr h l_ml ;;->loop dTcaler buffer cmp rdtxn k 2 jr p l_mim ;;->multiline alarm ;;Insert single line ;;------------------ __dlgasc _DLGALTXT,rd1,3,rd2,rd3 ;; textes alarmes {0..999} __dlgpnt _DLGALPNT,0,rdwri ;;pointer line libre, 1st reg ld rd0 '1000' ;;1 line, type 0 tfr rd0 ;;Tcrire type alarm X _DLGALBUF rdwri add rdwri k 3 rdwri tfr rd1 ;;Tcrire texte alarme X _DLGALBUF rdwri __dlgalerr rerr,E_EIns inc _DLGALPNT ;;inc pointer buffer jr l_mie ;;->insert end ;;Insert multi line l_mim: ;;----------------- ld rd1 '0000' __dlgasc rdtxn,rd0,1,rd2,rd3 ;; number of line {1..6} in LSB mov rd0 b 0 rd1 b 3 ;;number in higher byte __dlgpnt _DLGALPNT,0,rdwri ;;pointer line libre, 1st reg sub _DLGALTXN ;;text lines only k 1 rd3 ;;index limit sei k 0 ;;premiFre ligne ;;Loop insert text lines l_mil: ;;---------------------- tfr rd1 ;; Tcrire number of text 'n000' or '+000' X _DLGALBUF rdwri ;;point to 1. reg __dlgasc _DLGALTXT,rd2,3,rd4,rd0 ;; textes alarmes {0..999} add rdwri k 3 rdwri ;;point to last reg tfr rd2 ;; Tcrire no txt alarme X _DLGALBUF rdwri ;;point to last reg __dlgalerr rerr,E_EIns inc rdwri ;;point to next line, 1. reg inc _DLGALTXT ;;next alarm text ld rd1 '+000' ;;mark for next lines ini rd3 jr h l_mil ;;->loop insert text lines sth _DLGALFDT ;;Insert Date & time jr l l_de ;;------------------ res _DLGALFDT ;;self reset ld rd0 '+100' ;;line+, 1=type (date&time) __dlgasc _DLGALRDT,rd1,4,rd2,rd3 ;;date reg address tfr rd0 ;;Tcrire Type X _DLGALBUF rdwri ;;point to 1. reg inc rdwri ;;point to reg address tfr rd1 ;;Tcrire date, reg address X _DLGALBUF rdwri ;;point to reg address inc rdwri ;;point to flag address ld rd0 '0000' ;;text ='0000' -> no text tfr rd0 X _DLGALBUF ;;pour ne pas laisser la place indTfinie rdwri ;;point to flag address inc rdwri ;;point to text address tfr rd0 X _DLGALBUF rdwri ;;point to text address __dlgalerr rerr,E_Edtst inc rdwri ;;point to next line, 1. reg l_de: sth _DLGALFSC ;;Insert Status & Counter jr l l_se ;;----------------------- res _DLGALFSC ;;self reset ld rd0 '+200' ;;line+, type=2=status&counter __dlgasc _DLGALRCT,rd1,4,rd3,rd4 ;;counter, reg address __dlgasc _DLGALRST,rd2,4,rd3,rd4 ;;status, flag address tfr rd0 ;;Tcrire Type X _DLGALBUF rdwri ;;point to 1. reg inc rdwri ;;point to reg address tfr rd1 ;;Tcrire counter, reg address X _DLGALBUF rdwri ;;point to reg address inc rdwri ;;point to flag address tfr rd2 ;;Tcrire status, flag address X _DLGALBUF rdwri ;;point to reg address ld rd0 '0000' ;;text ='0000' -> no text inc rdwri ;;point to text address tfr rd0 X _DLGALBUF rdwri ;;point to reg address __dlgalerr rerr,E_Edtst inc rdwri ;;point to next line, 1. reg l_se: add _DLGALPNT ;;Update pointer rdtxn ;;-------------- _DLGALPNT ;;set pointer buffer aprFs la nouvelle fin buffer l_mie: ;;insert end ;;Update number of line in buffer ;;------------------------------- __dlgasc _DLGALPNT,rd1,2,rd2,rd3 ;;nombre d'alarme dans buffer en ascii tfr rd1 ;;Tcrire nombre alarme X _DLGALBUF k 7 ;;byte 7 pour nombre alarme l_m0: ldl _DLGALTXT ;;effacer l'alarme traetTe 0 ;; acc h res _DLGALFDT ;;reset (sTcuritT) res _DLGALFSC ;; " " l_me: ;;fin rTception alarme ;;------------------------------ ;;Return of alarme ;;------------------------------ cmp _DLGALRET ;;quittance alarme k 0 ;; jr z l_re ;;->code return 0 __dlgasc _DLGALRET,rd1,3,rd2,rd3 ;;in ASCII (in rd1) ldl _DLGALRET ;;effacer l'ordre 0 ;; copy _DLGALPNT ;; rd0 ;;init loop counter (in rd0) ;;chercher dans tout le buffer jr l_f ;;->fined and remove l_re: ;;------------------------------ l_t: ;;Effacement au terminal (par _DLGALQIT et _DLGALQIA=code en ASCII) ;;------------------------------ cmp _DLGALQIT k 0 ;; jr n l_te ;;->neg, pas de quittance $ifnb ;;Clear Enable used sth clear_en ;; jr l l_t0 ;;Clear not allowed, ->ignore $endif cmp _DLGALPNT ;; _DLGALQIT ;; jr n l_t0 ;;->plus grand que fin de buffer, ignore acc z ;;Pos=fin de buffer out fd0 __dlgpnt _DLGALQIT,3,rdpnt tfr X _DLGALBUF rdpnt rd0 ;;no text alarm ld rd1 '0001' ;; cmp rd0 rd1 acc z ;;No alarm=Marque fin de buffer anh fd0 ;;ET pos=fin de buffer jr h l_ir ;;->runtime init ;;Toute cette sTcuritT n'est pas vraiment utile ;;par ce que les ligne hors pointeur contiennent ;;Tgalement le no '0001' dans la pluspart des cas. copy _DLGALQIT ;;start pos (in rd0) rd0 copy _DLGALQIA rd1 ;;alarm text in ASCII (in rd1) ld _DLGALQIT ;;annule l'ordre -1 ldl _DLGALQIA ;;annule l'ordre 0 acc h set f_out ;;annonce alarm out from buffer jr l_f ;;->fined and remove (in rd1) l_t0: ld _DLGALQIT ;;annule l'ordre -1 ldl _DLGALQIA ;;annule l'ordre 0 l_te: jr l_qe ;;end remove ;;------------------------------ l_f: ;;Fined alarme to remove alarm in rd1, start pointer in rd0 ;;------------------------------ __dlgpnt rd0,3,rd3 ;;points to last texte alarme to search l_rl: tfr X _DLGALBUF rd3 rd2 ;; lire no texte alarme __dlgalerr rerr,E_ERet cmp rd1 ;; trouvT alarme dans buffer ? rd2 jr z l_rt ;;->trouvT l'alarme dans le buffer sub rd3 ;;points to next lower lines k 4 rd3 dec rd0 ;;dec. counter loop buffer jr n l_qe ;;-> pas trouvT jr l_rl ;;-> loop l_rt: copy rd0 ;;remove l'alarme trouvTe remove ;; jr l_q ;;->remove ;;------------------------------ l_q: ;;Remove alarme ;;------------------------------ sth f_out jr l l_qoe ;;->OUT pas nTcessaire res f_out ;;self-reset __dlgpnt remove,3,rdpnt ;;points to text number to remove tfr X _DLGALBUF ;; rdpnt ;; rd0 ;;lire text number in ASCII __dlgnum rd0,_DLGALOUT,3,rd3 ;;text number in numeric ;;annonce alarm out from buffer l_qoe: ;;------------------------------ cmp remove k first ;; jr n l_qe ;;->code qit < first alarme possible in buffer cmp remove ;;Alarm a quittancer _DLGALPNT ;;Marque fin buffer jr z l_ir ;;->runtime init jr p l_qe0 ;;->code quittance trop grand, ignore __dlgpnt remove,0,rd0 ;;rd0=pointeur line libre, 1st reg tfr X _DLGALBUF ;; rd0 ;; rd1 ;;lire code/nb line ldl rd0 0 mov rd1 b 3 rd0 b 0 ldl rdtxn 1 ;;nb de ligne par dTfaut cmp rd0 k '+' ;;ligne suivant un multiline, ingnore jr z l_qe0 ;;->quit pas sur 1.line, ignore cmp rd0 k '2' ;;nb <2 ou autre code jr n l_qs ;;->quit single line cmp k '6' rd0 ;;nb >6 ou autre code jr n l_qs ;;->quit single line __dlgnum rd0,rdtxn,1,rd3 ;;nombre de ligne en numTrique l_qs: __dlgpnt _DLGALPNT,3,rd0 ;;poiteur fin de ligne 'End' (offset=3) __dlgpnt remove,0,rd1 ;;poiteur Tcriture mul rdtxn ;;nb line ! re-used pour dec et Tcrir _DLGALPNT k 4 rd2 ;;nb reg add rd1 ;;pnt Tcriture rd2 ;;+nb reg rd2 ;;=pointeur lecture sei rd2 ;; l_ql: tfr X _DLGALBUF ;; loop dTcaler buffer rd2 ;; lecture rd3 tfr rd3 ;; Tcriture X _DLGALBUF rd1 __dlgalerr rerr,E_EQit inc rd1 inc rd2 ini rd0 ;; jr h l_ql ;; ->loop dTcaler buffer sub _DLGALPNT ;; dec longueur buffer rdtxn _DLGALPNT __dlgasc _DLGALPNT,rd1,3,rd2,rd3 ;; nombre d'alarme dans buffer en ascii tfr rd1 ;; Tcrire nombre alarme X _DLGALBUF k 7 ;; byte 7 pour nombre alarme l_qe0: ld remove ;; effacer ordre remove -1 ;; l_qe: ;;end remove from buffer jr exit ;;->exit ;;------------------------------ l_ir1: ;;Init runtime, Clear Err ;;------------------------------ ldl rerr E_ok jr l_ir l_ir: ;;Init runtime __dlginibuf led,opm,rd0 ;;init buffer ld _DLGALQIT ;;quittance no line -1 ;; ldl _DLGALQIA ;; " txt ASCII 0 ;; exit: cmp _DLGALPNT ;;gestion LED k first+1 ;; acc p ;; out led ;;fin gestion LED $ifnb out ala $endif ;;$endgroup ;; _Heavac ;;$endgroup ;; _Dialog endm ;;end of macro __dl0albuf ;;****************************************************************************** ;; DIALOG ALARM BINAIRE ;;****************************************************************************** _dl0alb macro vers, in0,in1,in2,in3,in4, in5,in6,in7,in8,in9, ;;input, output Fd, ;;dynamic (1 flag only) Fs,led, ;;statics ta, ;;texte alarme index ;;stretch index $ifnb ;;not used $endif fd2 lequ f [2] ;;__dl0alb needs 2 dynamic flags $ifdef _cvcreport $REPORT DLG-ALB $endif __dl0alb vers,, ;;enable=blank in0,in1,in2,in3,in4, in5,in6,in7,in8,in9, ;;input, output Fd2, ;;dynamic Fs,led, ;;statics ta, ;;texte alarme 1, ;;option traitement alarme=1 (On) 1, ;;lines per alarm=1 for this version 0, ;;option time and date 0, ;;option status and counter index ;;stretch index endm ;;****************************************************************************** ;; DIALOG ALARM BINAIRE RETURN Version 1 with return (On-Off) ;;****************************************************************************** _dl0albr macro vers, in0,in1,in2,in3,in4, in5,in6,in7,in8,in9, ;;input, output Fd, ;;dynamic Fs,led, ;;statics ta, ;;texte alarme option, ;;option traitement alarme index ;;stretch index $ifdef _cvcreport $REPORT DLG-ALBR $endif __dl0alb vers,, ;;enable=blank in0,in1,in2,in3,in4, in5,in6,in7,in8,in9, ;;input, output Fd, ;;dynamic Fs,led, ;;statics ta, ;;texte alarme option, ;;option traitement alarme 1, ;;lines per alarm=1 for this version 0, ;;option time and date 0, ;;option status and counter index ;;stretch index endm ;;****************************************************************************** ;; DIALOG ALARM BINAIRE Version 2 ;;****************************************************************************** _dl0alb2 macro vers, in0,in1,in2,in3,in4, in5,in6,in7,in8,in9, ;;input, output Fd, ;;dynamic led, ;;statics LED ta, ;;texte alarme option, ;;option traitement alarme nline, ;;lines per alarm odt, ;;option time and date osc, ;;option status and counter index ;;stretch index $ifdef _cvcreport $REPORT DLG-ALB2 $endif Fs lequ F [index+1] __dl0alb vers,, ;;enable=blank in0,in1,in2,in3,in4, in5,in6,in7,in8,in9, ;;input, output Fd, ;;dynamic Fs,led, ;;statics ta, ;;texte alarme option, ;;option traitement alarme=1 (On) nline, ;;lines per alarm=1 for this version odt, ;;option time and date osc, ;;option status and counter index ;;stretch index endm ;;****************************************************************************** ;; DIALOG ALARM BINAIRE ENABLE (correspond a Version 2 de _dlgalb2) ;;****************************************************************************** _dl0albe2 macro vers, en, ;;enable in0,in1,in2,in3,in4, in5,in6,in7,in8,in9, ;;input, output Fd, ;;dynamic led, ;;statics LED ta, ;;texte alarme option, ;;option traitement alarme nline, ;;lines per alarm odt, ;;option time and date osc, ;;option status and counter index ;;stretch index $ifdef _cvcreport $REPORT DLG-ALB2 $endif Fs lequ F [index+1] __dl0alb vers, en, ;;enable in0,in1,in2,in3,in4, in5,in6,in7,in8,in9, ;;input, output Fd, ;;dynamic Fs,led, ;;statics ta, ;;texte alarme option, ;;option traitement alarme=1 (On) nline, ;;lines per alarm=1 for this version odt, ;;option time and date osc, ;;option status and counter index ;;stretch index endm ;;****************************************************************************** ;; MACRO Interne DL0ALB ;; DIALOG ALARM BINAIRE ;;****************************************************************************** __dl0alb macro vers, en, ;;enable in0,in1,in2,in3,in4, in5,in6,in7,in8,in9, ;;input, output Fd, ;;dynamic Fs,led, ;;statics ta, ;;texte alarme onoff, ;;option traitement alarme nline, ;;lines per alarm odt, ;;option date & time osc, ;;option status and counter index ;;stretch index $ifnb ;;not used $endif ;; Flag & Register statics ;;------------------------ fd0 lequ fd fd1 lequ fd+1 y_ala lequ fs ;;{0..9} $if odt=1 ;;for option date & time regdt lequ r [index*2+2] ;;2 reg per alarm ;;regdt+2n for date ;;regdt+2n +1 for time date lequ regdt ;;reg date for alarm 0 time lequ regdt+1 ;;reg time for alarm 0 $endif ;;odt=1 $if osc=1 ;;for option status & counter fbuf lequ f [index+1] ;;image alarm dans buffer flag lequ f [index*2+2] ;;2 flag per alarm ;;flag+2n for alam state ;;flag+2n +1 for ack alarm lequ flag ;;flag for state alarm 0 ack lequ flag+1 ;;flag for ack alarm 0 count lequ r [index+1] ;;1 reg per alarm $endif ;;osc=1 ;; Reset ;;========= sth _DIALOG._RESET jr l run sei k 0 acc h loop: resx y_ala $if osc=1 resx fbuf resx flag ;;alarm et ack resx flag+index+1 ;; ldlx count 0 $endif ;;osc=1 ini k index jr h loop run: $ifnb sth en jr l eom ;;->disabled, ignore alarm $endif sth _DIALOG._DLGALFUL ;;buffer full (seulement si plus de ligne libre) ;;pas utile pour les alarme a plusieurs lignes jr h eom ;;ignore alarm $if onoff=1 ;;alarm On only cmp _DIALOG._DLGALTXT ;;occupation ALTXT k 0 acc z jr l eom ;;-> _DLGALTXT ccupT acc h res fd0 ;;ALTXT libre $else ;;onoff=2 ;;alarm On/Off cmp _DIALOG._DLGALTXT ;;occupation _DLGALTXT k 0 acc z acc c out fd0 ;;_DLGALTXT busy cmp _DIALOG._DLGALRET ;;occupation _DLGALRET k 0 acc z acc c out fd1 ;;_DLGALRET busy sth fd0 anh fd1 jr h eom ;;-> _DLGALTXT et _DLGALRET ccupTs $endif ;;onoff=1,2 __dlgalb1 onoff,odt,osc,fd0,fd1,in0,y_ala,fbuf,ta,nline,date,time,alarm,ack,count,0 __dlgalb1 onoff,odt,osc,fd0,fd1,in1,y_ala,fbuf,ta,nline,date,time,alarm,ack,count,1 __dlgalb1 onoff,odt,osc,fd0,fd1,in2,y_ala,fbuf,ta,nline,date,time,alarm,ack,count,2 __dlgalb1 onoff,odt,osc,fd0,fd1,in3,y_ala,fbuf,ta,nline,date,time,alarm,ack,count,3 __dlgalb1 onoff,odt,osc,fd0,fd1,in4,y_ala,fbuf,ta,nline,date,time,alarm,ack,count,4 __dlgalb1 onoff,odt,osc,fd0,fd1,in5,y_ala,fbuf,ta,nline,date,time,alarm,ack,count,5 __dlgalb1 onoff,odt,osc,fd0,fd1,in6,y_ala,fbuf,ta,nline,date,time,alarm,ack,count,6 __dlgalb1 onoff,odt,osc,fd0,fd1,in7,y_ala,fbuf,ta,nline,date,time,alarm,ack,count,7 __dlgalb1 onoff,odt,osc,fd0,fd1,in8,y_ala,fbuf,ta,nline,date,time,alarm,ack,count,8 __dlgalb1 onoff,odt,osc,fd0,fd1,in9,y_ala,fbuf,ta,nline,date,time,alarm,ack,count,9 eom: endm ;;end of macro _dl0alb ;;********************************************************************** ;; Macros internes pour Fbox Heavac dialogue, alarme ;;********************************************************************** __dlgalerr macro rerr,E_code acc e jr l end ;;->no error ldl rerr E_code end: endm ;;********************************************************************** ;;Traitement 1 alarme binaire __dlgalb1 macro oret,odt,osc, busya,busyr, in,fdyn,fbuf, code,nl, date,time, alarm,ack,count, no $skip ;;Description ;;----------------- oret option return alarm from buffer 1=On, 2=On+Off odt option insert date & time in buffer osc option insert status & counter in buffer busya anonce alarme montante busy busyr anonce alarme retournTe busy in input alarme fdyn flag dyn input alarme=ancien statut annoncT au buffer fbuf image alarme dans buffer code no d'alarme (no de texte user) date reg to save date-with option dt time reg to save time " " alarm flag to save alarm state-with option sc ack flag to get ack " " count reg to count alarm " " nl number of line 1..4 no no dans le Fbox (0..Fbox_index) L'annonce de l'alarme se fait par le registre _DLGALTXT Il retoit le no de texte de l'alarme par le param 'code' (le no du premier texte pour les alarme a plusieurs lignes). Le reg _DLGALTXN indique le nombre de ligne de texte. Si le reg est dTja occupT, le flag busya est a 1 et l'alarme est momentatnTment ignorTe. Si l'alarme peut ˆtre annoncTe, le flag busya est setT pour les alarmes suivantes et fdyn est mis a jour. Fdyn indique toujours le dernier statut annoncT au buffer. Avec l'option return, l'annonce se fait par le registre _DLGALRET L'occupation est dans busyr. Le principe est le mˆme. Avec l'option date+time Le flag _DLGALFDT annonce au buffer d'ajouter la ligne date&time. Date & time sont mTmorisT dans cette Fbox. Date dans le reg 'date' et time dans le suivant qui est 'time' Le buffer retoit l'adresse du registre de la date dans _DLGALRDT Avec status & counter Le flag _DLGALFSC annonce au buffer d'ajouter la ligne state&count. State alarm+ack et count sont traetT dans cette Fbox. State est dans le flag 'alarm' et ack dans le suivant. Ack est directement SETT par le buffer lors de la quittance au terminal. Count est dans le reg 'count'. Il reprTsente le nombre d'apparition de l'alarme depuis la derniFre mise a 0. Le buffer retoit l'adresse du flag alarm dans _DLGALFST et l'adresse du reg count dans _DLGALRCT. Avec status & counter, et l'option return 'On+Off', les alarmes sont effacTes du buffer si alarme=0 et ack=1. $endskip $group _Dialog $ifnb $if osc=1 ;;avec option status & counter cmp _DLGALOUT ;;alarm out from buffer k code+(no*nl) acc z orh _DLGALCLR ;;OU Clear buffer jr l l_ce ;;->clear end res alarm+no+no ;;A 0 pour Tviter que l'alarme revienne immTdiatement dans le buffer res fbuf+no ;;considFre l'arme plus dans le buffer ldl count+no ;;set counter to 0 0 l_ce: $endif ;; Alarme montante ;;---------------- $if osc=1 ;;avec option status & counter ;;1. compter sth in ;;alarme prTsente (High) dyn fdyn+no ;; jr l l_ie ;;->inc end set _DLGALINT ;;set interrupt flag inc count+no ;;inc counter set alarm+no+no ;;alarme H res ack+no+no ;;not ack $if odt=1 ;;avec option date & time ;;copy date copy _HEAVAC._CLOCK._JJMMDD date+no+no ;;in reg date ;;copy time copy _HEAVAC._CLOCK._HHMMSS time+no+no ;;in reg time $endif ;;odt=1 l_ie: sth alarm+no+no ;;alarm H anl fbuf+no ;;ET pas encore dans buffer anl busya ;;_DLGALTXT pas busy jr l l_ae ;;->Pas possible d'anoncer acc h ;;Annonce alarme a mettre dans le buffer set busya ;;occupe l'annonce d'alarme set fbuf+no ;;considFre l'arme annoncTe ldl _DLGALTXT code+(no*nl) ;;annonce l'alarme par no de text ldl _DLGALTXN nl ;;number of line acc h set _DLGALFSC ;;set insert stat & count ldl _DLGALRST ;;load address stat alarm+no+no ;;with flag address ldl _DLGALRCT ;;load address count count+no ;;with reg address $if odt=1 ;;avec option date & time acc h set _DLGALFDT ;;set insert date & time ldl _DLGALRDT ;;load address DT date+no+no ;;with reg address $endif ;;odt=1 $else ;;osc=0 ;;Sans state & counter sth in ;;alarme prTsente (High) anl fdyn+no ;;dernier statut = Low anl busya ;;_DLGALTXT pas busy jr l l_ae ;;->Pas d'alarme montante ou pas possible d'anoncer acc h ;; Annonce alarme montante: set _DLGALINT ;;set interrupt flag set busya ;;occupe l'annonce d'alarme set fdyn+no ;;considFre l'arme comme a 1 (dernier statut annoncT) ldl _DLGALTXT code+(no*nl) ;;annonce l'alarme ldl _DLGALTXN nl ;;number of line $if odt=1 ;;avec option date & time acc h set _DLGALFDT ;;set insert date & time ldl _DLGALRDT ;;load address DT date+no+no ;;with reg address ;;copy date copy _HEAVAC._CLOCK._JJMMDD date+no+no ;;in reg date ;;copy time copy _HEAVAC._CLOCK._HHMMSS time+no+no ;;in reg time $endif ;;odt=1 $endif ;;osc=1,0 jr exit l_ae: ;; Alarme retour ;;---------------- $if osc=1 ;;Avec option status & counter ;;---------------------------- ;;fbuf indique si l'alarm est dTja/encore dans le buffer stl in ;;alarme retournTe (Low) res alarm+no+no ;;alarme=L $if oret=2 ;;traitement On+Off stl alarm+no+no ;;alarm a 0 anh ack+no+no ;;ET quittancTe anh fbuf+no ;;ET encore dans le buffer anl busyr ;;ET _DLGALRET pas busy jr l exit ;;->Pas possible d'anoncer acc h ;;Annonce alarme return: set busyr ;;occupe l'annonce retour alarme res fbuf+no ;;considFre l'arme comme a 0 (dernier statut annoncT) ldl _DLGALRET ;; code+(no*nl) ;;annonce le retour de l'alarme ldl count+no ;;remettre le counter a 0 0 $endif ;;oret=2 $else ;;osc=0 ;;Sans status & counter ;;--------------------- $if oret=1 ;;On uniquement (Pas return alarm from buffer) stl in ;;alarme retournTe (Low) res fdyn+no ;;considFre l'arme comme a 0 (dernier statut annoncT) $else ;;oret=2 ;;traetement On et Off stl in ;;alarme retournTe (Low) anh fdyn+no ;;dernier statut = High anl busyr ;;_DLGALRET pas busy jr l exit ;;->Pas d'alarme retournTe ou pas possible d'anoncer acc h ;;Annonce alarme return: set busyr ;;occupe l'annonce retour alarme res fdyn+no ;;considFre l'arme comme a 0 (dernier statut annoncT) ldl _DLGALRET ;; code+(no*nl) ;;annonce le retour de l'alarme $endif ;;oret=1,2 $endif ;;osc=1,0 exit: $endif ;;not blank $endgroup ;;_Dialog endm ;;__dlgalb1 ;;********************************************************************** __dlginibuf macro led,opm,rd ;;init alarme buffer ;;opm: option mark 1=Start-End ;; 2=End ;; 3=No mark ;;$group _Heavac $group _Dialog acc h res led set _DLGALCLR ;;signal clear all alarms for one cycle ;;for alarms with State and counter ;;set all alarm to ack and all counters to 0 $if opm=1 ldl _DLGALPNT 1 ld rd '0000' ;;no texte 'Start' tfr rd X _DLGALBUF k 11 ;;buf, pos 1, no texte ld rd '0001' ;;no texte 'End' tfr rd X _DLGALBUF k 15 ;;buf, pos 2, no texte tfr rd ;;='0001' X _DLGALBUF k 7 ;;nombre d'alarme dans buffer $elseif opm=2 ldl _DLGALPNT 0 ld rd '0001' ;;no texte 'End' tfr rd X _DLGALBUF k 11 ;;buf, pos 1, no texte ld rd '0000' tfr rd X _DLGALBUF k 7 ;;nombre d'alarme dans buffer $else $Error __dlginibuf Internal Error ! $endif $endgroup ;; _Dialog ;;$endgroup ;; _Heavac endm $list $nolist ;;****************************************************************************** ;; DTfinition MACRO Setup ;;****************************************************************************** ;; Macro ;;=============== _dl0setup macro vers, Fs, ;;statics to,te, ;;textes objet et element SBset ;;Set buton setup $ifnb ;;not used $endif $ifdef _cvcreport $REPORT DLG-SETUP $endif ;; Flag & Register statics ;;------------------------ f_cont LEQU Fs ;; ;; Dialog ;;=============== $ifdef _DLGTXTO Text _DLGTXO0+_DLGTXTO "" "0000" ;;version " " ;;Label d'identification "0031", ;;No texte objet standard to.04, ;;No texte objet te.04, ;;No texte TlTment " " " ", "0000", ;;Nb TlTment-1 ;;Liste de TlTments: "0503",_DLGRCONT.04,f_cont.04,"0099" ;;0 __dlgnxto $endif ;; Init ;;========== $init acc h res f_cont $endinit ;; Run ;;========= sth f_cont jr l exit res f_cont set _DLGFCONT inc _DLGRCONT cmp _DLGRCONT k 8 ;;si > 7, re-init to 0 jr n exit ;;->contrast no init ldl _DLGRCONT ;;re-init avec valeur max 0 exit: endm ;;end of macro _dl0setup ;;****************************************************************************** ;; DTfinition MACRO DLGMIMA ;;****************************************************************************** ;; Macro ;;=============== _dl0mima macro vers, RsMi,RsMa, ;;statics Rs min,Rs max min0,max0, ;;set value min1,max1, min2,max2, min3,max3, min4,max4, min5,max5, min6,max6, min7,max7, min8,max8, min9,max9, min10,max10, min11,max11, min12,max12, min13,max13, min14,max14 $ifb ;;not used $endif $ifdef _cvcreport $REPORT DLG-MIMA $endif _DLGRMIN EQU RsMi ;;registre de base min _DLGRMAX EQU RsMa ;;registre de base max ;; Initialisation des minima et maxima $init __dlgldmm 0,min0,max0 ;;utilise aussi _DLGRMIN/MAX __dlgldmm 1,min1,max1 ;; publiT ci-dessus __dlgldmm 2,min2,max2 __dlgldmm 3,min3,max3 __dlgldmm 4,min4,max4 __dlgldmm 5,min5,max5 __dlgldmm 6,min6,max6 __dlgldmm 7,min7,max7 __dlgldmm 8,min8,max8 __dlgldmm 9,min9,max9 __dlgldmm 10,min10,max10 __dlgldmm 11,min11,max11 __dlgldmm 12,min12,max12 __dlgldmm 13,min13,max13 __dlgldmm 14,min14,max14 __dlgldmm 15,0,0 ;;sTcuritT code 5 … 10 __dlgldmm 16,0,0 __dlgldmm 17,0,0 __dlgldmm 18,0,0 __dlgldmm 19,0,0 $endinit endm ;;end of macro dlgmima ;;****************************************************************************** ;; DTfinition MACRO DLGSCT ;;****************************************************************************** ;; Macro ;;=============== _dl0sct macro vers, Fd,Rd, ;;dynamics Fs,Rs, ;;statics op,no,ts ;;Nb object et No de texte utilisateur ;; Value option op ;;---------------- ;; 1= standrd ;; 2= object (section … 1 seul object, pas de menu section) ;; 3= mark (uniquement une marque pas d'object) $if vers<1 $Error Old Dlg-Section. Not anymore supported ! exitm $endif $ifdef _cvcreport $REPORT DLG-SCT $endif ;; Flag & Register statics ;;------------------------ fd0 LEQU fd rd0 LEQU rd fs0 LEQU fs rs0 LEQU rs _op LEQU op ;;used in old versions < $133 _ts LEQU ts ;; " _no LEQU no ;; " ;; Dialog ;;=============== _DLGINS def 1 ;;annonce prTsence du menu installation Text _DLGTXS0+_DLGTXTS "" "0000", ;;version op.04, ;;options ts.04, ;;No texte utilisateur _DLGOBJ.04, ;;No du premier objet de section (relatif) no.04 ;;Nombre d'objet de la section __dlgnxts _no ;;defined next section endm ;;end of macro _dlgsct ;;****************************************************************************** ;; DTfinition MACRO DLGMARK ;;****************************************************************************** ;; Macro ;;=============== _dl0mark macro vers, to ;;No de texte utilisateur object $ifnb ;;not used $endif $ifdef _cvcreport $REPORT DLG-MARK $endif ;; Flag & Register statics ;;------------------------ _to LEQU to ;; Dialog ;;=============== $ifdef _DLGTXTO Text _DLGTXO0+_DLGTXTO "" "0000" ;;version "MARK" ;;Identification "0049", ;;No texte objet standard to.04, ;;No texte objet "0000", ;;No texte TlTment (not used) " " " ", "0000" ;;Nb TlTment-1 "0000", 0.04, 0.04,"0000" ;;0 (not used) __dlgnxto $endif endm ;;end of macro _dlgmark ;;********************************************************************** ;; Macros internes pour Fbox Heavac dialogue, divers ;;********************************************************************** __dlgldmm macro off,min,max ;;load minimum and maximum ld _DLGRMIN+off ;;load minimum min ld _DLGRMAX+off ;;load maximum max endm ;;********************************************************************** __dlgnxts macro nbo ;;macro next section (numbre of object) _DLGTXTS def _DLGTXTS+1 $if _DLGTXTS = _DLGMAXS+1 $Warning More Sections used than specified in SASI-Dialog $endif $if _DLGTXTO+nbo >= _DLGMAXO $Warning To many object specified in Dlg-Section $endif $init inc _DLGCTS $endinit endm ;;********************************************************************** __dlgnxto macro ;;macro next object ;; Next object _DLGTXTO def _DLGTXTO+1 _DLGOBJ def _DLGOBJ+1 ;;numTrotation automatique $if _DLGTXTO = _DLGMAXO+1 $Warning More Objects used than specified in SASI-Dialog $endif $init inc _DLGCTO $endinit endm ;;********************************************************************** $list $nolist ;;****************************************************************************** ;; Librairie de FBox de dialogue HEAVAC ;;****************************************************************************** ;;****************************************************************************** ;; Macro F-Key commands ;;****************************************************************************** _dl0FKey macro vers, key0,key1,key2,key3,key4,key5,key6,key7,key8,key9, key10,key11,key12,key13,key14,key15,key16,key17,key18,key19, fop, ;;command option index ;;stretch index $ifnb ;;not used $endif flag lequ f [index+1] $init sei k 0 acc h loop: resx flag ini k index jr h loop $endinit __dl0FKey (key0 ,fop,flag,0 ) __dl0FKey (key1 ,fop,flag,1 ) __dl0FKey (key2 ,fop,flag,2 ) __dl0FKey (key3 ,fop,flag,3 ) __dl0FKey (key4 ,fop,flag,4 ) __dl0FKey (key5 ,fop,flag,5 ) __dl0FKey (key6 ,fop,flag,6 ) __dl0FKey (key7 ,fop,flag,7 ) __dl0FKey (key8 ,fop,flag,8 ) __dl0FKey (key9 ,fop,flag,9 ) __dl0FKey (key10,fop,flag,10) __dl0FKey (key11,fop,flag,11) __dl0FKey (key12,fop,flag,12) __dl0FKey (key13,fop,flag,13) __dl0FKey (key14,fop,flag,14) __dl0FKey (key15,fop,flag,15) __dl0FKey (key16,fop,flag,16) __dl0FKey (key17,fop,flag,17) __dl0FKey (key18,fop,flag,18) __dl0FKey (key19,fop,flag,19) endm __dl0FKey macro key,fop,flag,code $ifnb $if fop=1 ;;Option Puls acc h res flag+code ;;reset each cycle $endif sth _DIALOG._FKFLAG jr l exit cmp _DIALOG._FKCODE k code acc z jr l exit res _DIALOG._FKFLAG ;;reset for next macro $if fop=1 ;;Option Puls set flag+code $elseif fop=2 ;;Option Toggel, not implemented in DEF com flag+code $endif ;;option=1,2 exit: sth flag+code out key $endif ;;not blank endm ;;****************************************************************************** ;; Macro Display Data List format xxxxx ;;****************************************************************************** _dl0DisIL macro vers, address,number, ;;Base address and number of element fs,rs, ;;statics to,te,b1 ;;No of user text __dl0DisL vers, address,number, ;;Base address and number of element fs,rs, ;;statics to,te,b1, ;;No of user text 03 ;;format xxxxx=03 endm ;;****************************************************************************** ;; Macro Display Data List format xxx.y ;;****************************************************************************** _dl0DisJL macro vers, address,number, ;;Base address and number of element fs,rs, ;;statics to,te,b1 ;;No of user text __dl0DisL vers, address,number, ;;Base address and number of element fs,rs, ;;statics to,te,b1, ;;No of user text 02 ;;format xxxxx=03 endm ;;****************************************************************************** ;; Internal Macro Display Data List ;;****************************************************************************** __dl0DisL macro vers, addr,number, ;;Base address and number of element fs,rs, ;;statics to,te,b1, ;;No of user text for ;;format $ifnb ;;not used $endif $if number<1 index lequ 0 $elseif number>100 index lequ 99 $else index lequ number-1 $endif acs lequ 01 ;;access code=01=Disp ;;Statics ;;------- next lequ fs num lequ rs ;;number to display value lequ rs+1 ;;value to display $ifdef _cvcreport $REPORT DLG-DISL $endif ;; Init ;;========== $init acc h res next ldl num 0 $endinit ;; Run ;;========= sth next res next jr l l_ne inc num cmp k index num jr p l_ne ldl num 0 l_ne: sei num getx addr value ;; Dialog ;;=============== $ifdef _DLGTXTO Text _DLGTXO0+_DLGTXTO "", "0000", ;;version "LIST", ;;Label d'identification "0028", ;;No texte objet standard to.04, ;;No texte objet te.04, ;;No texte TlTment " ", " ", index.04, ;;Nb TlTment-1 "",acs.02,for.02,addr.04,0.04,"0061" __dlgnxto $endif endm ;;_dlgDisL ;;****************************************************************************** ;; MACRO Edit Duplex = Huat/Bas ;;****************************************************************************** _dl0EdiD macro vers, up0,up1,up2,up3, ;;outputs UP up4,up5,up6,up7, dn0,dn1,dn2,dn3, ;;outputs DOWN dn4,dn5,dn6,dn7, to,te, ;;No de texte utilisateur index $ifnb ;;not used $endif ;;Statics ;;------- f_up lequ F [index*2+2] acs lequ 02 ;;access code=02=Edit for lequ 20 ;;format=20=Duplex $ifdef _cvcreport $REPORT DLG-EDID $endif ;; Init ;;========== $init acc h sei k 0 l_i: resx f_up ini k index*2+1 jr h l_i $endinit ;; Dialog ;;=============== $ifdef _DLGTXTO $if index < 4 Text _DLGTXO0+_DLGTXTO "", "0000", ;;version " ", ;;Label d'identification "0007", ;;No texte objet standard to.04, ;;No texte objet te.04, ;;No texte TlTment " ", " ", index.04, ;;Nb TlTment-1 ;;Liste de TlTments: acs.02,for.02,f_up+0.04,0.04,"0010", ;;0 acs.02,for.02,f_up+2.04,0.04,"0010", ;;1 acs.02,for.02,f_up+4.04,0.04,"0010", ;;2 acs.02,for.02,f_up+6.04,0.04,"0010" ;;3 $else Text _DLGTXO0+_DLGTXTO "", "0000", ;;version " ", ;;Label d'identification "0007", ;;No texte objet standard to.04, ;;No texte objet te.04, ;;No texte TlTment " ", " ", index.04, ;;Nb TlTment-1 ;;Liste de TlTments: acs.02,for.02,f_up+ 0.04,0.04,"0010", ;;0 acs.02,for.02,f_up+ 2.04,0.04,"0010", ;;1 acs.02,for.02,f_up+ 4.04,0.04,"0010", ;;2 acs.02,for.02,f_up+ 6.04,0.04,"0010", ;;3 acs.02,for.02,f_up+ 8.04,0.04,"0010", ;;4 acs.02,for.02,f_up+10.04,0.04,"0010", ;;5 acs.02,for.02,f_up+12.04,0.04,"0010", ;;6 acs.02,for.02,f_up+14.04,0.04,"0010" ;;7 $endif __dlgnxto $endif ;; Run ;;==== ;;copy input into static register if not blank __dlgdup (up0,dn0,f_up,0) __dlgdup (up1,dn1,f_up,2) __dlgdup (up2,dn2,f_up,4) __dlgdup (up3,dn3,f_up,6) __dlgdup (up4,dn4,f_up,8) __dlgdup (up5,dn5,f_up,10) __dlgdup (up6,dn6,f_up,12) __dlgdup (up7,dn7,f_up,14) endm ;;end of macro _dlgEdiD ;;****************************************************************************** ;; MACRO Display 1 a 8 Mesages ;;****************************************************************************** _dl0Msg macro vers, in0,in1,in2,in3, ;;inputs in4,in5,in6,in7, to,te, ;;No de texte utilisateur index $ifnb ;;not used $endif ;;Statics ;;------- val lequ R [index+1] $ifdef _cvcreport $REPORT DLG-MSG $endif ;; Run ;;==== ;;copy input into static register if not blank __dlgdsi (in0,val,0) ;;Attention ! __dlgdsi (in1,val,1) ;;Les paramFtres in? ne peuvent Otre utilisTs __dlgdsi (in2,val,2) ;;dans les textes ci-dessous ! __dlgdsi (in3,val,3) ;; __dlgdsi (in4,val,4) ;; __dlgdsi (in5,val,5) ;; __dlgdsi (in6,val,6) ;; __dlgdsi (in7,val,7) ;; ;; Dialog ;;=============== $ifdef _DLGTXTO $if index < 4 Text _DLGTXO0+_DLGTXTO "" "0000" ;;version " " ;;Label d'identification "0032", ;;No texte objet standard to.04, ;;No texte objet te.04, ;;No texte TlTment " " " ", index.04, ;;Nb TlTment-1 ;;Liste de TlTments: "0050",val+0.04,0.04,"0009" ;;0 "0050",val+1.04,0.04,"0009" ;;1 "0050",val+2.04,0.04,"0009" ;;2 "0050",val+3.04,0.04,"0009" ;;3 $else Text _DLGTXO0+_DLGTXTO "" "0000" ;;version " " ;;Label d'identification "0032", ;;No texte objet standard to.04, ;;No texte objet te.04, ;;No texte TlTment " " " ", index.04, ;;Nb TlTment-1 ;;Liste de TlTments: "0050",val+0.04,0.04,"0009" ;;0 "0050",val+1.04,0.04,"0009" ;;1 "0050",val+2.04,0.04,"0009" ;;2 "0050",val+3.04,0.04,"0009" ;;3 "0050",val+4.04,0.04,"0009" ;;4 "0050",val+5.04,0.04,"0009" ;;5 "0050",val+6.04,0.04,"0009" ;;6 "0050",val+7.04,0.04,"0009" ;;7 $endif __dlgnxto $endif endm ;;end of macro _dlgmsg ;;****************************************************************************** ;; DTfinition MACRO Edit binaire a 8 output ;;****************************************************************************** _dl0edib macro vers, out0,out1,out2,out3,out4, ;;outputs out5,out6,out7, Fs, ;;statics to,te, ;;No de texte utilisateur Sb00,Sb01, ;;boutons Sb10,Sb11, Sb20,Sb21, Sb30,Sb31, Sb40,Sb41, Sb50,Sb51, Sb60,Sb61, Sb70,Sb71, index ;;version 8 output ;;->adaptation a la version a 20 outputs ;;Important: vers=0 pour que l'index soit au bon paramFtre _dl0edi2b vers, out0,out1,out2,out3,out4, ;;outputs out5,out6,out7,,,,,,,,,,,,, Fs, ;;statics to,te, ;;No de texte utilisateur Sb00,Sb01, ;;boutons Sb10,Sb11, Sb20,Sb21, Sb30,Sb31, Sb40,Sb41, Sb50,Sb51, Sb60,Sb61, Sb70,Sb71, index endm ;;end of macro _dlgedib ;;****************************************************************************** ;; DTfinition MACRO Edit binaire a 20 outputs ;; Supporte Tgalement l'ancienne version a 8 outputs ! ;;****************************************************************************** _dl0edi2b macro vers, out0,out1,out2,out3,out4, ;;outputs out5,out6,out7,out8,out9, out10,out11,out12,out13,out14, out15,out16,out17,out18,out19, Fs, ;;statics to,te, ;;No de texte utilisateur Sb00,Sb01, ;;boutons Sb10,Sb11, Sb20,Sb21, Sb30,Sb31, Sb40,Sb41, Sb50,Sb51, Sb60,Sb61, Sb70,Sb71, Sb80,Sb81, ;;Sb80 = index pour vers=0 de _dl0edi2b et _dl0edib Sb90,Sb91, Sb100,Sb101, Sb110,Sb111, Sb120,Sb121, Sb130,Sb131, Sb140,Sb141, Sb150,Sb151, Sb160,Sb161, Sb170,Sb171, Sb180,Sb181, Sb190,Sb191, index_ $if vers=0 index lequ Sb80 $else index lequ index_ $endif $ifb ;;not used $endif $ifb ;;not used $endif $ifb ;;not used $endif $ifb ;;not used $endif $ifdef _cvcreport $REPORT DLG-EDIB $endif ;; Flag & Register statics ;;------------------------ f_val LEQU Fs ;;[20] flag manual ;; Dialog ;;=============== $ifdef _DLGTXTO $if index < 4 Text _DLGTXO0+_DLGTXTO "" "0000" ;;version " " ;;Label d'identification "0001", ;;No texte objet standard to.04, ;;No texte objet te.04, ;;No texte TlTment " " " ", index.04, ;;Nb TlTment-1 ;;Liste de TlTments: "0201",f_val+0.04, 0.04,"0003" ;;0 "0201",f_val+1.04, 0.04,"0003" ;;1 "0201",f_val+2.04, 0.04,"0003" ;;2 "0201",f_val+3.04, 0.04,"0003" ;;3 $elseif index < 8 Text _DLGTXO0+_DLGTXTO "" "0000" ;;version "EdBi" ;;Label d'identification "0001", ;;No texte objet standard to.04, ;;No texte objet te.04, ;;No texte TlTment " " " ", index.04, ;;Nb TlTment-1 ;;Liste de TlTments: "0201",f_val+0.04, 0.04,"0003" ;;0 "0201",f_val+1.04, 0.04,"0003" ;;1 "0201",f_val+2.04, 0.04,"0003" ;;2 "0201",f_val+3.04, 0.04,"0003" ;;3 "0201",f_val+4.04, 0.04,"0003" ;;4 "0201",f_val+5.04, 0.04,"0003" ;;5 "0201",f_val+6.04, 0.04,"0003" ;;6 "0201",f_val+7.04, 0.04,"0003" ;;7 $else Text _DLGTXO0+_DLGTXTO "" "0000" ;;version " " ;;Label d'identification "0001", ;;No texte objet standard to.04, ;;No texte objet te.04, ;;No texte TlTment " " " ", index.04, ;;Nb TlTment-1 ;;Liste de TlTments: "0201",f_val+0.04, 0.04,"0003" ;;0 "0201",f_val+1.04, 0.04,"0003" ;;1 "0201",f_val+2.04, 0.04,"0003" ;;2 "0201",f_val+3.04, 0.04,"0003" ;;3 "0201",f_val+4.04, 0.04,"0003" ;;4 "0201",f_val+5.04, 0.04,"0003" ;;5 "0201",f_val+6.04, 0.04,"0003" ;;6 "0201",f_val+7.04, 0.04,"0003" ;;7 "0201",f_val+8.04, 0.04,"0003" ;;8 "0201",f_val+9.04, 0.04,"0003" ;;9 "0201",f_val+10.04, 0.04,"0003" ;;10 "0201",f_val+11.04, 0.04,"0003" ;;11 "0201",f_val+12.04, 0.04,"0003" ;;12 "0201",f_val+13.04, 0.04,"0003" ;;3 "0201",f_val+14.04, 0.04,"0003" ;;14 "0201",f_val+15.04, 0.04,"0003" ;;15 "0201",f_val+16.04, 0.04,"0003" ;;16 "0201",f_val+17.04, 0.04,"0003" ;;17 "0201",f_val+18.04, 0.04,"0003" ;;18 "0201",f_val+19.04, 0.04,"0003" ;;19 $endif __dlgnxto $endif ;; Reset ;;=============== __heareset l,run ;;jump if _reset=low sei k 0 lr: resx f_val ;;reset valeur ;; ini k 19 ;;Bug avec version a 8 output ! CorrigT / 22.04.97 ini k index ;;Les flags non-utilisTs ne sont pas initialisTs jr h lr ;; Run ;;=============== run: __dlgedb (f_val,0,out0) __dlgedb (f_val,1,out1) __dlgedb (f_val,2,out2) __dlgedb (f_val,3,out3) __dlgedb (f_val,4,out4) __dlgedb (f_val,5,out5) __dlgedb (f_val,6,out6) __dlgedb (f_val,7,out7) __dlgedb (f_val,8,out8) __dlgedb (f_val,9,out9) __dlgedb (f_val,10,out10) __dlgedb (f_val,11,out11) __dlgedb (f_val,12,out12) __dlgedb (f_val,13,out13) __dlgedb (f_val,14,out14) __dlgedb (f_val,15,out15) __dlgedb (f_val,16,out16) __dlgedb (f_val,17,out17) __dlgedb (f_val,18,out18) __dlgedb (f_val,19,out19) endm ;;end of macro _dlgedi2b ;;****************************************************************************** ;; DTfinition MACRO Edit integer a 8 output ;;****************************************************************************** _dl0edii macro vers, out0,out1,out2,out3, ;;outputs out4,out5,out6,out7, Rs, ;;statics to,te, ;;No de texte utilisateur S0,S1,S2,S3, ;;boutons S4,S5,S6,S7, index ;;version 8 output ;;->adaptation a la version a 20 outputs __dlgedii vers, out0,out1,out2,out3,out4, ;;outputs out5,out6,out7,,,,,,,,,,,,, Rs, ;;statics to,te, ;;No de texte utilisateur S0,S1,S2,S3, ;;boutons S4,S5,S6,S7,,,,,,,,,,,,, index,0202 ;;type = 0202 endm ;;end of macro _dlgedii ;;****************************************************************************** ;; DTfinition MACRO Edit Integer 2 I a 20 outputs ;;****************************************************************************** _dl0edi2i macro vers, out0,out1,out2,out3,out4, ;;outputs out5,out6,out7,out8,out9, out10,out11,out12,out13,out14, out15,out16,out17,out18,out19, Rs, ;;statics to,te, ;;No de texte utilisateur S0,S1,S2,S3, ;;boutons S4,S5,S6,S7, S8,S9,S10,S11, ;;S8=index pour vers=0 S12,S13,S14,S15, S16,S17,S18,S19, index_ $if vers=0 index lequ S8 $else index lequ index_ $endif __dlgedii vers, out0,out1,out2,out3,out4, ;;outputs out5,out6,out7,out8,out9, out10,out11,out12,out13,out14, out15,out16,out17,out18,out19, Rs, ;;statics to,te, ;;No de texte utilisateur S0,S1,S2,S3, ;;boutons S4,S5,S6,S7, S8,S9,S10,S11, S12,S13,S14,S15, S16,S17,S18,S19, index,0202 ;;type = 0202 endm ;;end of macro _dl0edi2i ;;****************************************************************************** ;; DTfinition MACRO Edit integer 2 J a 20 outputs ;;****************************************************************************** _dl0edi2j macro vers, out0,out1,out2,out3,out4, ;;outputs out5,out6,out7,out8,out9, out10,out11,out12,out13,out14, out15,out16,out17,out18,out19, Rs, ;;statics to,te, ;;No de texte utilisateur S0,S1,S2,S3, ;;boutons S4,S5,S6,S7, S8,S9,S10,S11, ;;S8=index pour vers=0 S12,S13,S14,S15, S16,S17,S18,S19, index_ $if vers=0 index lequ S8 $else index lequ index_ $endif ;;appel Fbox __dlgedii __dlgedii vers, out0,out1,out2,out3,out4, ;;outputs out5,out6,out7,out8,out9, out10,out11,out12,out13,out14, out15,out16,out17,out18,out19, Rs, ;;statics to,te, ;;No de texte utilisateur S0,S1,S2,S3, ;;boutons S4,S5,S6,S7, S8,S9,S10,S11, S12,S13,S14,S15, S16,S17,S18,S19, index,0203 ;;type = 0203 endm ;;end of macro _dl0edi2j ;;****************************************************************************** ;; DTfinition MACRO interne Edit integer universelle a 20 outputs ;; Supporte Tgalement l'ancienne version a 8 outputs ! ;;****************************************************************************** __dlgedii macro vers, out0,out1,out2,out3,out4, ;;outputs out5,out6,out7,out8,out9, out10,out11,out12,out13,out14, out15,out16,out17,out18,out19, Rs, ;;statics to,te, ;;No de texte utilisateur S0,S1,S2,S3, ;;boutons S4,S5,S6,S7, S8,S9,S10,S11, S12,S13,S14,S15, S16,S17,S18,S19, index,type $ifnb ;;not used $endif $ifdef _cvcreport $REPORT DLG-EDII $endif ;; Flag & Register statics ;;------------------------ vama LEQU Rs ;;{8} ou {20} valeur manuelle ;; Dialog ;;=============== $ifdef _DLGTXTO $if index < 4 Text _DLGTXO0+_DLGTXTO "" "0000" ;;Version "EdIn" ;;Label d'identification "0002", ;;No texte objet standard to.04, ;;No texte objet te.04, ;;No texte TlTment " " " ", index.04, ;;Nb TlTment-1 type.04, vama.04, 0.04,"0004", ;;0 ;;Liste de TlTments: type.04, vama+1.04, 0.04,"0004",;;1 type.04, vama+2.04, 0.04,"0004",;;2 type.04, vama+3.04, 0.04,"0004" ;;3 $elseif index < 8 Text _DLGTXO0+_DLGTXTO "" "0000" ;;Version "EdIn" ;;Label d'identification "0002", ;;No texte objet standard to.04, ;;No texte objet te.04, ;;No texte TlTment " " " ", index.04, ;;Nb TlTment-1 type.04, vama.04, 0.04,"0004",;;0 ;;Liste de TlTments: type.04, vama+1.04, 0.04,"0004",;;1 type.04, vama+2.04, 0.04,"0004",;;2 type.04, vama+3.04, 0.04,"0004",;;3 type.04, vama+4.04, 0.04,"0004",;;4 type.04, vama+5.04, 0.04,"0004",;;5 type.04, vama+6.04, 0.04,"0004",;;6 type.04, vama+7.04, 0.04,"0004" ;;7 $else Text _DLGTXO0+_DLGTXTO "" "0000" ;;Version "EdIn" ;;Label d'identification "0002", ;;No texte objet standard to.04, ;;No texte objet te.04, ;;No texte TlTment " " " ", index.04, ;;Nb TlTment-1 ;;Liste de TlTments: type.04, vama+0.04, 0.04,"0004", ;;0 type.04, vama+1.04, 0.04,"0004", ;;1 type.04, vama+2.04, 0.04,"0004", ;;2 type.04, vama+3.04, 0.04,"0004", ;;3 type.04, vama+4.04, 0.04,"0004", ;;4 type.04, vama+5.04, 0.04,"0004", ;;5 type.04, vama+6.04, 0.04,"0004", ;;6 type.04, vama+7.04, 0.04,"0004", ;;7 type.04, vama+8.04, 0.04,"0004", ;;8 type.04, vama+9.04, 0.04,"0004", ;;9 type.04, vama+10.04, 0.04,"0004", ;;10 type.04, vama+11.04, 0.04,"0004", ;;11 type.04, vama+12.04, 0.04,"0004", ;;12 type.04, vama+13.04, 0.04,"0004", ;;13 type.04, vama+14.04, 0.04,"0004", ;;14 type.04, vama+15.04, 0.04,"0004", ;;15 type.04, vama+16.04, 0.04,"0004", ;;16 type.04, vama+17.04, 0.04,"0004", ;;17 type.04, vama+18.04, 0.04,"0004", ;;18 type.04, vama+19.04, 0.04,"0004" ;;19 $endif __dlgnxto $endif ;; Reset ;;=============== __heareset l,run ;;jump if _reset=low ld vama S0 ld vama+1 S1 ld vama+2 S2 ld vama+3 S3 ld vama+4 S4 ld vama+5 S5 ld vama+6 S6 ld vama+7 S7 $if vers=0 $if index>7 ;;seulement pour vesion a plus de 7 output ;; ! plage vama = {8} pour _dl0edii ! ;; ! plage vama = {20} pour _dl0edii2 ! sei k 8 l_i: ldlx vama ;;var 8..19 mises a 0 0 ini k 19 jr h l_i ;;->loop $endif $else ;;vers=2, avec 20 paramFtres ld vama+8 S8 ld vama+9 S9 ld vama+10 S10 ld vama+11 S11 ld vama+12 S12 ld vama+13 S13 ld vama+14 S14 ld vama+15 S15 ld vama+16 S16 ld vama+17 S17 ld vama+18 S18 ld vama+19 S19 $endif ;;vers=1,2 ;; Run ;;=============== run: __dlgedi (vama,0,out0) __dlgedi (vama,1,out1) __dlgedi (vama,2,out2) __dlgedi (vama,3,out3) __dlgedi (vama,4,out4) __dlgedi (vama,5,out5) __dlgedi (vama,6,out6) __dlgedi (vama,7,out7) __dlgedi (vama,8,out8) __dlgedi (vama,9,out9) __dlgedi (vama,10,out10) __dlgedi (vama,11,out11) __dlgedi (vama,12,out12) __dlgedi (vama,13,out13) __dlgedi (vama,14,out14) __dlgedi (vama,15,out15) __dlgedi (vama,16,out16) __dlgedi (vama,17,out17) __dlgedi (vama,18,out18) __dlgedi (vama,19,out19) endm ;;end of macro __dlgedii ;;****************************************************************************** ;; DTfinition MACRO DLGDISPB a 8 inputs ;;****************************************************************************** _dl0dispb macro vers, in0,in1,in2,in3, ;;inputs in4,in5,in6,in7, Fs, ;;statics to,te, ;;No de texte utilisateur index _dl0dis2b vers, ;;appel version a 20 inputs in0,in1,in2,in3, ;;inputs in4,in5,in6,in7,,,,,,,,,,,,, Fs, ;;statics to,te, ;;No de texte utilisateur index endm ;;end of macro _dlgdispb ;;****************************************************************************** ;; DTfinition MACRO DL0DIS2B a 20 inputs ;;****************************************************************************** _dl0dis2b macro vers, in0,in1,in2,in3,in4, ;;inputs in5,in6,in7,in8,in9, in10,in11,in12,in13,in14, in15,in16,in17,in18,in19, Fs, ;;statics to,te, ;;No de texte utilisateur index $ifnb ;;not used $endif $ifdef _cvcreport $REPORT DLG-DISPB $endif ;; Flag & Register statics ;;------------------------ f_val LEQU Fs ;;{20} falg valeur interne _to LEQU to _te LEQU te ;; Dialog ;;=============== $ifdef _DLGTXTO $if index < 4 Text _DLGTXO0+_DLGTXTO "" "0000" ;;Version "DiBi" ;;Label d'identification "0005", ;;No texte objet standard to.04, ;;No texte objet te.04, ;;No texte TlTment " " " ", index.04, ;;Nb TlTment-1 ;;Liste des TlTments: "0101",f_val+0.04, 0.04,"0007" ;;0 "0101",f_val+1.04, 0.04,"0007" ;;1 "0101",f_val+2.04, 0.04,"0007" ;;2 "0101",f_val+3.04, 0.04,"0007" ;;3 $elseif index < 8 Text _DLGTXO0+_DLGTXTO "" "0000" ;;Version "DiBi" ;;Label d'identification "0005", ;;No texte objet standard to.04, ;;No texte objet te.04, ;;No texte TlTment " " " ", index.04, ;;Nb TlTment-1 ;;Liste de TlTments: "0101",f_val+0.04, 0.04,"0007" ;;0 "0101",f_val+1.04, 0.04,"0007" ;;1 "0101",f_val+2.04, 0.04,"0007" ;;2 "0101",f_val+3.04, 0.04,"0007" ;;3 "0101",f_val+4.04, 0.04,"0007" ;;4 "0101",f_val+5.04, 0.04,"0007" ;;5 "0101",f_val+6.04, 0.04,"0007" ;;6 "0101",f_val+7.04, 0.04,"0007" ;;7 $else Text _DLGTXO0+_DLGTXTO "" "0000" ;;Version "DiBi" ;;Label d'identification "0005", ;;No texte objet standard to.04, ;;No texte objet te.04, ;;No texte TlTment " " " ", index.04, ;;Nb TlTment-1 ;;Liste de TlTments: "0101",f_val+0.04, 0.04,"0007" ;;0 "0101",f_val+1.04, 0.04,"0007" ;;1 "0101",f_val+2.04, 0.04,"0007" ;;2 "0101",f_val+3.04, 0.04,"0007" ;;3 "0101",f_val+4.04, 0.04,"0007" ;;4 "0101",f_val+5.04, 0.04,"0007" ;;5 "0101",f_val+6.04, 0.04,"0007" ;;6 "0101",f_val+7.04, 0.04,"0007" ;;7 "0101",f_val+8.04, 0.04,"0007" ;;8 "0101",f_val+9.04, 0.04,"0007" ;;9 "0101",f_val+10.04, 0.04,"0007" ;;10 "0101",f_val+11.04, 0.04,"0007" ;;11 "0101",f_val+12.04, 0.04,"0007" ;;12 "0101",f_val+13.04, 0.04,"0007" ;;13 "0101",f_val+14.04, 0.04,"0007" ;;14 "0101",f_val+15.04, 0.04,"0007" ;;15 "0101",f_val+16.04, 0.04,"0007" ;;16 "0101",f_val+17.04, 0.04,"0007" ;;17 "0101",f_val+18.04, 0.04,"0007" ;;18 "0101",f_val+19.04, 0.04,"0007" ;;19 $endif __dlgnxto $endif ;; Run ;;=============== run: __dlgdsb (in0,f_val,0) __dlgdsb (in1,f_val,1) __dlgdsb (in2,f_val,2) __dlgdsb (in3,f_val,3) __dlgdsb (in4,f_val,4) __dlgdsb (in5,f_val,5) __dlgdsb (in6,f_val,6) __dlgdsb (in7,f_val,7) __dlgdsb (in8,f_val,8) __dlgdsb (in9,f_val,9) __dlgdsb (in10,f_val,10) __dlgdsb (in11,f_val,11) __dlgdsb (in12,f_val,12) __dlgdsb (in13,f_val,13) __dlgdsb (in14,f_val,14) __dlgdsb (in15,f_val,15) __dlgdsb (in16,f_val,16) __dlgdsb (in17,f_val,17) __dlgdsb (in18,f_val,18) __dlgdsb (in19,f_val,19) endm ;;end of macro _dlgdis2b ;;****************************************************************************** ;; DTfinition MACRO DLGDISPI a 8 inputs ;;****************************************************************************** _dl0dispi macro vers, in0,in1,in2,in3, ;;inputs in4,in5,in6,in7, Rs, ;;statics to,te, ;;No de texte utilisateur index __dlgdisi vers, ;; appel version a 20 inputs in0,in1,in2,in3, ;;inputs in4,in5,in6,in7,,,,,,,,,,,,, Rs, ;;statics to,te, ;;No de texte utilisateur index,0102 ;;type endm ;;end of macro _dlgdispi ;;****************************************************************************** ;; DTfinition MACRO DLGDIS2J a 20 inputs ;;****************************************************************************** _dl0dis2j macro vers, in0,in1,in2,in3,in4, ;;inputs in5,in6,in7,in8,in9, in10,in11,in12,in13,in14, in15,in16,in17,in18,in19, Rs, ;;statics to,te, ;;No de texte utilisateur index __dlgdisi vers+100, ;;appel __dlgdisi in0,in1,in2,in3,in4, ;;inputs in5,in6,in7,in8,in9, in10,in11,in12,in13,in14, in15,in16,in17,in18,in19, Rs, ;;statics to,te, ;;No de texte utilisateur index,0103 ;;type endm ;;end of macro _dlgdis2j ;;****************************************************************************** ;; DTfinition MACRO DLGDIS2I a 20 inputs ;;****************************************************************************** _dl0dis2i macro vers, in0,in1,in2,in3,in4, ;;inputs in5,in6,in7,in8,in9, in10,in11,in12,in13,in14, in15,in16,in17,in18,in19, Rs, ;;statics to,te, ;;No de texte utilisateur index __dlgdisi vers, in0,in1,in2,in3,in4, ;;inputs in5,in6,in7,in8,in9, in10,in11,in12,in13,in14, in15,in16,in17,in18,in19, Rs, ;;statics to,te, ;;No de texte utilisateur index,0102 ;;type endm ;;end of macro _dl0dis2i ;;****************************************************************************** ;;DTfinition MACRO interne DLGDISI a 20 inputs ;;****************************************************************************** __dlgdisi macro vers, in0,in1,in2,in3,in4, ;;inputs in5,in6,in7,in8,in9, in10,in11,in12,in13,in14, in15,in16,in17,in18,in19, Rs, ;;statics to,te, ;;No de texte utilisateur index,type $ifnb ;;not used $endif $ifdef _cvcreport $REPORT DLG-DISPI $endif ;; Flag & Register statics ;;------------------------ val LEQU Rs ;;{20} valeur manuelle _to LEQU to _te LEQU te ;; Dialog ;;=============== $ifdef _DLGTXTO $if index < 4 Text _DLGTXO0+_DLGTXTO "" "0000" ;;Version "DiIn" ;;Label d'identification "0006", ;;No texte objet standard to.04, ;;No texte objet te.04, ;;No texte TlTment " " " ", index.04, ;;Nb TlTment-1 type.04,val+0.04, 0.04,"0008",;;0 type.04,val+1.04, 0.04,"0008",;;1 type.04,val+2.04, 0.04,"0008",;;2 type.04,val+3.04, 0.04,"0008" ;;3 $elseif index < 8 Text _DLGTXO0+_DLGTXTO "" "0000" ;;Version "DiIn" ;;Label d'identification "0006", ;;No texte objet standard to.04, ;;No texte objet te.04, ;;No texte TlTment " " " ", index.04, ;;Nb TlTment-1 type.04,val+0.04, 0.04,"0008",;;0 type.04,val+1.04, 0.04,"0008",;;1 type.04,val+2.04, 0.04,"0008",;;2 type.04,val+3.04, 0.04,"0008",;;3 type.04,val+4.04, 0.04,"0008",;;4 type.04,val+5.04, 0.04,"0008",;;5 type.04,val+6.04, 0.04,"0008",;;6 type.04,val+7.04, 0.04,"0008" ;;7 $else Text _DLGTXO0+_DLGTXTO "" "0000" ;;Version "DiIn" ;;Label d'identification "0006", ;;No texte objet standard to.04, ;;No texte objet te.04, ;;No texte TlTment " " " ", index.04, ;;Nb TlTment-1 type.04,val+0.04, 0.04,"0008",;;0 type.04,val+1.04, 0.04,"0008",;;1 type.04,val+2.04, 0.04,"0008",;;2 type.04,val+3.04, 0.04,"0008",;;3 type.04,val+4.04, 0.04,"0008",;;4 type.04,val+5.04, 0.04,"0008",;;5 type.04,val+6.04, 0.04,"0008",;;6 type.04,val+7.04, 0.04,"0008",;;7 type.04,val+8.04, 0.04,"0008",;;8 type.04,val+9.04, 0.04,"0008",;;9 type.04,val+10.04, 0.04,"0008",;;10 type.04,val+11.04, 0.04,"0008",;;11 type.04,val+12.04, 0.04,"0008",;;12 type.04,val+13.04, 0.04,"0008",;;13 type.04,val+14.04, 0.04,"0008",;;14 type.04,val+15.04, 0.04,"0008",;;15 type.04,val+16.04, 0.04,"0008",;;16 type.04,val+17.04, 0.04,"0008",;;17 type.04,val+18.04, 0.04,"0008",;;18 type.04,val+19.04, 0.04,"0008" ;;19 $endif __dlgnxto $endif ;; Run ;;=============== run: __dlgdsi (in0,val,0) ;;Attention ! __dlgdsi (in1,val,1) ;;Les paramFtres in? ne peuvent Otre utilisTs __dlgdsi (in2,val,2) ;;dans les textes ci-dessus ! __dlgdsi (in3,val,3) ;; 1. FUPLA peut passer un T ou un C ??? __dlgdsi (in4,val,4) ;; A vTrifier / a amTliorer. __dlgdsi (in5,val,5) ;; 2. Le paramFtre peut Otre blank ! __dlgdsi (in6,val,6) ;; Pas de $if dans les textes. __dlgdsi (in7,val,7) ;; A amTliorer dans SASM. __dlgdsi (in8,val,8) ;; __dlgdsi (in9,val,9) ;;-> Les input doivent Otre copiTs dans __dlgdsi (in10,val,10) ;; des registres statiques. __dlgdsi (in11,val,11) __dlgdsi (in12,val,12) __dlgdsi (in13,val,13) __dlgdsi (in14,val,14) __dlgdsi (in15,val,15) __dlgdsi (in16,val,16) __dlgdsi (in17,val,17) __dlgdsi (in18,val,18) __dlgdsi (in19,val,19) endm ;;end of macro __dlgdisi ;;****************************************************************************** ;; DTfinition MACRO MAN Binaire a 8 inputs ;;****************************************************************************** _dl0manb macro vers, in0,in1,in2,in3, ;;inputs in4,in5,in6,in7, out0,out1,out2,out3, ;;outputs out4,out5,out6,out7, Fd, ;;dynamics Fa,Fs,led, ;;statics to,te, ;;No de texte utilisateur setA, ;;boutons index ;;strech index _dl0man2b vers, ;;appel macro _dl0man2b in0,in1,in2,in3, ;;inputs in4,in5,in6,in7,,,,,,,,,,,,, out0,out1,out2,out3, ;;outputs out4,out5,out6,out7,,,,,,,,,,,,, Fd, ;;dynamics Fa,Fs,led, ;;statics to,te, ;;No de texte utilisateur setA, ;;boutons index ;;strech index endm ;;end of macro _dlgmanb ;;****************************************************************************** ;; DTfinition MACRO MAN 2 Binaire a 20 inputs ;;****************************************************************************** _dl0man2b macro vers, in0,in1,in2,in3,in4, ;;inputs in5,in6,in7,in8,in9, in10,in11,in12,in13,in14, in15,in16,in17,in18,in19, out0,out1,out2,out3,out4, ;;outputs out5,out6,out7,out8,out9, out10,out11,out12,out13,out14, out15,out16,out17,out18,out19, Fd, ;;dynamics Fa,Fs,led, ;;statics to,te, ;;No de texte utilisateur setA, ;;boutons index ;;strech index $ifnb ;;not used $endif $ifdef _cvcreport $REPORT DLG-MANB $endif ;; Flag & Register dynamics ;;------------------------- Fd0 LEQU Fd ;; Flag & Register statics ;;------------------------ $if index < 8 ;;pour version a 8 input, plage Fs = [16] f_mod LEQU Fs f_val LEQU Fs+8 $else ;;pour version a 20 input, plage Fs = [40] f_mod LEQU Fs f_val LEQU Fs+20 $endif fauto LEQU Fa _to LEQU to _te LEQU te ;; Dialog ;;=============== $ifdef _DLGTXTO $if index < 4 Text _DLGTXO0+_DLGTXTO "" "0000" ;;Version "MaBi" ;;Label d'identification "0003", ;;No texte objet standard to.04, ;;No texte objet utilisateur te.04, ;;No texte objet utilisateur " " " ", index.04, ;;Nb TlTment-1 "0301",f_val+0.04,f_mod+0.04,"0005" ;;0 "0301",f_val+1.04,f_mod+1.04,"0005" ;;1 "0301",f_val+2.04,f_mod+2.04,"0005" ;;2 "0301",f_val+3.04,f_mod+3.04,"0005" ;;3 $elseif index < 8 Text _DLGTXO0+_DLGTXTO "" "0000" ;;Version "MaBi" ;;Label d'identification "0003", ;;No texte objet standard to.04, ;;No texte objet utilisateur te.04, ;;No texte objet utilisateur " " " ", index.04, ;;Nb TlTment-1 "0301",f_val+0.04,f_mod+0.04,"0005" ;;0 "0301",f_val+1.04,f_mod+1.04,"0005" ;;1 "0301",f_val+2.04,f_mod+2.04,"0005" ;;2 "0301",f_val+3.04,f_mod+3.04,"0005" ;;3 "0301",f_val+4.04,f_mod+4.04,"0005" ;;4 "0301",f_val+5.04,f_mod+5.04,"0005" ;;5 "0301",f_val+6.04,f_mod+6.04,"0005" ;;6 "0301",f_val+7.04,f_mod+7.04,"0005" ;;7 $else Text _DLGTXO0+_DLGTXTO "" "0000" ;;Version "MaBi" ;;Label d'identification "0003", ;;No texte objet standard to.04, ;;No texte objet utilisateur te.04, ;;No texte objet utilisateur " " " ", index.04, ;;Nb TlTment-1 "0301",f_val+0.04,f_mod+0.04,"0005" ;;0 "0301",f_val+1.04,f_mod+1.04,"0005" ;;1 "0301",f_val+2.04,f_mod+2.04,"0005" ;;2 "0301",f_val+3.04,f_mod+3.04,"0005" ;;3 "0301",f_val+4.04,f_mod+4.04,"0005" ;;4 "0301",f_val+5.04,f_mod+5.04,"0005" ;;5 "0301",f_val+6.04,f_mod+6.04,"0005" ;;6 "0301",f_val+7.04,f_mod+7.04,"0005" ;;7 "0301",f_val+8.04,f_mod+8.04,"0005" ;;8 "0301",f_val+9.04,f_mod+9.04,"0005" ;;9 "0301",f_val+10.04,f_mod+10.04,"0005" ;;10 "0301",f_val+11.04,f_mod+11.04,"0005" ;;11 "0301",f_val+12.04,f_mod+12.04,"0005" ;;12 "0301",f_val+13.04,f_mod+13.04,"0005" ;;13 "0301",f_val+14.04,f_mod+14.04,"0005" ;;14 "0301",f_val+15.04,f_mod+15.04,"0005" ;;15 "0301",f_val+16.04,f_mod+16.04,"0005" ;;16 "0301",f_val+17.04,f_mod+17.04,"0005" ;;17 "0301",f_val+18.04,f_mod+18.04,"0005" ;;18 "0301",f_val+19.04,f_mod+19.04,"0005" ;;19 $endif __dlgnxto $endif ;; Init ;;=============== $init acc h res fauto $endinit ;; Reset ;;=============== __heareset h,auto sth fauto jr l run res fauto auto: sei k 0 lr: resx f_mod ;;reset mode interne resx f_val ;;reset valeur man ini k index jr h lr ;; Run ;;=============== run: acc h res fd0 __dlgmanb (in0,out0,f_mod,f_val,0,fd0) __dlgmanb (in1,out1,f_mod,f_val,1,fd0) __dlgmanb (in2,out2,f_mod,f_val,2,fd0) __dlgmanb (in3,out3,f_mod,f_val,3,fd0) __dlgmanb (in4,out4,f_mod,f_val,4,fd0) __dlgmanb (in5,out5,f_mod,f_val,5,fd0) __dlgmanb (in6,out6,f_mod,f_val,6,fd0) __dlgmanb (in7,out7,f_mod,f_val,7,fd0) __dlgmanb (in8,out8,f_mod,f_val,8,fd0) __dlgmanb (in9,out9,f_mod,f_val,9,fd0) __dlgmanb (in10,out10,f_mod,f_val,10,fd0) __dlgmanb (in11,out11,f_mod,f_val,11,fd0) __dlgmanb (in12,out12,f_mod,f_val,12,fd0) __dlgmanb (in13,out13,f_mod,f_val,13,fd0) __dlgmanb (in14,out14,f_mod,f_val,14,fd0) __dlgmanb (in15,out15,f_mod,f_val,15,fd0) __dlgmanb (in16,out16,f_mod,f_val,16,fd0) __dlgmanb (in17,out17,f_mod,f_val,17,fd0) __dlgmanb (in18,out18,f_mod,f_val,18,fd0) __dlgmanb (in19,out19,f_mod,f_val,19,fd0) sth fd0 out led endm ;;end of macro _dlgman2b ;;****************************************************************************** ;; DTfinition MACRO MAN Integer a 8 inputs ;;****************************************************************************** _dl0mani macro vers, in0,in1,in2,in3, ;;inputs in4,in5,in6,in7, out0,out1,out2,out3, ;;outputs out4,out5,out6,out7, Fd, ;;dynamics Fa,Fs,Rs,led, ;;statics to,te, ;;No de texte utilisateur setA, ;;value & boutons index ;;strech index __dlgmani vers, in0,in1,in2,in3, ;;inputs in4,in5,in6,in7,,,,,,,,,,,,, out0,out1,out2,out3, ;;outputs out4,out5,out6,out7,,,,,,,,,,,,, Fd, ;;dynamics Fa,Fs,Rs,led, ;;statics to,te, ;;No de texte utilisateur setA, ;;value & boutons index,0302 ;;strech index,type endm ;;end of macro _dl0mani ;;****************************************************************************** ;; DTfinition MACRO MAN 2 J a 20 inputs ;;****************************************************************************** _dl0man2j macro vers, in0,in1,in2,in3,in4, ;;inputs in5,in6,in7,in8,in9, in10,in11,in12,in13,in14, in15,in16,in17,in18,in19, out0,out1,out2,out3,out4, ;;outputs out5,out6,out7,out8,out9, out10,out11,out12,out13,out14, out15,out16,out17,out18,out19, Fd, ;;dynamics Fa,Fs,Rs,led, ;;statics to,te, ;;No de texte utilisateur setA, ;;value & boutons index ;;strech index __dlgmani vers, in0,in1,in2,in3,in4, ;;inputs in5,in6,in7,in8,in9, in10,in11,in12,in13,in14, in15,in16,in17,in18,in19, out0,out1,out2,out3,out4, ;;outputs out5,out6,out7,out8,out9, out10,out11,out12,out13,out14, out15,out16,out17,out18,out19, Fd, ;;dynamics Fa,Fs,Rs,led, ;;statics to,te, ;;No de texte utilisateur setA, ;;value & boutons index,0303 ;;strech index,type endm ;;end of macro _dl0man2j ;;****************************************************************************** ;; DTfinition MACRO MAN 2 Integer a 20 inputs ;;****************************************************************************** _dl0man2i macro vers, in0,in1,in2,in3,in4, ;;inputs in5,in6,in7,in8,in9, in10,in11,in12,in13,in14, in15,in16,in17,in18,in19, out0,out1,out2,out3,out4, ;;outputs out5,out6,out7,out8,out9, out10,out11,out12,out13,out14, out15,out16,out17,out18,out19, Fd, ;;dynamics Fa,Fs,Rs,led, ;;statics to,te, ;;No de texte utilisateur setA, ;;value & boutons index ;;strech index __dlgmani vers, in0,in1,in2,in3,in4, ;;inputs in5,in6,in7,in8,in9, in10,in11,in12,in13,in14, in15,in16,in17,in18,in19, out0,out1,out2,out3,out4, ;;outputs out5,out6,out7,out8,out9, out10,out11,out12,out13,out14, out15,out16,out17,out18,out19, Fd, ;;dynamics Fa,Fs,Rs,led, ;;statics to,te, ;;No de texte utilisateur setA, ;;value & boutons index,0302 ;;strech index,type endm ;;end of macro _dl0man2i ;;****************************************************************************** ;; DTfinition MACRO interne MAN Integer a 20 inputs ;;****************************************************************************** __dlgmani macro vers, in0,in1,in2,in3,in4, ;;inputs in5,in6,in7,in8,in9, in10,in11,in12,in13,in14, in15,in16,in17,in18,in19, out0,out1,out2,out3,out4, ;;outputs out5,out6,out7,out8,out9, out10,out11,out12,out13,out14, out15,out16,out17,out18,out19, Fd, ;;dynamics Fa,Fs,Rs,led, ;;statics to,te, ;;No de texte utilisateur setA, ;;value & boutons index,type ;;strech index $ifnb ;,not used $endif $ifb ;;not used $endif $ifdef _cvcreport $REPORT DLG-MANI $endif ;; Flag & Register dynamics ;;------------------------- Fd0 LEQU Fd ;; Flag & Register statics ;;------------------------ f_mod LEQU Fs ;;mode {8} pour _dl0mani ! fauto LEQU Fa vama LEQU Rs ;;valeur manuelle {8} pour _dl0mani ! _to LEQU to _te LEQU te ;; Dialog ;;=============== $ifdef _DLGTXTO $if index < 4 Text _DLGTXO0+_DLGTXTO "" "0000" ;;Version "MaIn" ;;Label d'identification "0004", ;;No texte objet standard to.04, ;;No texte objet utilisateur te.04, ;;No texte TlTment utilisateur " " " ", index.04, ;;Nb TlTment-1 type.04,vama+0.04,f_mod+0.04,"0006",;;0 type.04,vama+1.04,f_mod+1.04,"0006",;;1 type.04,vama+2.04,f_mod+2.04,"0006",;;2 type.04,vama+3.04,f_mod+3.04,"0006" ;;3 $elseif index < 8 Text _DLGTXO0+_DLGTXTO "" "0000" ;;Version "MaIn" ;;Label d'identification "0004", ;;No texte objet standard to.04, ;;No texte objet utilisateur te.04, ;;No texte TlTment utilisateur " " " ", index.04, ;;Nb TlTment-1 type.04,vama+0.04,f_mod+0.04,"0006",;;0 type.04,vama+1.04,f_mod+1.04,"0006",;;1 type.04,vama+2.04,f_mod+2.04,"0006",;;2 type.04,vama+3.04,f_mod+3.04,"0006",;;3 type.04,vama+4.04,f_mod+4.04,"0006",;;4 type.04,vama+5.04,f_mod+5.04,"0006",;;5 type.04,vama+6.04,f_mod+6.04,"0006",;;6 type.04,vama+7.04,f_mod+7.04,"0006" ;;7 $else Text _DLGTXO0+_DLGTXTO "" "0000" ;;Version "MaIn" ;;Label d'identification "0004", ;;No texte objet standard to.04, ;;No texte objet utilisateur te.04, ;;No texte TlTment utilisateur " " " ", index.04, ;;Nb TlTment-1 type.04,vama+0.04,f_mod+0.04,"0006",;;0 type.04,vama+1.04,f_mod+1.04,"0006",;;1 type.04,vama+2.04,f_mod+2.04,"0006",;;2 type.04,vama+3.04,f_mod+3.04,"0006",;;3 type.04,vama+4.04,f_mod+4.04,"0006",;;4 type.04,vama+5.04,f_mod+5.04,"0006",;;5 type.04,vama+6.04,f_mod+6.04,"0006",;;6 type.04,vama+7.04,f_mod+7.04,"0006",;;7 type.04,vama+8.04,f_mod+8.04,"0006",;;8 type.04,vama+9.04,f_mod+9.04,"0006",;;9 type.04,vama+10.04,f_mod+10.04,"0006",;;10 type.04,vama+11.04,f_mod+11.04,"0006",;;11 type.04,vama+12.04,f_mod+12.04,"0006",;;12 type.04,vama+13.04,f_mod+13.04,"0006",;;13 type.04,vama+14.04,f_mod+14.04,"0006",;;14 type.04,vama+15.04,f_mod+15.04,"0006",;;15 type.04,vama+16.04,f_mod+16.04,"0006",;;16 type.04,vama+17.04,f_mod+17.04,"0006",;;17 type.04,vama+18.04,f_mod+18.04,"0006",;;18 type.04,vama+19.04,f_mod+19.04,"0006" ;;19 $endif __dlgnxto $endif ;; Init ;;=============== $init acc h res fauto $endinit ;; Reset ;;=============== __heareset h,auto sth fauto jr l run res fauto auto: sei k 0 lr: resx f_mod ;;reset mode interne ini k index jr h lr ;; Run ;;=============== run: acc h res fd0 __dlgmni (in0,out0,f_mod,vama,0,fd0) __dlgmni (in1,out1,f_mod,vama,1,fd0) __dlgmni (in2,out2,f_mod,vama,2,fd0) __dlgmni (in3,out3,f_mod,vama,3,fd0) __dlgmni (in4,out4,f_mod,vama,4,fd0) __dlgmni (in5,out5,f_mod,vama,5,fd0) __dlgmni (in6,out6,f_mod,vama,6,fd0) __dlgmni (in7,out7,f_mod,vama,7,fd0) __dlgmni (in8,out8,f_mod,vama,8,fd0) __dlgmni (in9,out9,f_mod,vama,9,fd0) __dlgmni (in10,out10,f_mod,vama,10,fd0) __dlgmni (in11,out11,f_mod,vama,11,fd0) __dlgmni (in12,out12,f_mod,vama,12,fd0) __dlgmni (in13,out13,f_mod,vama,13,fd0) __dlgmni (in14,out14,f_mod,vama,14,fd0) __dlgmni (in15,out15,f_mod,vama,15,fd0) __dlgmni (in16,out16,f_mod,vama,16,fd0) __dlgmni (in17,out17,f_mod,vama,17,fd0) __dlgmni (in18,out18,f_mod,vama,18,fd0) __dlgmni (in19,out19,f_mod,vama,19,fd0) sth fd0 out led endm ;;end of macro __dlgmani ;;********************************************************************** ;; Macros internes pour Fbox Universels dialogue ;;********************************************************************** __dlgedb macro val,plus,ot ;;edit binary $ifnb sth val+plus out ot $endif endm ;;********************************************************************** __dlgedi macro val,plus,ot ;;edit integer $ifnb copy val+plus ot $endif endm ;;********************************************************************** __dlgdsb macro in,val,plus ;;edit display binaire $ifnb sth in out val+plus $endif endm ;;********************************************************************** __dlgdsi macro in,val,plus ;;disp integer $ifnb copy in val+plus $endif endm ;;********************************************************************** __dlgmanb macro in,ot,mod,val,plus,fd ;;manual binary $ifnb sth mod+plus set fd jr h L_m sth in out val+plus L_m: sth val+plus out ot $endif endm ;;********************************************************************** __dlgmni macro in,ot,mod,val,plus,fd ;;manual integer $ifnb sth mod+plus set fd jr h L_m copy in val+plus L_m: copy val+plus ot $endif endm ;;********************************************************************** __dlgdup macro up,dn,f_up,of $ifnb sth f_up+of out up sth f_up+1+of out dn $endif endm ;;********************************************************************** $list $nolist $skip ****************************************************************************** Macros internes, gTnTrales a la librairie Heavac dialogue ****************************************************************************** __dlgpntl ;;compute pointer position at terminal line __dlgpnt __dlgprepa __dlgprepe __dlgcopyx __dlgtfr4 ;;transfer 1 to 4 bytes into a text __dlgtfrx __dlgtfro __dlgtfr ;;transfer from one texte into another text using JPI __dlgtfri ;;transfer from one texte into another text using TFRI __dlgtfrm ;;tranfer message into send text __dlgupdn __dlgupdn2 __dlgjjmm __dlgmmjj __dlgcorxy __dlginp __dlginp __dlgdig __dlgnum __dlgasc __dlgcupdn ;;cursoe up and down __dlgcbuf __dlgfkey __dlgcfast __dlgcar __dlgloop __dlgmima __dlgtest __dlgadd Send address terminal __dlgcode Evaluate Dialogue CODE __dlgreset Automatic Reset at startup $endskip ;;*********************************************************** ;;Load timer with adjustable timebase _dlgldt macro timer,value $ifdef __TIME_BASE__ loadvalue lequ value*100/__TIME_BASE__ $else loadvalue lequ value $endif $if value=0 ldl timer 0 $elseif loadvalue = 0 ldl timer 1 ;;$Warning Timer value < 1, replaced by 1 $elseif loadvalue > 0ffffh ld timer loadvalue $else ldl timer loadvalue $endif endm ;;*********************************************************** ;; Convert 100ms values and copy to register ;; Take a value in 100s of ms and convert it before it is copied. ;; The convertion takes care of the DEFTB choosen. _dlgcopyt macro value, timer $ifdef __TIME_BASE__ $if __TIME_BASE__ = 100 copy value timer $elseif __TIME_BASE__ < 100 factor lequ 100/__TIME_BASE__ mul value factor _DIALOG._RD0 copy _DIALOG._RD0 timer $else ;; when DEFTB > 100 ms factor lequ __TIME_BASE__/100 div value factor _DIALOG._RD0 _DIALOG._RD1 copy _DIALOG._RD0 timer $endif $else copy value timer $endif endm ;;************************************************************************ ;; Macro Reset ;;============ __dlgreset macro i_reset, ;;input reset yreset, ;;a High sur le premier cycle areset, ;;auto-reset option r0 ;;reg dynamic $group _DIALOG ;; DTclarations ;;------------- _RESET EQU F ;;reset for dialog PUBL _RESET ;;public for other files ;; Init ;;---------- $init ;;Init Rest acc h ;;--------- res yreset ;;init pour premier cycle $ifnb sth i_reset out _RESET ;;pour les blocs avant SASI-Dialog $endif ;;Autoreset ;;--------- $if areset=1 ;;Si auto-reset actif ardb LEQU DB ;;DB pour auto-reset DB ardb [1] -1 ;;InitialisT a -1 au download tfr ardb ;;Lecture du DB pour contr(ler son contenu k 0 r0 inc r0 ;;inc de -1 a 0 acc z ;;si=0, c'est un dTmarrage aprFs download set _RESET ;;dTclenche l'auto-reset tfr r0 ;;Tcrase le DB pour quittancer l'auto-reset ardb k 0 $endif ;;areset=0 $endinit ;; Run ;;--------- sth yreset ;;le cycle reset a TtT effectuT ;;(lancT ci-dessous) res _RESET ;;annule le reset $ifnb sth i_reset ;;Reset par Input reset anl yreset ;;ET pas fait le premier cycle ;;yreset est RESetT dans $init ;;et SETT ci-dessous dFs le premier cycle set _RESET ;;pour le premier cycle ;;This will not work if i_reset is not a PCD input. ;;A flag will not be refreshed inside $init. $endif acc h set yreset ;;quittance cycle reset lancT $endgroup ;;_DIALOG endm ;;end of macro __dlgreset ;;****************************************************************************** ;;Evaluate Dialogue CODE __dlgcode macro input,co1,co2,co3,co4, niv1,niv2,niv3,niv4,n3op use_fb lequ 1 $if use_fb=1 EXTN _DIALOG._FB._DLGCODE $if n3op>0 CFB _DIALOG._FB._DLGCODE input co1 co2 co3 co4 niv1 niv2 niv3 niv4 $else CFB _DIALOG._FB._DLGCODE input co1 co2 co1 co2 niv1 niv2 niv1 niv2 $endif ;;n3op $else ;;use_fb ;; Niveau 1 cmp input ;;input=password niveau 1 ? co1 acc z set niv1 ;;set acces niveau 1 jr z l_pr4 ;; Niveau 2 cmp input ;;input=password niveau 2 ? co2 acc z set niv2 ;;set acces niveau 2 jr z l_pr4 $if n3op > 0 ;; Niveau 3 cmp input ;;input=password niveau 3 ? co3 acc z set niv3 ;;set acces niveau 3 jr z l_pr4 ;; Niveau 4 cmp input ;;input=password niveau 4 ? co4 acc z set niv4 ;;set acces niveau 4 $endif l_pr4: $endif ;;use_fb endm ;;-------------- __dlgadd macro op,base,addr,can,rd0,rd1 ;;op option 1=numeric, 2=ASCII addressing ;;base base address and broadcast address ;;addr address in ASCII form ;; if blank, active all (broadcast) ;;can channel $ifnb ;;address single terminal ;;----------------------- $if op=1 ;;numeric form, one char with offset __dlgnum addr,rd0,2,rd1 add rd0 k base ;;base as offset rd0 stxd can rd0 $elseif op=2 ;;ASCII form mov addr b 1 rd0 b 0 stxd can rd0 ;;send higher byte stxd can addr ;;send lower byte $else $Error Internal option error __dlgadd op=@op@ $endif ;;op=1,2 $else ;;address broadcast ;;----------------- $if op=1 ;;numeric form ldl rd0 base ;;base as broadcast address stxd can rd0 $elseif op=2 ;;ASCII form ldl rd0 ;;load higher byte base >> 8 stxd can rd0 ;;send higher byte ldl rd0 ;;load lower byte base & 0ffh stxd can rd0 ;;send higher byte $endif ;;op=1,2 $endif ;;blank addr endm ;;--------------- __dlgpntl macro l0obj,lter,list,pnt,r0 ;;compute pointer position at terminal line ;;l0obj:line 0 at terminal top ;;lter: pointer terminal line ;;list: flag indicating data list object ;;pntr: pointer reg in line (1 reg=4 byte) ;;pnt: output pointer ;;header = 8 reg ;;line = 4 reg ldl pnt 8 ;;init to 1st element line $ifnb sth list jr h end ;;points to first element for data list $endif add l0obj lter r0 acc l shil r0 ;;multiply by 4 2 add pnt r0 ;;add offset pnt end: endm ;;--------------- __dlgpnt macro pntl,pntr,pnt ;;compute pointer position in object ;;pntl: pointer line (4 reg) ;;pntr: pointer reg in line (1 reg=4 byte) ;;pnt: output pointer ;;header = 8 reg usefb lequ 1 $ifne <0> $if usefb EXTN _DIALOG._FB._DLGPNT cfb _DIALOG._FB._DLGPNT pntl k pntr pnt k 8 ;;header k 4 ;;reg per line $else mul pntl k 4 ;;4 reg par line pnt add pnt k 8 ;;8reg header pnt ;;poiteur lecture add pnt pntr pnt $endif ;;usefb $else ;;pntr=0 - pas la peine d'utiliser un CFB mul pntl k 4 ;;4 reg par line pnt add pnt k 8 ;;8reg header pnt ;;poiteur lecture $endif ;;pntr=0 endm ;;--------------- __dlgpntbe macro pntl,pntr,pnt ;;compute pointer position in buffer element for S-Bus ;;pntl: pointer line (6 reg) ;;pntr: pointer reg in line (1 reg=4 byte) ;;pnt: output pointer ;;header = 2 reg usefb lequ 1 $if usefb EXTN _DIALOG._FB._DLGPNT cfb _DIALOG._FB._DLGPNT pntl k pntr pnt k 2 ;;header k 6 ;;reg per line $else mul pntl k 6 ;;4 reg par line pnt add pnt k 2 ;;8reg header pnt ;;poiteur lecture $ifne <0> add pnt pntr pnt $endif $endif endm ;;--------------- ;; converti 1 a 4 caractFres ascii en valeur numTrique __dlgnum macro asc,num,nb,rd ;;conv ascii->num ;; asc=source en ASCII ;; num=destination en integer ;; nb =nombre de digit a convertir ;; rd =reg dynamic usefb lequ 1 $ife ;;asc # num $Error __dlgnum source=dest $endif $if usefb & (nb>2) ;;seulement si plus de 2 digits a convertir EXTN _DIALOG._FB._DLGNUM cfb _DIALOG._FB._DLGNUM asc num rd $else ;;not usefb ldl rd 0 ldl num 0 $if nb>3 ;;4Fme digit mov asc n 6 num n 0 mul num k 10 num $endif $if nb>2 ;;3Fme digit mov asc n 4 rd n 0 add num rd num mul num k 10 num $endif $if nb>1 ;;2Fme digit mov asc n 2 rd n 0 add num rd num mul num k 10 num $endif ;;1er digit mov asc n 0 rd n 0 add num rd num $endif ;;usefb endm ;;--------------------- __dlgprepa macro dlgbe,l0ala,lter,obuf, xobj, alal,alak,alct, rdlec,rdecr,rd ;; -prTpare l'alarme lter dans le text xobj et/ou obuf ;; -initialise l'adresse wrupd ;; dlgbe base buffer slave = _DLG_BE ;; l0ala no de la ligne alarme a la pos 0 de l'Tcran ;; lter no de ligne a prTparer (lter ou curo) ;; obuf buffer 96 reg objet pour transfert dans xobj ;; xobj texte objet pour output ;; alal flag alarm state ;; alak flag stat ack ;; alct reg counter/time ;; r0,r1 R dynamics mul lter ;;PrTparation du pointeur lecture k 6 ;; nb de reg par TlTment_alarme rdlec ;; add rdlec ;; k 2 ;; offset header buffer element rdlec ;; pointe sur type add l0ala ;;PrTparation du pointeur Tcriture lter ;; rdecr ;; mul rdecr ;; k 4 ;; nb de reg par TlTment rdecr ;; add rdecr ;; k 8 ;; offset header object rdecr ;; point sur type ;;Copie type sei rdlec ;; getx dlgbe ;; rd ;; $ifnb ;; sei rdecr ;; pointeur Tcriture putx rd ;; obuf ;; mise a jour obuf $endif ;; $ifnb ;; tfr rd ;; Tcriture no texte alarme X xobj ;; rdecr ;; pointeur Tcriture $endif ;;Copie Adresse Counter inc rdlec ;; inc rdecr ;; sei rdlec ;; getx dlgbe ;; rd ;; $ifnb ;; sei rdecr ;; pointeur Tcriture putx rd ;; obuf ;; mise a jour obuf $endif ;; $ifnb ;; tfr rd ;; Tcriture no texte alarme X xobj ;; rdecr ;; pointeur Tcriture $endif ;;Copie Adresse flag quittance inc rdlec ;; inc rdecr ;; sei rdlec ;; getx dlgbe ;; rd ;; $ifnb ;; sei rdecr ;; pointeur Tcriture putx rd ;; obuf ;; mise a jour obuf $endif ;; $ifnb ;; tfr rd ;; Tcriture no texte alarme X xobj ;; rdecr ;; pointeur Tcriture $endif ;;Copie No texte alarme inc rdlec ;; inc rdecr ;; sei rdlec ;; getx dlgbe ;; lecture no texte alarme rd ;; $ifnb ;; sei rdecr ;; pointeur Tcriture putx rd ;; Tcriture no texte alarme obuf ;; mise a jour obuf $endif ;; $ifnb ;; tfr rd ;; Tcriture no texte alarme X xobj ;; rdecr ;; pointeur Tcriture $endif ;;Get counter/time value inc rdlec ;; $ifnb sei rdlec ;; pointe sur 1er paramFtre de alarme getx dlgbe ;; lecture no texte alarme alct ;; $endif ;;Get alarm & ack state inc rdlec ;; $ifnb sei rdlec ;; pointe sur valeur counter/time getx dlgbe ;; rd ;; $endif ;; shir rd ;; alarm state in ACC 1 ;; $ifnb ;; out alal ;; out alarm $endif ;; shir rd ;; ack state in ACC 1 ;; $ifnb ;; out alak ;; out ack $endif endm ;;-------------- ;;Prepare value for line > 0 of Data List __dlgprepl macro dlgbe,lter, ;;prepare Data List, read only the value rdisp,rd mul lter k 6 ;;6 reg per element rd ;; inc rd ;;skip 2 first reg of dlgbe inc rd ;; sei rd ;;points to begin of element getx dlgbe+4 ;;place of the value rdisp endm ;;-------------- ;;PrTpare l'TlTment lter dans les registre, obuf puis copie dans le text xobj ;;Initialise les adresses wr??? et les valeurs ??disp de l'TlTment ;; ;;dlgbe base buffer slave = _DLG_BE ;;l0obj no de la ligne objet a la pos 0 de l'Tcran ;;lter no de ligne a l'Tcran (0..3) a prTparer ;;list flag indicating data list ;;obuf buffer 96 reg objet pour transfert dans xobj ;;rdisp,fdisp,udisp registre/flag pour affichage des valeurs ;;wrreg,wrflg,wrfup registres pour commandes ;;xadres,xobj texte adresses ASCII et objet ;;rd utilise rd..rd+9 __dlgprepe macro dlgbe,l0obj,lter,list,obuf, rdisp,fdisp,udisp, wrreg,wrflg,wrfup, xadres,xobj, rd ;;copie l'TlTment de la ligne du terminal ;;dans 6 registres rd+3..rd+8 ;;lter = offset lecture __dlgcopyx dlgbe,2,lter,6,rd+3,rd,rd+1,rd+2 __dlgpntl l0obj,lter, ;;set pointer rd to correct line list,rd,rd+1 ;; sei rd ;;pointe sur 1er paramFtre de TlTment putx rd+3 ;;Type obuf ;; Put type ini k 1000 ;;Variable: __dlgnum rd+3,rd,2,rd+1 ;; conv ascii->num cmp rd ;; si format=1 (binaire) k 1 ;; jr z l_of ;;->traitement bin cmp rd ;; si format=20 (duplex) k 20 ;; jr z l_of ;;->traitement bin ;; Variable=registre: $ifnb __dlgnum rd+4,wrreg,4,rd ;; conv ascii->num ;; sauver adresse source ;; pour ordre Tcriture registre $endif $ifnb tfr X xadres ;; rdisp=offset K 2 k 2 ;; rd+4 ;; putx rd+4 ;; PUT adresse reg display obuf ;; copy rd+7 ;; PUT valeur rdisp ;; $endif ini k 1000 ;; jr l_ou ;;->suite avec flag update ;; Variable=flag: l_of: $ifnb __dlgnum rd+4,wrflg,4,rd ;; conv ascii->num ;; sauver adresse source ;; pour ordre Tcriture flag $endif ;; $ifnb tfr X xadres ;; fdisp=offset K 3 k 3 ;; rd+4 ;; putx rd+4 ;; PUT adresse flag display obuf ;; bito 2 ;; bito 2: 24.01.97 for duplex rd+7 ;; fdisp ;; PUT valeur $endif ;; ini k 1000 ;; l_ou: ;;Flag Update: $ifnb __dlgnum rd+5,wrfup,4,rd ;; conv ascii->num ;; sauver adresse source ;; pour ordre flag update $endif $ifnb tfr X xadres ;; udisp=offset K 4 k 4 ;; rd+5 ;; putx rd+5 ;; PUT adresse obuf ;; bito 1 ;; rd+8 ;; udisp ;; PUT valeur flag update $endif ini k 1000 ;; putx rd+6 ;;No texte Std obuf $ifnb put obuf ;;Text objet: X xobj ;; tfr dans X obj pour la sortie sur terminal $endif endm ;;-------------- __dlgcopyx macro src,off,bloc,lng,dst, r0,r1,r2 ;;copie un bloc de registre d'un buffer de registre src ;;dans un autre buffer dst. ;;la source est calculTe off+(bloc*lng) ;; src = base reg. source ;; off = offset_constante ;; bloc = no du bloc_reg ;; lng = longueur d'un bloc_constante ;; dst = base reg. destination $ife ldl r0 off+lng-1 $else mul bloc k lng ;; ? reg par bloc r0 add r0 k off+lng-1 r0 ;; offset+dTbuter au dernier reg $endif ldl r1 lng-1 ;; compteur de boucle lng-1..0 l_: sei r0 getx src ;; get source r2 sei r1 putx r2 ;; put destination dst dec r0 dec r1 jr p l_ endm ;;-------------- ;;transfer 1 to 4 characters into a texte __dlgtfr4 macro xsrc,nb,car,ofx,of4,r0,r1 ;;xsrc source texte ;;nb nomber of characters 1..4 ;;car cnst or register containing 1..4 ASCII characters 'a'..'aaaa' ;;ofx offset in the text [4byte] ;;of4 offset in characters into the 4bytes block 0..3 ;;r0,r1 2 dynamics registers tfr X xsrc ;;read 4 source caracters k ofx ;;offset text r0 $iftype car=R copy car r1 $else ld r1 car $endif rotl r1 (4-nb)*8 mov r1 b 3 r0 b 3-of4 $if nb>1 mov r1 b 2 r0 b 2-of4 $endif $if nb>2 mov r1 b 1 r0 b 1-of4 $endif $if nb>3 mov r1 b 0 r0 b 0-of4 $endif tfr r0 X xsrc ;;reload into the test k ofx ;;at the same position endm ;;-------------- ;;transfert d'un texte a un autre avec position source calculTe ;;source calculTe=c1 + x_x * l_l + c2 ;;c1,c2 et l_l: constante ;;x_x: variable __dlgtfrx macro xsrc,ox,c1,x_x,l_l,c2,xdst, td,odst,tn,nb, r0,r1,r2,r3,r4,r5,r6 ;;xsrc = text source [cnst] ;;ox = offset text source [R] 0..9 (optional) ;;xdst = text destination =registre destination ;;td = type odest =N=none ;;odest= offset destination =blank ;;td,tn= K ou R = type nb =blank ;;nb [4 bytes]=nombre-1 =blank,fixe a 1 ;; mul x_x k l_l r0 add r0 k c1+c2 r0 ;;__dlgtfr xsrc,ox,R,r0,xdst, ;; td,odst,tn,nb, ;; r1,r2,r3,r4,r5 __dlgtfri xsrc,ox,R,r0,xdst, td,odst,tn,nb, r1,r2,r3,r4,r5,r6 endm ;--------------- ;;Transfer of a message in a send text __dlgtfrm macro rsrc,xdst,of,rp,nb, r3,r1,r2,r0 ;;rsrc = reg containing text number ;;xdst = text destination [X] ;;of [4 bytes] = offset on destination [cnst] ;;rp read position (if blank=0) ;;nb [4 bytes-1] =nombre [cnst] ;;r3 last read value OR read value without xdst ;; $ifnb copy rp r0 $else ldl r0 0 ;;read pointer=0 $endif ldl r2 ;;temp register indirect r3 ;;temp register sei k 0 $ifnb ldl r1 of ;;write pointer $endif loop: tfri X rsrc ;;source text R r0 R r2 ;;read 4 bytes into r3 jr e end ;;->exit with error $ifnb tfr r3 ;;write 4 bytes xdst r1 inc r1 ;;inc write pointer $endif $if nb>1 inc r0 ;;inc read pointer ini k nb jr h loop $endif end: endm ;--------------- ;; instruction tfr avec offset sur X __dlgtfro macro xsrc,ox,src,reg,l_l tfr X xsrc+ox src reg jr l_l endm ;;--------------- ;;Transfert d'un texte a un autre avec JPI ;;voir description __dlgtfrx __dlgtfr macro xsrc,ox,ts,osrc,xdst, td,odst,tn,nb, r0,r1,r2,r3,r4 $ife ldl r1 osrc src lequ r1 $else src lequ osrc $endif $ife ldl r2 odst dst lequ r2 $endif $ife dst lequ odst $endif $ife ldl r3 nb nn lequ r3 $endif $ife nn lequ nb $endif $ifnb mul ox ;;calcul du label de saut k 4 ;;saut de 4 ligne par no de textes r4 ld r0 l_l ;;ligne JPI add r4 r0 r4 inc r4 ;;1er TFR = ligne JPI+1 l_l: jpi r4 ;;TRF lire source __dlgtfro xsrc,0,src,r0,l_le ;;sauts de 4 lignes __dlgtfro xsrc,1,src,r0,l_le ;;sauts de 4 lignes __dlgtfro xsrc,2,src,r0,l_le ;;sauts de 4 lignes __dlgtfro xsrc,3,src,r0,l_le ;;sauts de 4 lignes __dlgtfro xsrc,4,src,r0,l_le ;;sauts de 4 lignes __dlgtfro xsrc,5,src,r0,l_le ;;sauts de 4 lignes __dlgtfro xsrc,6,src,r0,l_le ;;sauts de 4 lignes __dlgtfro xsrc,7,src,r0,l_le ;;sauts de 4 lignes __dlgtfro xsrc,8,src,r0,l_le ;;sauts de 4 lignes __dlgtfro xsrc,9,src,r0,l_le ;;sauts de 4 lignes $else l_l: tfr X xsrc src r0 $endif $ife ;;td=None->desination=registre l_le: copy r0 ;;Tcrire destination xdst $else ;;destination=texte l_le: tfr r0 ;;Tcrire destination X xdst dst inc src inc dst dec nn jr p l_l $endif endm ;;--------------- ;;Transfer from one texte into another text using TFRI ;;See description of __dlgtfrx __dlgtfri macro xsrc,ox,ts,osrc,xdst, td,odst,tn,nb, r0,r1,r2,r3,r4,r5 $ife ldl r1 osrc src lequ r1 $else src lequ osrc $endif $ife ldl r2 odst dst lequ r2 $endif $ife dst lequ odst $endif $ife ldl r3 nb nn lequ r3 $endif $ife nn lequ nb $endif $ifnb ldl r4 xsrc add r4 ox ;;offset src r4 ;;text indirect ldl r5 ;;point to r0 r0 l_l: tfri X r4 ;;(i) R src R r5 ;;(i) points to r0 $else l_l: tfr X xsrc src r0 $endif $ife ;;td=None->desination=registre l_le: copy r0 ;;Tcrire destination xdst $else ;;destination=texte l_le: tfr r0 ;;Tcrire destination X xdst dst inc src inc dst dec nn jr p l_l ;;->loop $endif endm ;;--------------- ;;Up-Down dates, heures et jour __dlgupdn macro op,reg,up,dn,fa,r0,r1 ;;op = option: D=date 00-31.00-12 E=date 01-31.01-12 ;; H=heure 00-23.00-59 ;; J=jour de semaine (0..9) K=jour de semaine (1..7) ;; A=annTe 1996-9999 (dFs 24.02.97) ;;reg = registre a inc ou dec ;;up = flag Up ;;dn = flag Down ;;fa = fast up-down *10 ;;r0,r1 = registres temporaires $ife type lequ 'D' ;;type interne max0 lequ 31 ;;max pour jj jours max1 lequ 12 ;;max pour mm mois min0 lequ 0 ;;min pour jj jours min1 lequ 0 ;;min pour mm mois div reg k 100 r0 ;;jj r1 ;;mm $endif $ife type lequ 'D' ;;type interne max0 lequ 31 ;;max pour jj jours max1 lequ 12 ;;max pour mm mois min0 lequ 1 ;;min pour jj jours min1 lequ 1 ;;min pour mm mois div reg k 100 r0 ;;jj r1 ;;mm $endif $ife type lequ 'H' ;;type interne max1 lequ 23 ;;max pour hh heures max0 lequ 59 ;;max pour mm minutes min1 lequ 0 ;;min pour hh heures min0 lequ 0 ;;min pour mm minutes div reg k 100 r1 ;;hh r0 ;;mm $endif $ife type lequ 'J' ;;type interne max0 lequ 9 ;;max pour jour de semaine min0 lequ 0 ;;min pour jour de semaine $endif $ife type lequ 'J' ;;type interne max0 lequ 7 ;;max pour jour de semaine min0 lequ 1 ;;min pour jour de semaine $endif $ife type lequ 'A' ;;type interne A max0 lequ 9999 ;;max pour annTe (dFs 24.02.96) min0 lequ 1996 ;;min pour annTe $endif $if (type='D')|(type='H') sth up jr l l_dn __dlgupdn2 I,r0,fa ;;increment 1 or 10 (fast) cmp r0 k max0+1 jr n l_e ;;rd0<32 -> jj=OK ldl r0 min0 ;;jj = min, inc mm inc r1 cmp k max1 r1 jr p l_e ;;->res up-down ldl r1 min1 ;;mm = min jr l_e ;;->res up-down l_dn: sth dn ;;Down jr l l_e __dlgupdn2 D,r0,fa ;;decrement 1 or 10 (fast) cmp r0 k min0 jr p l_e ;;r0 >= min ->OK ldl r0 max0 ;;jj = max dec r1 ;;dec mm cmp r1 k min1 jr p l_e ;;mm >= min ->OK ldl r1 max1 l_e: $if type='D' mul r0 k 100 r0 $else mul r1 k 100 r1 $endif add r0 r1 reg $elseif type='J' ;;option jour de semaine sth up jr l l_dn inc reg cmp k max0 reg jr p l_e ;;reg<=max ->OK ldl reg min0 jr l_e l_dn: sth dn jr l l_e dec reg cmp reg k min0 jr p l_e ;;reg >=min ->OK ldl reg max0 l_e: $elseif type='A' sth up jr l l_dn __dlgupdn2 I,reg,fa ;;increment 1 or 10 (fast) cmp reg k max0+1 jr n l_e ;;regres up-down l_dn: sth dn ;;Down jr l l_e __dlgupdn2 D,reg,fa ;;decrement 1 or 10 (fast) cmp reg k min0 jr p l_e ;;reg >= min ->OK ldl reg max0 ;;aaaa = max l_e: $else $Error Dlg Up-Down internal option error ! $endif endm ;;--------------- ;;Increment/Decrement 1 or 10 (fast) __dlgupdn2 macro id,rr,fa $ife ;;increment $ifnb sth fa jr h l_f inc rr jr l_e l_f: add rr k 10 rr l_e: $else inc rr $endif $else ;;decrement $ifnb sth fa jr h l_f dec rr jr l_e l_f: sub rr k 10 rr l_e: $else dec rr $endif $endif endm ;;--------------- ;; Convertis jjmm en mmjj et l'inverse __dlgjjmm macro src,dst,r1,r2 div src k 100 r1 ;;00mm r2 ;;00jj mul r2 k 100 r2 ;;jj00 add r1 ;;00mm r2 ;;jj00 dst ;;jjmm endm ;;--------------- ;; Convertis jjmm en mmjj avec limites: - jours 29,30 ou 31 ;; - mois <= 12 __dlgmmjj macro src,dst,jj,mm,fd div src ;;jjmm k 100 jj ;;00jj mm ;;00mm jr z l_0 ;;->jj=zero cmp k 12 ;;test mois <=12 mm jr p mmok ldl mm 12 mmok: cmp k 28 jj jr p jmok ;;jour <=28, pas de problFme cmp k 31 ;;test si jour <=31 jj jr p jjok ldl jj 31 jjok: bito 1 ;;test mois a 31 jours mm fd ;;mois 01,03,05,07 = High cmp mm k 8 acc p com fd ;;mois 08,10,12 = High sth fd jr h jmok ;;->mois a 31 jours, OK ldl jj 30 ;;limiter a 30 cmp mm ;;test du mois 2 (a 29 jours) k 2 acc z jr l jmok ;;->pas mois 02 ldl jj 29 jmok: mul mm k 100 mm ;;mm00 jr z l_0 ;;->mm=00 add jj ;;00jj mm ;;mm00 dst ;;mmjj jr eom l_0: ldl dst 0 eom: endm ;;--------------- ;;Initialisation d'un ou 2 registres avec coordonnTs X,Y ;;pour positionnement du curseur. Utilisation avec $Annnn __dlgcorxy macro op,k_v,o_v,k_h,o_h,pr,xy ;;op option 1 ver&hor ;; 2 hor&ver ;; 3 ver&hor, 2 lignes ;; 4 hor&ver, 2 ligne ;; 8 column,row. 2 ASCII car. use reg pr and xy ;; 10 idem 8, option 2 lignes ;; 11 V&';'&H&'f' ;; ;;k_v cnst vert type K ;;o_v offset vert type R ;;k_h cnst hor type K ;;o_h offset hor type R ;;pr prefix } combined used with option 5 ;;xy variable xy } $if op=1 ;;option vert&hor ldl xy k_v ;;constante vertical $ifnb add xy o_v ;;offset vertical xy $endif acc l shil xy 8 add xy k k_h ;;constante horizontal xy $ifnb add xy o_h ;;offset horizontal xy $endif $elseif op=2 ;;option hor&vert ldl xy k_h ;;constante horizontal $ifnb add xy o_h ;;offset horizontal xy $endif acc l shil xy 8 add xy k k_v ;;constante vertical xy $ifnb add xy o_v ;;offset vertical xy $endif $elseif op=3 ;;option vert&hor, double line verticale ldl xy k_v ;;constante vertical $ifnb add xy o_v ;;offset vertical xy add xy o_v ;;2nd offset vertical xy $endif acc l shil xy 8 add xy k k_h ;;constante horizontal xy $ifnb add xy o_h ;;offset horizontal xy $endif $elseif op=4 ;;option hor&vert, double line verticale ldl xy k_h ;;constante horizontal $ifnb add xy o_h ;;offset horizontal xy $endif acc l shil xy 8 add xy k k_v ;;constante vertical xy $ifnb add xy o_v ;;offset vertical xy add xy o_v ;;2nd offset vertical xy $endif $elseif op=8 ;;option column & row, 2 ASCII, use 2 reg $ifnb ;;prefix in pr, byte 2, collumn always '00' $endif ;;suffix=4h in xy, byte 0 ldl xy k_v ;;constante vertical $ifnb add xy o_v ;;offset vertical xy $endif acc l shil xy 8 add xy k 4 ;;suffix=4h xy $elseif op=10 ;;idem option 8 but 2 lines $ifnb ;;prefix in pr, byte 2, collumn always '00' $endif ;;suffix=4h in xy, byte 0 ldl xy k_v ;;constante vertical $ifnb add xy o_v ;;offset vertical xy add xy o_v ;;2nd offset vertical xy $endif acc l shil xy 8 add xy k 4 ;;suffix=4h xy $elseif op=11 ;;option V&';'&H&'f' ldl xy 'f' ;;insFre le f acc l shil xy 8 add xy k k_v ;;constante xy $ifnb add xy o_v ;;offset xy $endif acc l shil xy 8 add xy k ';' ;;insFre le ; xy acc l shil xy 8 add xy k k_h ;;constante xy $ifnb add xy o_h ;;offset xy $endif $else $Error Internal option error __dlgcorxy op=@op@ $endif ;;op endm ;;--------------- ;; introduit la valeur d'un caractFre ascii ;; comme nouveau digit infTrieur ;;en tenant compe des valeurs nTgatives __dlginp macro src,inp,rd,fe __dlgdig src,rd,fe sth fe jr h l_end mul inp k 10 inp jr n l_sub add inp rd inp jr l_end l_sub: sub inp rd inp l_end: endm ;;--------------- ;; test et converti un caractFre ascii en valeur numTrique __dlgdig macro src,dst,fe sub src k '0' ;;'0' -> 0 dst acc n out fe ;;caractFre < '0' jr n l_l cmp k 9 dst acc n out fe ;;caractFre > '9' l_l: endm ;; converti valeur numTrique en 1 a 4 caractFres ascii __dlgasc macro num,asc,nb,r1,r2 ;; num=source en integer ;; asc=destination en ASCII ;; nb =nombre de digit a convertir ;; rd =reg dynamic ;; et avec une instruction ASI:Ascii to Integer !!! ;; IAS:Integer to Ascii !!! $ife ;;asc # num $ERROR __dlgasc source=dest $endif ld asc '0000' div num k 10 r1 r2 ;;1er digit 0 mov r2 n 0 asc n 0 $if nb>1 ;;2Fme digit 1 div r1 k 10 r1 r2 mov r2 n 0 asc n 2 $endif $if nb>2 ;;3Fme digit 2 div r1 k 10 r1 r2 mov r2 n 0 asc n 4 $endif $if nb>3 ;;4Fme digit 3 div r1 k 10 r1 r2 mov r2 n 0 asc n 6 $endif endm ;;--------------- __dlgcupdn macro fu,fd,cu,kl,li,ml,reg ;; GFre le curseur et le dTcalage de l'Tcran. ;; Le curseur monte et descend avec selon les flag fu et fd avec ;; la variable cu. ;; Si le curseur dTpase l'Tcran, l'affichage se dTcale avec ;; la variable li. ;; Le curseur ne dTpasse pas la longueur de l'Tcran donnT par la ;; constant kl et la longueur max de la liste donnT par la ;; variable lm. ;; fu: flag_up ;; fd: flag_down ;; cu: cursor_pos 0..kl ;; kl: nb_line terminal (K) D100: kl=3 pour 4 ligne ;; li: dTcalage 1.line li=0 ->pas de dTcalage ;; ml: max_line pos screen ml=0 pour 1 TlTment (K ou R) ;; reg: reg_dyn ;; La position curseur et de l'objet sont toujours misent a jour car ;; la longueur de l'objet peut varier pendant l'affichage. ;;up-down cursor sth fu ;; jr l lcd ;;->cursor down res fu ;;cursor up dec cu ;; jr p exit ;;->exit cursor, OK:cursor>=0 acc h ;; cursor out of screen ldl cu ;; 0 ;; dec li ;; shift down screen jr p exit ;;->OK: li>=0 inc li ;; si neg. remise a 0 jr exit ;;fin cursor up lcd: ;;cursor down sth fd ;; jr l newlabel ;;->test des pos max res fd ;; inc cu ;; cursor down cmp k kl ;; test cursor out of screen cu ;; jr p newlabel ;;->OK: cursor<=max line ldl cu ;; kl ;; inc li ;; shift screen up jr newlabel ;;->test pos max screen ;;fin cursor down newlabel: ;;test pos qand l'objet se recourcit cmp ml ;; et disparait de l'Tcran li ;; jr p lt1 ;;->OK ;; object out of screen add ml ;; ml: K ou R k 0 ;; copy ml dans li li ;; correction offset objet lt1: ;;fin test pos max screen ;;------ ;;test l'objet monte trop haut sub ml ;; quand le curseur est au bas de l'objet cu ;; reg ;; maximum pour li jr n lt2n ;;-> reg < 0, objet trop petit cmp reg ;; li ;; jr p lt2 ;; dec li ;; correction offset objet jr lt2 lt2n: dec cu lt2: ;;fin test ;;------ exit: ;;fin up-down cursor endm ;;--------------- ;; teste un caractFre retu dans le buffer ;; positionne le flag: 1 si le caractFre est OK ;; 0 si le caractFre est autre ;; vide le reg. (=999) si le caractFre est OK __dlgcbuf macro buf,car,fl cmp buf k car acc z out fl jr l l_l ldl buf 999 l_l: endm ;--------------- ;; Detect if a F-key have been depressed. ;; buf: the received char. ;; reg: result, the F-key code from 0... ;; c1: value of the first F-key ;; nb: total number of F-key on the terminal ;; flag: result, indication F-key detected ;; ;; If the received char is in range c1..c1+nb-1 ;; - flag is set to 1 ;; - buf is cleared (loaded to 999) ;; - reg = buf-c1 = no F-Kee [0..] ;; ;; If other char is detected ;; - flag is set to 0 __dlgfkey macro buf,reg,c1,nb,flag acc h res flag cmp buf k c1 jr n l_l ;;->buf < c1 cmp k c1+nb-1 buf jr n l_l ;;->buf > c1+nb-1 acc h sub buf k c1 reg ldl buf 999 set flag l_l: endm ;--------------- ;; Teste si le caractFre retu dans le buffer, est le codes fast ou Slow ;; Commute le flag fast selon le code ;; Fast->set flag, Slow->res flag ;; Retourne A=H si le flag et commutT, A=L si non __dlgcfast macro buf,fast,slow,flag $ifn (fast=0)|(slow=0) $if fast=slow cmp buf k fast acc z com flag jr l end l_0: ldl buf 999 end: $else cmp buf k slow acc z res flag jr h l_0 l_f: cmp buf k fast acc z set flag jr l end l_0: ldl buf 999 end: $endif $else acc l $endif endm ;--------------- __dlgcar macro pref,car,suff,can,r0 ;; Emet 1 a 4 caractFres ASCII retu dans une constante ;; les caractFres 0 sont ignorTs ;; Emet Tgalement un prTfix et un suffix, un caract y.c. les '0' $ifnb $ifdef pref ldl r0 pref stxd can r0 $endif $endif $ifnb $ifn (car & 0FF000000H)=0 ldl r0 (car & 0FF000000H) >> 24 stxd can r0 $endif $ifn (car & 0FF0000H)=0 ldl r0 (car & 0FF0000H) >> 16 stxd can r0 $endif $ifn (car & 0FF00H)=0 ldl r0 (car & 0FF00H) >> 8 stxd can r0 $endif $ifn (car & 0FFH)=0 ldl r0 car & 0FFH stxd can r0 $endif $endif ;;not blank car $ifnb $ifdef suff ldl r0 suff stxd can r0 $endif $endif endm ;;------------------------------------------------------------------------ ;;loop pour display display ;; Fonction: l_l loop de 0 a cm ou vm. Inc de 1 a chaque appel ;; l_l: variable loop (R) ;; cm: constante max (value non typTe) ;; vm: variable max (K ou R) __dlgloop macro l_l,cm,vm inc l_l $ifnb cmp k cm l_l jr p l_l1 ldl l_l 0 l_l1: $endif $ifnb cmp vm l_l jr p l_l2 ldl l_l 0 l_l2: $endif endm ;;------------------------------------------------------------------------ ;; Limitation min/max ;;------------------- ;;mcc= <> -> fonction pas assemblTe ;;mcc= -> constante de 0 a 16383 ;;mcc= -> registre/timer/counter ;; __dlgmima macro r_in,r_out,mcc_min,v_min,mcc_max,v_max $ifnb ;;test minmum $ife ;;avec valeur (K) cmp r_in K v_min jr p L_max ld r_out v_min $else ;;avec R/T/C cmp r_in v_min jr p L_max copy v_min r_out $endif jr eom L_max: $endif $ifnb ;;test maximum $ife ;;avec valeur cmp K v_max r_in jr p L_c ld r_out v_max $else ;;avec R/T/C cmp v_max r_in jr p L_c copy v_max r_out $endif $ifne jr eom $endif $endif L_c: $ifne copy r_in r_out $endif eom: endm ;;end of macro __dlgmima ;;------------------------------------------------------------------------ ;; Test min/max ;;------------- ;;Test si une valeur dTpasse des limites min max ;;mcc= <> -> fonction pas assemblTe ;;mcc= -> constante de 0 a 16383 ;;mcc= -> registre/timer/counter ;; __dlgtest macro r_in,mcc_min,v_min,f_min,mcc_max,v_max,f_max,f_test $ifnb ;;test minmum $ife ;;avec valeur (K) cmp r_in K v_min acc n out f_min $else ;;avec R cmp r_in v_min acc n out f_min $endif $endif $ifnb ;;test maximum $ife ;;avec valeur cmp K v_max r_in acc n out f_max $else ;;avec R cmp v_max r_in acc n out f_max $endif $endif $ifnb sth f_min orh f_max out f_test $endif endm ;;end of macro __dlgtest ;;****************************************************************************** $list $nolist ;;********************************************************************** ;; Librairie de FBox de dialogue HEAVAC via SBUS ;;********************************************************************** ;; Macros internes ;;********************************************************************** __dlgtrfol macro aske,tmp,dst,max,buf,lnb, r0,r1,r2,r3,r4,r5 ;; For object = Data List ;; Le premier TlTment est toujour chargT a la position 1 ;; Seule les valeurs sont chargTes dans les positions suivantes ;; aske: (R) element demandT dans l'object ;; tmp: (R) buffer temporaire (96 reg.) l'object est dTja dans tmp ;; Ce type d'objet a toujours un seule TlTment ;; dst: (R) destination_absolut (1er registre buffer) ;; max: (R) retourne le nombre max_relatif de block existant (max pour ask) ;; max est trouvT en lisant la longueur de l'object a la position 7 ;; buf: (K)longueur du buffer registre (max de block-1), constante 4 ->5 places ;; lnb: (K)longueur d'un bloc, constante 5 -> 6 reg. $ifnb ;;not used $endif __dlgnum tmp+7,max,2,r0 ;;nombre max d'TlTment (00..99 pour 1 a 100) ;;rafraichit le nombre d'TlTment.. __dlgpnt 0,0,r2 ;;init pointeur source (tmp) to element 0 ldl r1 ;;init pointeur dst 0 ;; ;;get registre tmp+0..4 ;;1 copy Type sei r2 ;; pointeur source tmp getx tmp ;; buffer temp (i) r0 ;; sei r1 ;; putx r0 ;; copy 4 byte dans dst ;; buffer destination (i) ;;2 copy adresse value sei r2 ;; pointeur source tmp getx tmp+1 ;; buffer temp (i) r0 ;; sei r1 ;; putx r0 ;; dst+1 ;; buffer destination (i) __dlgnum r0,r4,4,r5 ;; adresse reg dans r4 ;;3 copy adresse flag update (not used) sei r2 ;; pointeur source tmp getx tmp+2 ;; buffer temp (i) r0 ;; sei r1 ;; pointeur dest. putx r0 ;; dst+2 ;; put adresse flag update ;;4 copy no text standard sei r2 ;; pointeur source tmp getx tmp+3 ;; buffer temp (i) r0 ;; sei r1 ;; putx r0 ;; dst+3 ;; buffer destination (i) add r4 ;;address first elemnt in object aske ;;asked element at first place r2 ;;= pointer src ldl r1 ;;init pointeur dst 0 ;; ldl r3 ;;loop counter buf ;;nb place in buffer -1 l_v: sei r2 ;;pointer src getx r 0 ;; r5 ;;value sei r1 ;; putx r5 ;; dst+4 ;;place 4 for value inc r2 ;;next value add r1 ;; k lnb+1 ;;dst points to next block r1 ;; dec r3 ;; jr p l_v ;;->loop get value endm ;; __dlgtrfol ;;------------------------------------------------------------- __dlgtrfoe macro aske,src,tmp,dst,max,buf,lnb, r0,r1,r2,r3,r4,r5,f0 ;; Transfer de blocks d'TlTments de l'object demandT par S-Bus ;; Transfer des blocks d'TlTments dans un buffer de registres. ;; aske: (R) element demandT dans l'object ;; src: (X) adresse text0_absolut source ;; tmp: (R) buffer temporaire (96 reg.) l'object est dTja dans tmp ;; dst: (R) destination_absolut (1er registre buffer) ;; max: (R) retourne le nombre max_relatif de block existant (max pour ask) ;; max est trouvT en lisant la longueur de l'object ;; buf: (K)longueur du buffer registre (max de block-1), constante 4 ->5 places ;; lnb: (K)longueur d'un bloc, constante 5 -> 6 reg. $ifnb ;;not used $endif __dlgnum tmp+7,max,2,r0 ;; nombre max d'TlTment ;; rafraichit le nombre d'TlTment.. ldl r1 ;; init pointeur dst 0 ;; __dlgpnt aske,0,r2 ;; init pointeur source tmp ldl r3 ;; init loop counter 0 l_l1: ;;registre 0..4 ;;1 copy Type sei r2 ;; pointeur source tmp getx tmp ;; buffer temp (i) r0 ;; sei r1 ;; putx r0 ;; copy 4 byte dans dst ;; buffer destination (i) __dlgnum r0,r4,2,r5 ;; type (2 digit) dans r4 acc h res f0 ;;init type numeric flag=0 cmp r4 ;;type 1 = binary k 1 ;; acc z ;; set f0 ;;set binary cmp r4 ;;type 20 = duplex k 20 acc z ;; set f0 ;;set binary ;;2 copy adresse+value reg/flag sei r2 ;; pointeur source tmp getx tmp+1 ;; buffer temp (i) r0 ;; sei r1 ;; putx r0 ;; dst+1 ;; buffer destination (i) __dlgnum r0,r4,4,r5 ;; adresse reg/flag dans r4 sei r4 ;; sth f0 ;; binary var ? jr h l_f ;;->get flag-value getx r 0 ;; get reg-value r4 ;; jr l_p ;;->put value l_f: ldl r4 ;; 0 ;; sthx f 1 ;; 24.01.97: get 2nd flag value (for duplex) shil r4 ;; 1 ;; sthx f 0 ;; get flag value shil r4 ;; flag value in LSB 1 ;; l_p: sei r1 ;; putx r4 ;; dst+4 ;; put reg/flag value ;;3 copy adresse+value flag update sei r2 ;; pointeur source tmp getx tmp+2 ;; buffer temp (i) r0 ;; sei r1 ;; pointeur dest. putx r0 ;; dst+2 ;; put adresse flag update __dlgnum r0,r4,4,r5 ;; adresse flag dans r4 ldl r0 0 sei r4 ;; ;; sthx f 1 ;; get value flag ack (pour alarme) ;; shil r0 ;; ;; 1 ;; include value in LSB sthx f 0 ;; get value flag shil r0 ;; 1 ;; include value in LSB sei r1 ;; putx r0 ;; dst+5 ;; put value flag update ;;4 copy no text standard sei r2 ;; pointeur source tmp getx tmp+3 ;; buffer temp (i) r0 ;; sei r1 ;; putx r0 ;; dst+3 ;; buffer destination (i) add r2 ;; inc pointer src by 4 k 4 r2 add r1 ;; inc pointer dst k lnb+1 r1 inc r3 ;; loop 0..buf cmp k buf ;; r3 ;; jr n l_le ;;->buffer plein cmp max ;; r3 ;; jr n l_le ;;->plus d'TlTment jr l_l1 ;;end loop l_le: endm ;; __dlgtrfoe ;;------------------------------------------------------------- __dlgtrfal macro aske,dst,max,buf,lnb, r0,r1,r2,r3,r4,r5,fdate,fstate ;; Transfer de blocks d'TlTments du buffer alarme ;; Transfer des blocks d'TlTments dans un buffer de registres. ;; aske: (R) element demandT dans l'object ;; _DLGALBUF: (X) adresse source (buffer alarme) ;; dst: (R) destination_absolut (1er registre buffer) ;; max: (R) retourne le nombre max_relatif de block existant ;; max est trouvT en lisant la longueur de l'object ;; buf: (K)longueur du buffer registre (max de block-1), constante 4 ->5 places ;; lnb: (K)longueur d'un bloc, constante 5 -> 6 reg. ;; fdate: indique une ligne avec date and time ;; fstate indique une ligne avec state ala+ack et counter tfr X _DLGALBUF k 7 ;; lire nb element r4 __dlgnum r4,max,2,r0 ;; nombre max d'TlTment ;; Le nombre peut varier pour le buffer alarmes ldl r1 ;; init pointeur dst 0 ;; __dlgpnt aske,0,r2 ;; init pointeur source tmp ldl r3 ;; init loop counter 0 l_l1: ;;1:Copy Type ;;----------- ;; r2 points to type tfr X _DLGALBUF ;; lire buffer alarme r2 r0 sei r1 ;; putx r0 ;; copy 4 bytes type dans dst ;; buffer destination (i) ldl r4 ;; Test le type de ligne 0 ;; mov r0 ;; b 2 ;; r4 ;; type dans r2 b 0 ;; cmp r4 ;; Si type='1'.. k '1' ;; acc z ;; out fdate ;; ..set ligne_type=date cmp r4 ;; Si type='2'.. k '2' ;; acc z ;; out fstate ;; ..set ligne_type=state ;;2:Copy adresse+value date/counter ;;--------------------------------- inc r2 ;; points to address time/counter tfr X _DLGALBUF ;; lire buffer alarme r2 r0 sei r1 ;; putx r0 ;; dst+1 ;; buffer destination (i) sth fdate ;; orh fstate ;; jr l l_2e ;;->end 2 __dlgnum r0,r4,4,r5 ;; adresse dans r4 sei r4 ;; getx r 0 ;; r0 ;; date/counter sei r1 ;; putx r0 ;; dst+4 ;; put date/counter sth fdate ;; jr l l_2e ;;->end 2 sei r4 ;; getx r 1 ;; r0 ;; time sei r1 ;; putx r0 ;; dst+5 ;; put time l_2e: ;;3:Copy adresse+value ala+ack ;;---------------------------- inc r2 ;; points to address ala tfr X _DLGALBUF ;; lire buffer alarme r2 r0 sei r1 ;; pointeur dest. putx r0 ;; dst+2 ;; put adresse flag update sth fstate jr l l_3e ;;->end 3 __dlgnum r0,r4,4,r5 ;; adresse flag ala dans r4 ldl r0 0 sei r4 ;; sthx f 1 ;; get value flag ack shil r0 ;; 1 ;; include value in LSB sthx f 0 ;; get value flag alarm shil r0 ;; 1 ;; include value in LSB sei r1 ;; putx r0 ;; dst+5 ;; put value flag update l_3e: ;;4:Copy no text alarme ;;--------------------- inc r2 ;; points to text alarm tfr X _DLGALBUF ;; lire buffer alarme r2 r0 sei r1 ;; putx r0 ;; dst+3 ;; buffer destination (i) inc r2 ;; inc pointer src, points to next line add r1 ;; inc pointer dst k lnb+1 r1 inc r3 ;; loop 0..buf cmp k buf ;; r3 ;; jr n l_le ;;->buffer plein cmp max ;; r3 ;; jr n l_le ;;->plus d'TlTment jr l_l1 ;;end, loop l_le: endm ;;__dlgtrfal ;;********************************************************************** __dlgtrfb macro ask,src,tmp,dst,max,buf,lnb, r0,r1,r2,r3 ;; Transfer block ;; Transfer des blocs d'une sTrie de textes dans un buffer de registres. ;; ;; ask: R block0_relatif demandT (section,object) ;; src:(X)adresse text0_absolut source ;; tmp: R buffer temporaire (96 reg.) ;; dst: R destination_absolut (1er registre buffer) ;; max: R nombre total de block existant (max pour ask) ;; buf:(K)longueur du buffer (max de block), constante 5 ->6 places ;; lnb:(K)longueur d'un bloc, constante 4 -> 5 reg. ldl r3 ;;pointeur relatif section 0 ;; ldl r1 ;;pointeur incrTmentale 0..5*6 0 l_l2: add ask ;;loop section r3 ;; r0 ;; cmp max ;; r0 ;; jr n l_l3 ;;->plus de section sei r0 ;; getx X src ;; texte section 0 (i) tmp ;; buffer 96 reg temp ldl r2 ;; counter loop 0..4 0 ;; ;;loop registre 0..4 l_l1: sei r2 ;; pointeur source temp getx tmp ;; r0 ;; sei r1 ;; putx r0 ;; copy 1 reg. (4 byte) dans dst ;; buffer installation (i) inc r1 ;; pointe next registre inc r2 ;; count loop cmp k lnb ;; r2 ;; jr p l_l1 ;;end loop reg 0..4 inc r3 ;; loop section 0..5 cmp k buf ;; r3 ;; jr n l_l3 ;;->buffer plein jr l_l2 ;;end loop section l_l3: endm ;;****************************************************************************** __dlgwbus macro can,busy,nostn,RsW,wrtslv, wrreg,wrflg,wrfup,wrqit ;; Write via BUS ;; Ordre de transmission par SBUS pour le master ;; Seulement les no de station < 100 ;; ;; can: W no canal ;; busy: F flag Tx busy ;; nostn: R numTro de station ;; RsW: R source master 6 register ;; wrtslv: R destination slave, 6 reg ;; wrreg...: R ordres d'Tcriture $group _SFUPCOMM ;;case 1=canal occupT: stl busy ;;FBox busy L anh _FBUSY_#can ;;token H jr h exit ;;canal occupT ;;case 2=FBox occupT: sth busy ;;FBox busy H anh _TBUSY_#can ;;canal busy H jr h exit ;;FBox occupT ;;case 3=Fin du travail pour le Fbox: sth _FBUSY_#can ;;token H.. jr h L_wbs ;;->case stop ;;Case Start: cmp nostn k 100 jr p exit ;;-> no>=100, station propre cmp wrreg ;;ordre write reg k 0 ;; jr p l_wb2 ;;->ordre cmp wrflg ;;ordre write flag k 0 ;; jr p l_wb2 ;;->ordre cmp wrfup ;;ordre write flag update k 0 ;; jr p l_wb2 ;;->ordre cmp wrqit ;;ordre quittance alarme k 0 ;; jr p l_wb2 ;;->ordre jr exit ;;->pas de start ordre l_wb2: ;;Start ordre via bus acc h set busy ;;FBox=busy set _FBUSY_#can ;;token=busy copy nostn _STATION_#can ldl _MEDIA_#can 10 ;;type 10 = Dlg, ordre Write ldl _ADDR_#can 0 ;;base pas affichable! DTsolT. stxm can 8 ;;2write_r+2write_f+2write_update+2write_qit=8 RsW ;;Buffer Write wrtslv ;;base Write Slave jr exit ;;case Stop: L_wbs: acc h res busy ;;rx terminT, libTrer busy res _FBUSY_#can ;; libTrer token ld wrreg -1 ;;quittance les ordres ld wrflg -1 ld wrfup -1 ld wrqit -1 exit: $endgroup ;;_SFUPCOMM endm ;;****************************************************************************** __dlgabus macro can,busy,nostn, ;;Ask section/object/element via BUS askmst,askslv,back,error ;; Ask object via S-BUS ;; Seulement les no de station < 100 ;; Ordre de transmission par SBUS pour le master ;; ;; can: no canal ;; busy: F flag Tx busy ;; nostn: R numTro de station ;; askmst: R source master 1 register ;; askslv: R destination slave 1 register ;; back: R retour confirmT de l'object a lire $group _SFUPCOMM ;;case 1=canal occupT: stl busy ;;FBox busy L anh _FBUSY_#can ;;token H jr h exit ;;canal occupT ;;case 2=FBox occupT: sth busy ;;FBox busy H anh _TBUSY_#can ;;canal busy H jr h exit ;;FBox occupT ;;case 3=Fin du travail pour le Fbox: sth _FBUSY_#can ;;token H.. jr h l_stp ;;->case stop ;;Case Start: cmp nostn k 100 jr p exit ;;-> no>=100, station propre cmp askmst ;;ordre write reg back ;; jr z exit ;;->pas de demande, feed-back OK sth error ;;_DLG_ER ;;DLG-Master error jr h exit ;;->pas de nouvel ordre acc h ;;Start ordre via bus set busy ;;FBox=busy set _FBUSY_#can ;;token=busy copy nostn _STATION_#can ldl _MEDIA_#can 11 ;;type 11 = Dlg, ordre Ask ldl _ADDR_#can 0 ;;base pas affichable! DTsolT. stxm can ;; 1 ;; askmst ;;Reg de demande du master askslv ;;Reg de demande du slave jr exit ;;case Stop: l_stp: acc h res busy ;;rx terminT, libTrer busy res _FBUSY_#can ;; libTrer token sth _NEXEC_#can ;;comm's error acc l ;;ignorer l'erreur dans cette macro !!! set error ;;copie sur flag error exit: $endgroup ;;_SFUPCOMM endm ;;****************************************************************************** __dlgrbus macro option,can,busy,nostn, ;;Read instal./section/object via BUS askmst,rdmst,rdslv,error ;; Read object via S-BUS ;; Seulement les no de station < 100 ;; Si option=O (objet) lire en permanence ;; Ordre de lecture par SBUS pour le master ;; ;; can: no canal ;; busy: F flag Tx busy ;; nostn: R numTro de station ;; askmst: R demande du master ;; rdmst: R base du buffer (32 Reg) de lecture pour master ;; rdslv: R base du buffer (32 Reg) de lecture du salve $group _SFUPCOMM ;;case 1=canal occupT: stl busy ;;FBox busy L anh _FBUSY_#can ;;token H jr h exit ;;canal occupT ;;case 2=FBox occupT: sth busy ;;FBox busy H anh _TBUSY_#can ;;canal busy H jr h exit ;;FBox occupT ;;case 3=Fin du travail pour le Fbox: sth _FBUSY_#can ;;token H.. jr h l_stp ;;->case stop ;;Case Start: cmp nostn k 100 jr p exit ;;-> no>=100, station propre $ife