# Check to see if a start address was added. if args.startaddr: # Check to see if the address is valid. intval = int(args.startaddr, 16) if intval < 1 or intval > 65535: raise ValueError # Set up disassembler. handler = Disassembler(infile, outfile, intval, args.counter, args.program) # Disassemble file. handler.disassemble() elif args.execute or args.debug: # Check to see if a start address was added. if args.startaddr: # Check to see if the address is valid. intval = int(args.startaddr, 16) if intval < 1 or intval > 65535: raise ValueError # Set up processor. handler = Processor(infile, outfile, intval, args.counter, args.debug, args.program)