.NLIST .NLIST BEX .ENABLE LC,AMA ; stored on: VL1B.MAC ; last revised: 29-Nov-83 ; the file name is: VL1x.MAC where x is a letter signifying a particular ; set of assembly options. ; ; this file contains variables, conditionals, macros, and macro directives ; that are required for all the VLISP modules. Therefore VL1x.MAC should be ; the first file specified when using MACRO to assemble any VLISP module. version = 'E ; [PM] the current VLISP revision level options = 'B ; [PM] represents this particular option set rt11 = 1 colorx = 0 recor = 0 eis = 1 ; [PM] fis = 0 clrxxx = 1 i11.04 = 0 ; [PM] CLOCK = 1 ; [PM] .if ne,rt11 jsw = 44 ; adresse du Job Status Word en RT11. errbyt = 52 ; adresse des codes d'erreur. sysptr = 54 ; [PM] address of the start of the monitor config = 300 ; [PM] offsett of RT11 configuration word linfq = 40 ; [PM] bit used in config for line frequency .mcall .ttyin,.print,.exit,.ttyout,.ttinr .mcall .enter,.lookup,.close,.readw,.writw,.delete,.rename .mcall .settop,.dstatus,.gtim,.trpset,.scca .endc ; ----- les registres. a1 = r0 a2 = r1 a3 = r2 a4 = r3 a5 = r4 free = r5 p = sp .page cdr = 2 ; deplacement d'acces au CDR. dpfval = 4 ; deplacement d'acces a la F-VAL d'atome. dpftyp = 6 ; deplacement d'acces au F-TYP d'atome. dpptyp = 7 ; deplacement d'acces au P-TYP d'atome. dpnexa = 8. ; deplacement d'acces a l'atome suivant. dplpn = 10. ; deplacement plength. maxpn = 128. ; long max pname ou string. cr = 15 ; carriage return. lf = 12 ; line-feed. .mark. = -1 ; ----- type des caracteres. clnum = 0 ; caract nulls a enlever. clbcm = 1 ; debut commentaire (;) clecm = 2 ; fin commentaire () clshl = 3 ; quote caractere (/). clparo = 4 ; ( clparf = 5 ; ) clcro = 6 ; [ clcrf = 7 ; ] cldot = 8. ; . clsep = 9. ; separateur (esp tab lf ... ) clmac = 10. ; macro-caract clstr = 11. ; chaines (") cloct = 12. ; specif de nb octal (#) clnor = 13. ; caractere normal p-name. ; ----- type des fonctions. t.sbr0 = 2. t.sbr1 = 4. t.sbr2 = 6. t.sbr3 = 8. t.sbrn = 10. t.fsbr = 12. t.expr = 14. t.fxpr = 16. t.macr = 18. t.escp = 20. ; ----- type des atomes. at.str = 200 .page ; default extentions extvli = ^rVLI ; [PM] extension par defaut (INPUT ... ) = VLI (RAD50) extvll = ^rVLL ; [PM] extension par defaut (OUTPUT ...) = VLL (RAD50) extlog = ^rLOG ; [PM] extension par defaut (RECORD ...) = LOG (RAD50) sysdev = ^rDK ; [PM] default device name = DK (RAD50) ; assignment of I/O channels chani = 1 ; no canal entree. chano = 2 ; no canal sortie. chanre = 3 ; no canal pour record. ; assign amount of space to be used for number storage .if eq,fis ; [PM] npage = 32. ; 1 page of numbers = 32 bytes .endc ; [PM] .if ne,fis ; [PM] npage = 64. ; 1 page of numbers = 64 bytes .endc ; [PM] ; ----- nombre de pages de 15 nombres (1 page = 16 or 32 mots) [depends on fis] npagnb = 30. ; 450 nombres. ; assign amount of space to be used for user defined atoms atsize = 2400. ; number of words for new atoms ; ****** macros .if ne,i11.04 .macro sob reg,labl ; redefine sob for 11/04 dec reg bne labl .endm .endc .macro push reg ; save on stack macro mov reg,-(p) .endm push .macro pop reg ; retrieve from stack macro mov (p)+,reg .endm pop .macro a2popj mov a2,a1 return .endm a2popj .macro exch r1,r2 ; exchange contents of r1 and r2 ; using no other registers .if ne,i11.04 ; use this method for 11/04 push r1 mov r2,r1 pop r2 .endc .if eq,i11.04 ; use faster method if XOR is available xor r1,r2 xor r2,r1 xor r1,r2 .endc .endm exch .page ; ----- uncns a2 <- car a1, a1 <- cdr a1. .macro uncns mov (a1)+,a2 mov (a1),a1 .endm uncns ; ----- consl reg1,reg2,reg3 (cons reg1 reg2) -> reg3. .macro consl reg1,reg2,reg3 call qcons mov reg2,(a4) .if idn,reg1,0 clr -(a4) .endc .if dif,reg1,0 mov reg1,-(a4) .endc .if dif,reg3,a4 mov a4,reg3 .endc .endm consl ; ----- jflst reg,etiq vers etiq si reg n'est pas une liste. ; branchement court .macro jflst reg,etiq cmp reg,#blist blo etiq .endm jflst ; ----- jtlst reg,etiq vers etiq si reg est une liste. ; branchement court .macro jtlst reg,etiq cmp reg,#blist bhis etiq .endm jtlst .page ; ----- jtnil reg,etiq vers etiq si reg = nil ; branchement court. .macro jtnil reg,etiq cmp reg,#nil beq etiq .endm jtnil ; ----- jfnil reg,etiq vers etiq si reg =/= nil ; branchement court. .macro jfnil reg,etiq cmp reg,#nil bne etiq .endm jfnil ; ----- jtnum reg,etiq vers etiq si reg est un nombre. ; branchement court. .macro jtnum reg,etiq cmp reg,#batom blo etiq .endm jtnum ; ----- jfnum reg,etiq vers etiq si reg n'est pas un nombre. ; branchement court. .macro jfnum reg,etiq cmp reg,#batom bhis etiq .endm jfnum ; ----- ckstk controle le debordement de pile ; used in : read probj eval .macro ckstk cmp p,#hstak bhis .+6 jmp erfs .endm ckstk .page ; ----- xtopst reg1,via,r2 echange reg1 avec le sommet de pile ; via reg2. .macro xtopst reg1,via,reg2 mov (p),reg2 mov reg1,(p) mov reg2,reg1 .endm xtopst ; ......... .if ne,fis ; ----- pushf colle le nb flottant x dans la pile ; i.e. push low; push high. .macro pushf x .flt2 x . = .-4 .word 12746 . = .+4 .flt2 x . = .-6 .word 12746 . = .+2 .endm pushf .endc ; ......... ; ; ****** END OF VL1 ****** .LIST