INMC 80 News

  

February-April 1981, Issue 3











Page 11 of 55











-11-

MASTERMIND MODS AGAIN

Dear INMC

Thanks to G. Benson for the suggested mods to my mastermind Program in JNMC80 = 1, The program was written before B-BUG was avalible, and the random number routine |! used was rather poor, but was the best I had at the time. For those without B-BUG here’s a modified version of its random number routine, which fits in Place of the old RAND routine in Mastermind:

OCIA 21 69 OF RAND: LD HL, KEY

OC9D O1 07 O4 LD BC,0407 34 octal digits OCAO ED SF RN2: LD A,R

OCA2 86 ADD A, CHL)

OCA3 38 01 JR C,R2-$

OCA5 3D DEC A

OCAG 77 R2: LD CHL),A

OCA7 91 SUB2: SUB C

OCA8 30 FD JR NC,SUB2-c

OCAA 81 ADD A,C

OCAB 3C INC OA

OCAC 77 LD CKL),A

OCAD 23 INC HL

OCAE 10 FO DINZ RN2-$ 3; repeat for 4& digits. OCAF C9 RET

OcBO 00 NOP ; spare

TRAFFIC LIGHTS

Here is a simple hardware software combination suitable for an LEN traffic lights display, as requested in INMC80 1 by P, Nurse. First the hardware, three transistors driving LEDs from the PIO socket SKA, on bits 5 to 7 of port 4&:

yy RED ap yellow

+5v Leo LED Nascom |] poRT Y Son Socket Bo \ frie ene MANA BC 08 e lek AAW joKk


This is an OCR’d version of the scanned page and likely contains recognition errors.











Page 11 of 55