Opcode Vocabulary Builder

Developer(s): Patrick Fagan
Date: 198x
Type: Program
Platform(s): TS 2068

Quiz to help you learn Z80 opcodes and related concepts.

Appears on

Gallery

Opcode Vocabulary Builder

Source Code

    1 REM "OPCODE VOCABULARY BUILDER. TO ENTER DEFINITION OF YOUR OWN JUST ADD MORE DATA LINES.  BY PATRICK FAGAN."
    2 DIM c(150)
    3 BORDER 0: PAPER 0: INK 9
    4 CLS 
    5 PRINT INVERSE 1;AT 0,7;"OPCODE \q\u\e\s\t\i\o\n\s": INVERSE 0
    6 RANDOMIZE 
   10 FOR a=1 TO 150
   12 LET c(a)=INT ((RND*183)*(RND*3)+70)
   13 NEXT a
   15 FOR A=1 TO 150
   20 RESTORE c(a)
   21 READ a$: PRINT a$,: READ b$
   26 LET b=0
   30 INPUT c$: LET b=b+1
   40 IF c$=b$ THEN PRINT BRIGHT 1;b$: BRIGHT 0: GO TO 60
   45 IF b=3 THEN PRINT "THE ANSWER IS  "; INVERSE 1;B$: INVERSE 0: GO TO 60
   50 IF c$<>b$ THEN PRINT "TRY AGAIN.": GO TO 30
   60 PAUSE 0: CLS : NEXT a
   70 DATA "LIKE A VARIBLE,IN THAT IT HAS A NAME-USUALLY A LETTER OF THE ALAPHABET-ONE BYTE LONG AND IT CAN STORE NUMBERS LIKE BASIC CAN;BUT ONLY IN THE RANGE OF 0-255.","REGISTER"
   75 DATA "REMOVES TWO BYTES OF DATA FROM THE MACHINE STACK AND LOADS THEM INTO A REGISTER PAIR.THIS INSTRUCTION AUTOMATICALLY INCREMENTS THE SP REGISTER ADDRESS BY TWO.DATA CAN BE LOADED INTO THE ACCUMULATOR AND FLAG REGISTERS TOGETHER.WHAT OPCODE INSTRUCTION?","POP"
   80 DATA "STORES BITS OF INFORMATION ABOUT THE RESULTS OF CALCULATIONS DONE IN THE ACCUMULATOR.SOME INSTRUCTIONS WILL ALTER ALL BITS,OTHERS ONLY ONE,OTHERS NONE.","FLAGS REGISTER"
   85 DATA "EIGHT BITS IN LENGTH.EACH HAS A DIFFERENT FUNCTION(TWO ARE NOT USED)-LEFT TO RIGHT-SIGN-ZERO-NOT USED-HALF CARRY-NOT USED-PARITY/OVERFLOW-ADD/SUBTRACT-CARRY BIT","FLAGS REGISTER"
   90 DATA "INDICATES (POSITIVE OR NEGATIVE)OF THE LAST COMPUTED RESULT.POSITIVE IS'0',NEGATIVE IS '1',ITS EQUAL TO THE LEFTMOST BIT OF ANY RESULT.(S)","SIGN FLAG"
   95 DATA "INSTRUCTION APPLIES TO 'A OR 'HL REGISTERS.APPLIED TO 'A IT MEANS-ADD THE CONTENTS OF THE SPECIFIED SINGLE BYTE,AND THE CONTENTS OF THE CARRY FLAG,TO 'A: AND LEAVE THE RESULT IN 'A.-BYTES HELD IN SINGLE BYTE GP REGISTERS,MEMORY POINTED TO BY 'HL OR THE INDEX REGISTERS,OR STORED AS IMMEDIATE DATA IN THE PROGRAM CAN BE ADDED. APPLIED TO 'HL,THE CONTENTS OF THE REGISTER PAIRS (BC,DE,HL)OR THE STACK POINTER ARE ADDED TO 'HL,ALONG WITH AN EXTRA 1 IF THE CARRY IS SET;WITH THE RESULT REMAINING IN 'HL.","ADC"
  100 DATA "THESE REGISTERS CAN BE USED LIKE ANY REGISTERS.UNIQUE BECAUSE OF INDEXED ADDRESSING. YOU CAN ADD A CONSTANT TO AN ADDRESS.LD B,(___+XX)NOTE PARENTHESIS.FORMAT ANS XX,XX","IX,IY"
  105 DATA "YOU CAN ADD A CONSTANT TO THE ADDRESS.A JUMP FROM BASIC TO MACHINE CODE WILL START IT AT A SPECIFIC ADDRESS(POSSIBLY VARIBLE FILE ON 2068)(INDEXED ADDRESSING) FORMAT ANS XX","IY"
  110 DATA "THIS IS A LOGIC OPERATION THAT CAN BE PERFORMED ON THE 'A REGISTER.IT TAKES A BYTE FROM MEMORY(POINTED TO BY 'HL OR THE INDEX REGISTERS),PROGRAM MEMORY OR A SINGLE GP REGISTER,AND EXECUTES AN 'AND' LOGIC TEST ON EACH BIT OF 'A AND THE CORRESPONDING BIT OF THE SPECIFIED BYTE,LEAVING THE RESULT IN 'A.","AND"
  115 DATA "BY USING THIS INSTRUCTION YOU CAN TEST ANY BIT FROM THE GP REGISTERS,AND FROM MEMORY POINTED TO BY EITHER THE HL OR THE INDEX REGISTERS AND SET THE ZERO FLAG ACCORDINGLY.","BIT"
  120 DATA "CHECKS TO SEE IF THE LAST RESULT WAS ZERO.IF SO IT SETS TO 1,OTHERWISE SETS TO 0 OPERATES ON REGISTER PAIRS SOMEWHAT ERRATICALLY(Z)","ZERO FLAG"
  125 DATA "KEEPS TRACK OF ANY CARRY OR BORROW BETWEEN THE LOWER FOUR BITS AND UPPER FOUR BITS IN THE ACCUMULATOR.USED BY THE 'DAA DECIMAL ADJUST ACCUMULATOR FOR BCD BINARY CODED DECIMAL(H)","HALF CARRY FLAG"
  130 DATA "IN A LOGICAL STATEMENT 'AND A,B'CHECKS TO SEE IF THE NUMBER OF ONES IN THE RESULT IS EVEN SET 1,OR ODD SET 0,IN A ARITHMETIC FORM 'ADD A,B'INDICATES IF SIGNED + OR - NUMBERS ARE USED AND CAN'T  BE REPRESENTED PROPERLY IN THE 8 BIT ACCUMULATOR.(P/V) ","PARITY OVERFLOW FLAG"
  135 DATA "A GROUP OF WIRES THAT ARE TREATED COLLECTIVLY IS A BUS.ALL DATA FLOWING IN OR OUT OF THE Z-80 PASS ALONG EIGHT WIRES CALLED THE","DATA BUS"
  140 DATA "REGISTER USED TO HOLD THE RESULTS OF 8 BIT ARITHMETIC AND LOGICAL OPERATIONS.IT WORKS WITH A RESPECTIVE 8 BIT REGISTER THAT HOLDS INFO ABOUT ITS VALUE AND THE RESULT OF OPERATION.SOMTIMES REFERED TO TOGETHER AS A 16 BIT REGISTER(AF)","ACCUMULATOR FLAG REGISTER"
  145 DATA "THIS REGISTER HOLDS A 16 BIT ADDRESS WHICH POINTS TO A SECTION OF RAM THAT IS RESERVED FOR THE MACHINE STACK.(SP)","STACK POINTER"
  150 DATA "DATA CAN BE STORED HERE ON A LAST IN,FIRST OUT BASIS(LIFO)","MACHINE STACK"
  155 DATA "HOLDS THE 16 BIT ADDRESS OF THE CURRENT INSTRUCTION BEING FETCHED FROM MEMORY.AUTOMATICALLY INCREMENTS AND,IF A JUMP OR CALL IS INDICATED,IT THEN BEGINS AT THE NEW ADDRESS(PC)","PROGRAM COUNTER"
  160 DATA "INDICATES WHICH TYPE OF OPERATION WAS PREFORMED.USED WITH HALF-CARRY FLAG TO ASSIST IN BCD BINARY CODED DECIMAL.","ADD SUBTRACT FLAG"
  165 DATA "THERE ARE FOUR THAT RESPOND TO HARDWARE SIGNALS.EACH IS INITIATED WHEN THE CORRISPONDING PIN ON THE Z-80 IS BROUGHT LOW.","SPECIAL FUNCTIONS"
  170 DATA "CAUSES THE CPU TO BECOME INITIALIZED.IT ALLOWS THE SYSTEM TO BEGIN OPERATING FROM  A PREDEFINED  STATE","RESET FUNCTION"
  175 DATA "FIRST ACTION WHEN THE 2068 IS TURNED ON.PC 0000,DISABLES INTERRUPTS,LOADS 'I & 'R WITH 00,SETS INTERRUPT MODE TO 0","RESET FUNCTION"
  180 DATA "TEMPORARILY HALTS EXECUTION OF A PROGRAM.ALLOWS FOR SYNCRONAZTION OF READ WRITE TIMING BETWEEN CPU AND OTHER DEVICES","WAIT FUNCTION"
  185 DATA "INT TRIGGERS A BREAK IN CPU OPERATION.Z-80 RESPONDS IN THE 2068 BY SETTING THE PC TO 38h AND CONTINUES.CAN BE REPROGRAMMED","INTERRUPT REQUEST FUNCTION"
  190 DATA "BREAK IN CPU OPERATION.SETS PC TO 66h RUNS.CAN'T BE REPROGRAMMED.","NONMASKABLE INTERRUPT FUNCTION"
  195 DATA "THE BYTE FOLLOWING THE OPCODE CONTAINS THE ACTUAL OPERAND ie.LD A,40h.NOTE PARENTHESES ARE NOT REQUIRED","IMMEDIATE ADDRESSING"
  200 DATA "LOAD INSTRUCTION PASSING DATA TO OR FROM A REGISTER.THE CONTENTS OF A 16 BIT ADDRESS ARE LOADED INTO A SINGLE REGISTER.IE. LD A,(1000h)","EXTENDED ADDRESSING"
  205 DATA "SINGLE BYTE CALL INSTRUCTIONS KNOWN AS RESTARTS.THIER USE SETS THE PROGRAM COUNTER TO ONE OF EIGHT ADDRESSES IN ZERO PAGE OF MEMORY","MODIFIED ZERO PAGE ADDRESSING"
  210 DATA "ONE BYTE FOLLOWING THE OPCODE INSTRUCTION IS TREATED AS A SIGNED (+OR-127) TWO'S COMPLIMENT INTEGER AND IS ADDED TO THE ADDRESS OF THE NEXT INSTRUCTION","RELATIVE ADDRESSING"
  215 DATA "YOU CAN JUMP FROM ONE ADDRESS TO ANOTHER ADDRESS BUT A MAXIMUM OF (+OR-127)BYTES AWAY USING THIS ONE BYTE FORM OF INSTRUCTION.IE. JR,12.CAN BE USED IN CONDITIONAL STATEMENTS AS WELLFORMING AS IF/ THEN RANDOMIZE TYPE OF STATEMENT.","RELATIVE ADDRESSING"
  220 DATA "ENABLES RELOCATEABLE CODE THAT CAN BE USED AT ANY SERIES OF ADDRESSES WITHOUT FURTHER MODIFICATION IF THE CODE IS MOVED.PROVIDES AN ADVANTAGE OVER IMMEDIATE EXTENDED ADDRESSING WHEN USING THE JUMP INSTRUCTION.WHAT TYPE OF ADDRESSING IS THIS?","RELATIVE ADDRESSING"
  225 DATA "MEANS THAT TWO BYTES REPRESENTING THE ADDRESS ARE INCLUDED IN THE INSTRUCTION.WITH THIS ADDRESSING MODE A JUMP INSTRUCTION CAN REACH LOCATIONS MORE THAN 127 BYTES AWAY","EXTENDED ADDRESSING"
  230 DATA "THE BYTE FOLLOWING THE OPCODE CONTAINS A DISPLACEMENT VALUE WHICH IS ADDED TO ONE OF TWO PARTICULAR REGISTERS TO FORM THE CONTENTS OF A MEMORY LOCATION.THE VALUE OF THE REGISTER IS NOT ALTERED. ","INDEXED ADDRESSING"
  235 DATA "AN EXAMPLE TYPE OF ADDRESSING WOULD BE TO USE THE REGISTER AS A START OF A TABLE WITH A DISPLACEMENT VALUE AS A POINTER TO AN ELEMENT IN THE TABLE","INDEXED ADDRESSING"
  240 DATA "MANY Z-80 OPCODE INSTRUCTIONS CONTAIN SPECIAL BITS WHICH SPECIFY OTHER REGISTERS OF THE CPU AS THE OPERAND.A SIMPLE EXAMPLE OF THIS ADDRESSING WOULD BE LD B,C","REGISTER ADDRESSING"
  245 DATA "8 BIT REGISTER THAT SUPPORTS AN ADVANCED INTERRUPT HANDLING MODE AVAILABLE ON THE Z-80.WHEN SELECTED IT SUPPLIES THE HIGH ORDER ADDRESS FOR AN INDIRECT CALL TO THE INTERRUPT SERVICE ROUTINE(IVR)","INTERRUPT VECTOR REGISTER"
  250 DATA "REFRESHES DYNAMIC RAMS AUTOMATICALLY WHILE THE Z-80 IS READING OPCODE INSTRUCTIONS.128 INSTRUCTIONS COMPLETELY CYCLES THROUGH ALL SEVEN REFRESH COUNTERVALUES(MRR)","MEMORY REFRESH REGISTER"
  255 DATA "FORM OF ADDRESSING REFERS TO OPERATIONS WHERE THE OPCODE AUTOMATICALLY IMPLIES ONE OR MORE CPU REGISTERS TO BE USED AS OPERANDS.SUCH AS INSTRUCTIONS INVOLVING THE (I) & (R) REGISTERS","IMPLIED ADDRESSING"
  260 DATA "ALLOWS A 16 BIT REGISTER PAIR'HL' TO BE USED AS A POINTER TO ANY LOCATION IN MEMORY.REFERS TO THE CONTENTS OF THE ADDRESS AS IN EXTENDED ADDRESSING .MNEMONICS REQUIRE PARENTHESIS AROUND THE REGISTER.LD A,(HL)NOTE:THE CONTENTS OF THE VALUE IN 16 BIT (HL) ARE LOADED INTO AN 8 BIT REGISTER","REGISTER INDIRECT ADDRESSING"
  265 DATA "LOAD THE A REGISTER WITH THE CONTENTS OF THE MEMORY LOCATION POINTED TO BY A 16 BIT REGISTER.CAN BE USED TO SPECIFY 16 BIT OPERANDS.CONTENTS OF THE LOWEST BYTE ARE POINTED TO FIRST THEN AUTOMATICALLY INCREMENTED TO CONTENTS OF THE HIGH BYTE ADDRESS","REGISTER INDIRECT ADDRESSING"
  270 DATA "THE Z-80 HAS THE ABILITY TO SET,RESET OR TEST ANY BIT WITHIN A CPU REGISTER OR MEMORY LOCATION.ONLY THE SPECIFIED BIT IS AFFECTED OR TESTED.LOCATION CAN BE INDICATED BY USING REGISTER,REGISTER INDIRECT,OR INDEXED ADDRESSING.THE PRECISE BIT IS INDICATED BY THREE BITS OF THE OPCODE","BIT ADDRESSING"
  275 DATA "USED TO INDICATE THAT AN ARITHMETIC OPERATION HAS EXCEEDED THE 8 BIT RANGE AVAILABLE TO THE ACCUMULATOR.IF IT IS SET TO 1,IT INDICATES A CARRY HAS OCCURED OR IN SUBTRACTION IF A BORROW HAS OCCURED.OTHER INSTRUCTIONS SUCH AS SHIFT&ROTATE WILL ALSO EFFECT IT.","CARRY FLAG"
  280 DATA "THE EQUIVALENT OF GOSUB IN BASIC.IT PUSHES THE CONTENTS OF THE PC ONTO THE STACK,AND THEN LOADS PC WITH THE NEXT TWO BYTES IN PROGRAM MEMORY,CAUSING THE Z80 TO EXECUTE FROM THAT ADDRESS.IT CAN BE CONDITIONAL EXPRESSION OR EXPLICIT.","CALL"
  285 DATA "THE VALUE OF THE CARRY FLAG IS INVERTED,ZERO BECOMES ONE AND VICE VERSA.","CCF"
  290 DATA "ITS FIRST ACTION IS TO EXAMINE THE CHARACTERS IN THE EDIT BUFFER AFTER IT HAS BEEN SWITCHED TO THE OPERATING SYSTEM TO PROCESS.IT DETERMINES WHAT TYPE OF COMMAND IS USED AND DIRECTS THE SYSTEM TO THE ROM SECTION THAT PERFORMS THAT PARTICULAR FUNCTION.","PARSER"
  295 DATA "PROGRAM IN ROM THAT TRANSLATES BASIC COMMANDS INTO THE PROPER SEQUENCE OF MACHINE LANGUAGE INSTRUCTIONS.","BASIC INTERPRETER"
  300 DATA "BYTES FROM A PARTICULAR LOCATION IN MEMORY,THE NEXT PROGRAM LOCATION,OR THE GP REGISTERS,ARE SUBTRACTED FROM THE VALUE IN THE ACCUMULATOR,AND THE FLAGS SET ACCORDINGLY;BUT THE ORIGINAL VALUE OF 'A IS RESTORED.","CP"
  305 DATA "THIS IS A COMPLEX INSTRUCTION.IT STANDS FOR COMPARE AND DECREMENT,WHICH IS USEFULL FOR SEARCHING A BLOCK OF MEMORY FOR A BYTE TO TALLY WITH THAT IN THE 'A REGISTER. CPD COMPARES THE BYTE POINTED TO BY 'HL WITH 'A,AND SETS THE ZERO AND SIGN FLAGS ACCORDINGLY:(SIGN=1 IF BIT 7 OF THE RESULT IS HIGH.)THEN THE INSTRUCTION DECREMENTS 'HL AND 'BC,WHICH ACTS AS A COUNTER AND IF IT REACHES ZERO THE P/V (IN THIS CASE OVERFLOW)FLAG IS SET.)","CPD"
  310 DATA "THIS COMMAND BRINGS THE ALTERNATIVE REGISTERS BC'DE'HL' INTO PLAY,AFTER WHICH ANY OPERATIONS ARE DIRECTED TOWARDS THEM.IN ORDER TO REVERT TO THE ORIGINAL SET,SIMPLY USE THIS INSTRUCTION TWICE INSTEAD OF ONCE.","EXX"
  315 DATA "COMPARE AND DEREMENT WITH REPEAT.THIS WILL CONTINUE TO PERFORM CPD UNTIL EITHER BC HAS REACHED ZERO OR THE CP OPERATION HAS SET THE Z FLAG","CPDR"
  320 DATA "COMPARE AND INCREMENT.THIS IS THE SAME AS CPD EXCEPT THAT 'HL HAS 1 ADDED TO IT RATHER THAN SUBTRACTED.","CPI"
  325 DATA "COMPARE AND INCREMENT WITH REPEAT:IT INCREMENTS 'HL.THESE BLOCK SEARHING INSTRUCTIONS ARE VERY USEFULL FOR FINDING DATA OF A PARTICULAR VALUE:ON COMPLETION,'HL WILL EITHER HOLD THE ADDRESS OF THE FIRST MATCH,OR THE END OF THE BLOCK IF NONE WAS FOUND.","CPIR"
  330 DATA "THIS STANDS FOR COMPLIMENT AND APPLIES TO THE 'A REGISTER ONLY.ALL THE BITS ARE INVERTED,THUS   00110101 WOULD BECOME 11001010.","CPL"
  335 DATA "THE PART OF THE CPU WHICH PERFORMS ADDS,SUBTRACTS,SHIFTS,ANDS,ORS,NOTS,AND OTHER ARITHMETIC OR LOGICAL FUNCTIONS IS THE","ARITHMETIC LOGIC UNIT"
  340 DATA "THE REGISTER AND RELATED CIRCUTS THAT HOLD ONE OPERAND FOR THE ARITHMETIC AND LOGICAL OPERATIONS IS CALLED","ACCUMULATOR"
  345 DATA "SUBTRACTS 1 FROM THE VALUE IT IS APPLIED TO. YOU USE IT ON ANY 8 OR 16 BIT REGISTER,OR A BYTE IN MEMORY POINTED TO BY 'HL,OR THE INDEX REGISTERS. ONE IMPORTANT POINT WHICH,IF NOT KNOWN CAN LEAD TO A FRUSTRATING END IS THAT DECREMENTING THE 16 BIT REGISTERS HL'DE'BC' WILL NOT AFFECT THE FLAGS REGISTER.","DEC"
  350 DATA "THIS CAUSES THE CPU TO IGNORE ANY MASKABLE INTERRUPT IT MAY RECIEVE AT ITS INT PIN.","DISABLE INTERRUPT"
  355 DATA "THIS INSTRUCTION CANCELS THE DISABLE INTERRUPT.","EI"
  360 DATA "A CONNECTION TO THE CPU THAT IS CONFIGURED OR PROGRAMMED TO PROVIDE A DATA PATH BETWEEN THE CPU AND OTHER EXTERNAL DEVICES.IT MAY GO IN ONE DIRECTION ONLY OR IT MAY BE BIDIRECTIONAL","INPUT OUTPUT PORT"
  365 DATA "A SEQUENCE OF FOUR BITS OPERATED ON AS A UNIT","NYBBLE"
  370 DATA "A MEMORY BLOCK OR LOCATIONS WHICH IS USED ON A LILO(LAST IN LAST OUT) MANNER.A POINTER IS USED TO SPECIFY THE LAST IN ENTRY OR WHERE THE NEXT IN ENTRY WILL BE PLACED.","STACK"
  375 DATA "A COUNTER OR REGISTER USED TO ADDRESS A STACK IN THE MEMORY","STACK POINTER"
  380 DATA "THE BASIC GROUP OF BITS(OFTEN 8) THAT IS MANIPULATED BY THE COMPUTER IN A SINGLE STEP.TWO TYPES ARE USED,DATA AND INSTRUCTION TYPES.DATA TYPES CONTAIN INFORMATION TO BE MANIPULATED WHILE INSTRUCTION TYPES ALLOW THE MACHINE TO EXECUTIVE A PARTICULAR OPERATION.","BYTE"
  385 DATA "USES REGISTER INDIRECT ADDRESSING.IT STORES THE CONTENTS OF ANY REGISTER PAIR EXCEPT 'SP' INCLUDING COMBINED 'AF' AT THE TOP OF THE MACHINE STACK.IT AUTOMATICALLY DECREASES THE ADDRESS OF THE STACK POINTER BY TWO BECAUSE OF THE ADDITIONAL DATA IN THE MACHINE STACK.WHAT INSTRUCTION?","PUSH"
  390 DATA "ANY ADDRESS OR REGISTER WHERE DATA RESIDES.IN LOGIC OR ARITHMETIC OPERATIONS TWO DATA LOCATIONS CAN BE COMBINED AND TARGETED TO A DESTINATION REGISTER.WHICH REGISTER IS USED PRIMARILY TO HOLD ONE OF THE SOURCE LOCATIONS AND LATER THE RESULT OF THE OPERATION?","ACCUMULATOR"
  395 DATA "WHAT IS THE NAME OF THE INSTRUCTION WHICH SUMS THE ACCUMULATOR WITH THE CONTENTS OF ANOTHER SOURCE LOCATION?","ADD"
  400 DATA "WHAT IS THE NAME OF THE INSTRUCTION WHICH SUMS THE ACCUMULATOR WITH THE CONTENTS OF ANOTHER SOURCE LOCATION AND INCLUDES THE VALUE OF THE CARRY FLAG(BIT) AS WELL","ADC"
  405 DATA "WHAT IS THE NAME OF THE INSTRUCTION WHICH SUBTRACTS THE CONTENTS OF AN ADDRESS OR REGISTER FROM THE VALUE IN THE ACCUMULATOR?","SUB"
  410 DATA "WHAT IS THE NAME OF THE INSTRUCTION WHICH SUBTRACTS THE CONTENTS OF AN ADDRESS OR REGISTER FROM THE VALUE IN THE ACCUMULATOR AND INCLUDES THE VALUE OF THE CARRY FLAG(BIT) AS WELL","SBC"
  415 DATA "WHAT INSTRUCTION WILL CHECK THE BINARY VALUE IN THE ACCUMULATOR WITH VALUES IN ANY OTHER REGISTER OR ADDRESS LOCATION? THE FLAG REGISTER IS AFFECTED AND PROVIDES THE MEANS TO CHECK ONE VALUE AGAINST ANOTHER.USUALLY IT IS FOLLOWED BY A CONDITIONAL JUMP.ITS USES INCLUDE (=, <>, <, >,):NOTE IT WORKS OUT WHAT WOULD HAPPEN IF THE REGISTER OR NUMBER WERE SUBTRACTED FROM THE ACCUMULATOR","CP"
  420 DATA "INSTRUCTION INCREASES THE VALUE HELD IN A REGISTER OR REGISTER PAIR BY ONE.IT WILL ALTER ALL EXCEPT THE CARRY FLAGS IN A 8 BIT REGISTER BUT WILL NOT ALTER FLAGS ON A 16 BIT REGISTER.A JUMP RELATIVE ZERO INST. WILL NOT WORK ON A 8 BIT BUT NOT A 16 BIT REGISTER.","INC"
  425 DATA "INSTRUCTION DECREASES THE VALUE HELD IN A REGISTER OR REGISTER PAIR BY ONE.IT WILL ALTER ALL EXCEPT THE CARRY FLAG IN A 8 BIT REGISTER BUT WILL NOT ALTER FLAGS ON A 16 BIT REGISTER.A JUMP RELATIVE ZERO INST. WILL WORK ON A 8 BIT BUT NOT A 16 BIT REGISTER.","DEC"
  430 DATA "THE VALUE IN A REGISTER OR MEMORY LOCATION CAN BE COMPATED IN THE ALU ON A BIT BY BIT BASIS WITH THE VALUE IN ONLY THE ACCUMULATOR REGISTER.A LOGICAL OPERATION BEING (AND,OR,XOR,NOT)WITH TRUE BEING 1 AND FALSE BEING 0.IN THIS INSTRUCTION ONLY IF BOTH BITS COMPARED ARE TRUE WILL THE FINAL RESULT IN THE ACCUMULATOR BE 1.NOTE:THE CARRY FLAGS ARE SET TO ZERO.","AND"
  435 DATA "THE VALUE IN A REGISTER OR MEMORY LOCATION CAN BE COMPARED IN THE ALU ON A BIT BY BIT BASIS WITH THE VALUE IN ONLY THE ACCUMULATOR REGISTER.A LOGICAL OPERATION BEING (AND,OR,XOR,NOT)WITH TRUE BEING 1 AND FALSE BEING 0.IN THIS INSTRUCTION IF EITHER BITS COMPARED ARE TRUE THEN THE FINAL RESULT IN THE ACCUMULATOR WILL BE 1.NOTE:THE CARRY FLAGS ARE SET TO ZERO.","OR"
  440 DATA "THE VALUE IN A REGISTER OR MEMORY LOCATION CAN BE COMPARED IN THE ALU ON A BIT BY BIT BASIS WITH THE VALUE IN ONLY THE ACCUMULATOR.ANY LOGICAL OPERATION BEING (AND,OR,XOR,NOT)WITH TRUE BEING 1 AND FALSE BEING 0.IN THIS PARTICULAR INSTRUCTION ONLY IF ONE OF THE TWO BITS COMPARED IS TRUE WILL THE RESULT IN THE ACCUMULATOR BE TRUE.1&1,0&0 PRODUCE FALSE.:NOTE THE CARRY FLAGS ARE AFFECTED.","XOR"
  445 DATA "THIS INSTRUCTION PUSHES THE CURRENT ADDRESS ONTO THE STACK AND MODIFIES THE POINTER,THEN LOADS THE PC WITH THE TARGETED ADDRESS FOR A JUMP.THIS INSTRUCTION CAN ALSO BE USED IN A CONDITIONAL FORMAT.","CALL"
  450 DATA "THIS INSTRUCTION POPS TWO BYTES OFF THE STACK AND PLACES THEM IN THE PC ALSO CHANGING THE STACK POINTER AS A RESULT.CONDITION OF THE STACK SHOULD BE NOTED TO PRODUCE THE PROPER ADDRESS IN THE PROGRAM COUNTER.IT CAN ALSO BE USED CONDITIONALLY, BASED ON THE CONDITION OF THE FLAGS.","RET"
  455 DATA "THIS GROUP OF EIGHT INSTRUCTIONS IS USED TO CALL SPECIFIC LOCATIONS IN THE ZERO PAGE OF MEMORY ","RESTART GROUP"
  460 DATA "INSTRUCTION ENABLES THE STATE OF A SINGLE BIT WITHIN ANY REGISTER OR LOCATION TO BE CHANGED TO A '1.THE FLAG REGISTER IS UNAFFECTED BY THE OPERATION","SET"
  465 DATA "INSTRUCTION ENABLES THE STATE OF A SINGLE BIT WITHIN A REGISTER OR MEMORY LOCATION TO BE CHANGED TO A '0.THE FLAG REGISTER IS UNAFFECTED BY THE OPERATION.","RES"
  470 DATA "INSTRUCTION EXAMINES ONE BIT OF A DESIRED LOCATION OR ADDRESS REGISTER VALUE.THE ZERO FLAG IS SET TO '1 IF THE BIT TESTED IS A ZERO.THE ZERO FLAG IS ACTUALLY THE COMPLIMENT OF THE BIT TESTED.IT CAN BE USED TO CREATE AN EXTERNAL FLAG REGISTER IN MEMORY FOR PROGRAM USAGE.","BIT"
  475 DATA "GENERAL GROUP OF FOUR INSTRUCTIONS THAT CAN BE USED WITH ANY REGISTER. THEY CAUSE EACH BIT IN A DATA LOCATION TO MOVE ONE POSITION EITHER TO THE RIGHT OR LEFT.ONE BIT GETS MOVED INTO THE 'C'FLAG.SOMETIMES THIS BIT IS ALSO MOVED INTO THE OPOSITE END OF THE OPERAND.","ROTATE GROUP"
  480 DATA "GENERAL GROUP OF THREE INSTRUCTIONS THAT CAN BE USED WITH ANY REGISTER.EACH BIT IN A DATA LOCATION IS MOVED EITHER TO THE RIGHT OR LEFT ONE POSITION.BITS ARE MOVED INTO THE CARRY FLAG BUT THE BIT MOVED OUT IS LOST.IN A LOGIC OPERATION THE MISSING POSITION WILL BE FILLED WITH A ZERO.IN ARITHMETIC OPERATIONS IT WILL BR FILLED WITH A REPEAT OF THE PREVIOUS VALUE.MOSTLY USED FOR MULTIPLICATION AND DIVISION","SHIFT GROUP"
  485 DATA "A LANGAUGE USING MNEMONICS TO REPRESENT MACHINE CODE OPERATIONS.A LOW-LEVEL LANGAUAGE.","ASSEMBLY LANGUAGE"
  490 DATA "TWO. BASE ARITHMETIC WHERE THE DIGITS ZERO AND ONE ARE USED TO REPRESENT NUMBERS.","BINARY"
  495 DATA "A SYSTEM WHERE A NYBBLE REPRESENTS ONE DECIMAL NUMBER, THEREFORE A BYTE CAN REPRESENT TWO DECIMAL NUMBERS","BINARY CODED DECIMAL"
  500 DATA "A GROUP OF BINARY BITS, USUALLY 8 CONSIDERED AS ONE UNIT.","BYTE"
  505 DATA "THIS ENABLES YOU TO EXCHANGE TWO INDICATED REGISTERS.YOU MAY EXCHANGE DE'HL' WHICH SWOPS THIER CONTENTS; YOU MAY DO THE SAME TO THE TWO BYTES POINTED TO BY THE 'SP WITH THOSE IN 'HL OR THE INDEX REGISTERS: OR YOU CAN SWOP THE ALTERNATE 'AF PAIR.","EX"
  510 DATA "THIS READS A BYTE FROM EXTERNAL CIRCUTS THAT ARE PORT ADDRESSED.IT DOES SO BY PLACING THE PORT ADDRESS ON THE EIGHT LOW ADDRESS LINES MAKING INPUT-OUTPUT REQUEST (IORQ) AND READ (RD) ACTIVE; THEN BY PLACING THE BYTE COLLECTED ON THE DATA BUS TO THE SPECIFIED REGISTER. IT TAKES TWO FORMS 'IN A,(PORT), WHICH HAS THE PORT NUMBER CONTAINED IN THE NEXT BYTE OF THE PROGRAM MEMORY WITH A HOLDING THE RESULT; AND 'IN REG(C), FOR WHICH THE BYTE IN (C) IS USED AS THE PORT ADDRESS, AND 'REG CAN BE ANY GP REGISTER.","IN"
  515 DATA "A CERTAIN ACTION TO BE TAKEN BY THE PROCESSOR. A MACHINE CODE PROGRAM IS MADE UP OF THEM.","INSTRUCTION"
  520 DATA "ADDS ONE TO THE VALUE HELD IN A SPECIFIED REGISTER:THE SAME RULES APPLY FOR DEC.","INC"
  525 DATA "COLLECTION OF INTEGRATED CIRCUTS IN WHICH DATA IS STORED. EACH BINARY BIT IS STORED AS ELECTRICAL SIGNAL WITHIN THE 'IC' IT IS CLASSIFIED AS 'ROM' OR 'RAM' AND ITS SIZE IS MEASURED IN KILOBYTES","MEMORY"
  530 DATA "AN INTEGRATED CIRCUT THAT CONTAINS ALL THE COMPONENTS TO PERFORM THE BASIC DATA PROCESSING OPERATIONS, ALL IN ONE PACKAGE. IT MUST BE CONNECTED TO MEMORY AND INPUT/OUTPUT DEVICES BEFOR IT CAN BE USED.","CPU"
  535 DATA "A MACHINE CODE PROGRAM, PART OF THE SYSTEMS SOFTWARE WHICH ENABLES THE PROCESSOR TO PERFORM THE DATA PROCESSING AND CONTROL FUNCTIONS","OPERATING SYSTEM"
  540 DATA "WHEN USED IN CONJUNCTION WITH MEMORY MEANS 256 BYTES OF MEMORY.","PAGE"
  545 DATA "THE PROGRAM THAT CONSISTS OF MNEMONICS THAT CAN BE UNDERSTOOD BY HUMANS.  THIS PROGRAM CAN NOT BE EXECUTED UNTIL IT IS ASSEMBLED.","SOURCE PROGRAM"
  550 DATA "THIS FLAG IS SET TO ONE IF THE RESULT OF ANY SINGLE REGISTER ARITHMETIC OPERATION IS ZERO.OTHERWISE IT IS SET TO ZERO.IT IS ONLY AFFECTED BY DOUBLE REGISTER ARITHMETIC OPERATIONS INVOLVING THE CARRY FLAG i.e. ADC HL,DD  OR SBC HL,DD. LIKE THE CARRY FLAG,IT IS UNAFFECTED BY ANY LD OR EX INSTRUCTIONS.","ZERO FLAG"
  555 DATA "THE PROCESSOR TESTS THE STATE OF A FLAG (SET OR NOT SET)BEFORE PERFORMING A JUMP TO A SPECIFIED ADDRESS. THE ASSEMBLER INSTRUCTIONS ARE (JPNC,JP C,JPNZ,JP Z). ONE OF THESE FLAGS IS THE CARRY FLAG.WHAT IS THE OTHER FLAG?","ZERO FLAG"
  560 DATA "WHAT REGISTER PAIR IS USED WITH THE JUMP INSTRUCTION TO PERFORM AN INDIRECT JUMP?","HL"
  565 DATA "THE ADVANTAGE IN THIS TYPE OF JUMP INSTRUCTION IS THAT THE DIFFERENCE BETWEEN THE CURRANT CONTENTS OF THE PC REGISTER AND THE ADDRESS TO BE JUMPED TO ARE SPECIFIED IN THE INSTRUCTION.IT IS LIMITED TO JUMPING BACKWARDS 128 LOCATIONS,AND FORWARDS 127 LOCATIONS.ASSEMBLY INSTRUCTIONS ARE (JR,JR NC,JR C,JR NZ,JR Z, AND ALSO DJNZ).WHAT DOES THE 'R' STAND FOR?","RELATIVE"
  570 DATA "",""
  575 DATA "",""
  580 DATA "",""
  990 STOP 
 1000 FOR X=1 TO 150
 1200 LET c=INT ((RND*183)*(RND*3)+70)
 1300 PRINT C;"  ";
 1400 NEXT X
 1450 STOP 
 1500 SAVE "opcode" LINE 1
Scroll to Top