Design a simplified virtual machine or compiler interpreter that can parse and execute a basic set of custom assembly instructions.
Implement execute_program(program, max_steps), where program is a list of assembly source lines and the result is a list of integers produced by PRINT. Support registers R0 through R7, integer literals, and these instructions: MOV Rn value, ADD Rn value, SUB Rn value, INC Rn, DEC Rn, JMP label, JZ Rn label, JNZ Rn label, PRINT value, and HALT. Labels appear alone on a line followed by a colon. Ignore blank lines and text after #. Programs are valid and halt within max_steps instructions.
def execute_program(program, max_steps):