Skip to content

Commit

Permalink
Change help text to display correct addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
phummel authored Feb 16, 2020
1 parent 40d7764 commit 348b494
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/rars/tools/DigitalLabSim.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import rars.Globals;
import rars.riscv.hardware.*;
import rars.util.Binary;

import javax.swing.*;
import java.awt.*;
Expand Down Expand Up @@ -129,20 +130,20 @@ protected JComponent getHelpComponent() {
final String helpContent =
" This tool is composed of 3 parts : two seven-segment displays, an hexadecimal keyboard and counter \n" +
"Seven segment display\n" +
" Byte value at address 0xFFFF0010 : command right seven segment display \n " +
" Byte value at address 0xFFFF0011 : command left seven segment display \n " +
" Byte value at address " + Binary.intToHexString(IN_ADRESS_DISPLAY_1) + " : command right seven segment display \n " +
" Byte value at address " + Binary.intToHexString(IN_ADRESS_DISPLAY_2) + " : command left seven segment display \n " +
" Each bit of these two bytes are connected to segments (bit 0 for a segment, 1 for b segment and 7 for point \n \n" +
"Hexadecimal keyboard\n" +
" Byte value at address 0xFFFF0012 : command row number of hexadecimal keyboard (bit 0 to 3) and enable keyboard interrupt (bit 7) \n" +
" Byte value at address 0xFFFF0014 : receive row and column of the key pressed, 0 if not key pressed \n" +
" Byte value at address " + Binary.intToHexString(IN_ADRESS_HEXA_KEYBOARD) + " : command row number of hexadecimal keyboard (bit 0 to 3) and enable keyboard interrupt (bit 7) \n" +
" Byte value at address " + Binary.intToHexString(OUT_ADRESS_HEXA_KEYBOARD) + " : receive row and column of the key pressed, 0 if not key pressed \n" +
" The program has to scan, one by one, each row (send 1,2,4,8...)" +
" and then observe if a key is pressed (that mean byte value at adresse 0xFFFF0014 is different from zero). " +
" This byte value is composed of row number (4 left bits) and column number (4 right bits)" +
" Here you'll find the code for each key : 0x11,0x21,0x41,0x81,0x12,0x22,0x42,0x82,0x14,0x24,0x44,0x84,0x18,0x28,0x48,0x88. \n" +
" For exemple key number 2 return 0x41, that mean the key is on column 3 and row 1. \n" +
" If keyboard interruption is enable, an external interrupt is started with value 0x00000200\n \n" +
"Counter\n" +
" Byte value at address 0xFFFF0013 : If one bit of this byte is set, the counter interruption is enabled.\n" +
" Byte value at address " + Binary.intToHexString(IN_ADRESS_COUNTER) + " : If one bit of this byte is set, the counter interruption is enabled.\n" +
" If counter interruption is enable, every 30 instructions, a timer interrupt is started with value 0x00000100.\n" +
" (contributed by Didier Teifreto, dteifreto@lifc.univ-fcomte.fr)";
JButton help = new JButton("Help");
Expand Down Expand Up @@ -380,4 +381,4 @@ public void resetOneSecondCounter() {
CounterValue = CounterValueMax;
}
}
}
}

0 comments on commit 348b494

Please sign in to comment.