예제 #1
0
파일: hp5370.py 프로젝트: bsdphk/PyRevEng
def hpib_cmd_table(p, adr, len = 26):
	p.hpib_cmd = list()
	x = p.t.add(adr, adr + 2 * len, "cmd-table")
	x.blockcmt += "-\nTable of two-letter HPIB commands\n"
	for i in range(adr, adr + 2 * len, 2):
		const.txtlen(p,i,2)
		p.hpib_cmd.append([p.m.ascii(i, 2),])
예제 #2
0
dot_24bit(p, 0x6b29, 1, "%d")
dot_24bit(p, 0x6b2c, 1, "%d")
dot_24bit(p, 0x6b2f, 1, "%d")

#######################################################################
x = p.t.add(0x6b32,0x6b3b, "tbl")
x.blockcmt += "Table sqrt(1k,10k,100k)\n"
dot_24bit(p, 0x6b32, 1, "%d")
dot_24bit(p, 0x6b35, 1, "%d")
dot_24bit(p, 0x6b38, 1, "%d")

#######################################################################

#######################################################################

const.txtlen(p,0x78f3,4)
const.txtlen(p,0x78f7,6)
const.txtlen(p,0x78fd,2)

p.setlabel(0x77d9, "OUT_STRINGS")
for i in range(0x77d9, 0x77f9, 4):
	const.txtlen(p,i,4)

const.ptr(p, 0x7915, 2)

#######################################################################

hp5370.chargen(p, 0x7e29)
hp5370.hpib_cmd_table(p, 0x7c5d)
hp5370.keyboard_dispatch(p, cpu)
hp5370.hpib_arg_range(p, 0x7d65)
예제 #3
0
파일: task.py 프로젝트: bsdphk/PyRevEng
	def lstr(p, a):
		const.w16(p, a)
		const.txtlen(p, a + 2, p.m.b16(a))
예제 #4
0
파일: task.py 프로젝트: bsdphk/PyRevEng
	p.setlabel(y, v[0])
	v = v[1:]

###############
# hd/fd function pointer table

if True:
	p.setlabel(0x01000006, "fd_boot_string")
	p.setlabel(0x0100000a, "hd_boot_string")
	p.setlabel(0x010005a2, "hd_fd_table")
	p.setlabel(0x010005ba, "hd_fd_table_end")
	p.setlabel(0x0100123a, "wdread_drv")
	p.setlabel(0x0100123c, "wdread_ptr")
	p.setlabel(0x1768, "char *Boot(char *)")
	for a in range(0x010005a2, 0x010005ba, 12):
		const.txtlen(p, a, 2)
		const.w32(p, a + 2)
		cpu.disass(p.m.b32(a + 2))
		const.w32(p, a + 6)
		cpu.disass(p.m.b32(a + 6))
	while p.run():
		pass

	# Calls through hd/fd table @ 01:05a2
	#
	cpu.ins[0x1920].flow("call", "X", 0x10ce)
	cpu.ins[0x1ebc].flow("call", "X", 0x11a6)
	cpu.ins[0x1f46].flow("call", "X", 0x11a6)
	cpu.ins[0x201c].flow("call", "X", 0x11a6)

###############
예제 #5
0
파일: task.py 프로젝트: sahwar/PyRevEng
    p.setlabel(y, v[0])
    v = v[1:]

###############
# hd/fd function pointer table

if True:
    p.setlabel(0x01000006, "fd_boot_string")
    p.setlabel(0x0100000a, "hd_boot_string")
    p.setlabel(0x010005a2, "hd_fd_table")
    p.setlabel(0x010005ba, "hd_fd_table_end")
    p.setlabel(0x0100123a, "wdread_drv")
    p.setlabel(0x0100123c, "wdread_ptr")
    p.setlabel(0x1768, "char *Boot(char *)")
    for a in range(0x010005a2, 0x010005ba, 12):
        const.txtlen(p, a, 2)
        const.w32(p, a + 2)
        cpu.disass(p.m.b32(a + 2))
        const.w32(p, a + 6)
        cpu.disass(p.m.b32(a + 6))
    while p.run():
        pass

    # Calls through hd/fd table @ 01:05a2
    #
    cpu.ins[0x1920].flow("call", "X", 0x10ce)
    cpu.ins[0x1ebc].flow("call", "X", 0x11a6)
    cpu.ins[0x1f46].flow("call", "X", 0x11a6)
    cpu.ins[0x201c].flow("call", "X", 0x11a6)

###############
예제 #6
0
	cpu.disass(da)
	const.w16(p, i)

#######################################################################

while p.run():
	pass

#######################################################################

cpu.to_tree()

#######################################################################

p.setlabel(0x7000, "Error_No_System_Files")
const.txtlen(p, 0x707d, 0x15)
# p.setlabel(0x707d, '"**NO SYSTEM FILES**"')

#######################################################################

p.setlabel(0x701e, "Error_No_Diskette_Nor_Lineprog")
const.txtlen(p, 0x7092, 0x1e)
#p.setlabel(0x7092, '"**NO DISKETTE NOR LINEPROG**"')

#######################################################################

p.setlabel(0x700f, "Error_No_Katalog")
const.txtlen(p, 0x70b0, 0x10)
#p.setlabel(0x70b0, '"**NO KATALOG**"')

#######################################################################
예제 #7
0
	def rfunc(self, p, t):
		s = ".FLOAT\t%e" % float(self.nbr)
		return (s,)

#----------------------------------------------------------------------
for i in range(0x7f03, 0x7fa3, 8):
	dot_float(p, i)
#----------------------------------------------------------------------
const.byte(p, 0x7fa3, 7)
const.byte(p, 0x7faa, 7)
const.byte(p, 0x7fb1, 7)
const.byte(p, 0x7fb8, 7)
#----------------------------------------------------------------------
for ax in range(0x6225,0x6287,2):
	x = const.txtlen(p, ax, 2)
	if ax < 0x624d:
		continue
	a2 = ax - 0x624d + 0x6287
	y = p.m.b16(a2)
	tt = x.txt
	if tt[1:] == "\\x00":
		tt = tt[:1]
	if tt[0] == "a":
		tt = "EC" + tt[1:]
	print("%04x" % ax, "%04x" % a2, "%04x" % y, tt)
	p.setlabel(y, "CMD_" + tt)
x = p.t.add(0x6225,0x6287, "tbl")
p.setlabel(0x6225, "CMD_TABLE")

#----------------------------------------------------------------------