LCD library

floresta is on the money with the hex values representing the bit patterns.
to make things easier for me to compare with the data sheet I used the B macros to expose the bits.

I defined the instructions like this code below. Very easy to match with datasheet instruction tables.
My display is in 8 bit mode so each bit is a different pin of the set DB0-DB7 ( right to left )

  #define ST7920_CMD_CLEAR       B00000001  //   0x01 - Clear Display
  
  #define ST7920_CMD_HOME        B00000010  //   0x02 - Move Cursor Home
  
  #define ST7920_CMD_EM          B00000100  //   0x04 - Entry Mode Base
  #define ST7920_CMD_EM_INCRR    B00000010  //   0x02 - Increment Cursor Right
  #define ST7920_CMD_EM_INCRL    B00000000  //   0x00 - Increment Cursor Left
  #define ST7920_CMD_EM_SHFTR    B00000011  //   0x03 - Shift Display Right
  #define ST7920_CMD_EM_SHFTL    B00000001  //   0x01 - Shift Display Left

And the 0x1 is a number in base 16 rather than decimal ( base 10 )

0x specifies a hexadecimal number