From eb0e3bab1ed5aa09e491641f427a5d637fe688bd Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 31 Jul 2016 04:20:48 +0300 Subject: tests/machine_mem.py: Too non-portable, rework as an example for unix port. --- examples/unix/machine_bios.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 examples/unix/machine_bios.py (limited to 'examples/unix/machine_bios.py') diff --git a/examples/unix/machine_bios.py b/examples/unix/machine_bios.py new file mode 100644 index 0000000000..f62e4dbdb4 --- /dev/null +++ b/examples/unix/machine_bios.py @@ -0,0 +1,9 @@ +# This example shows how to access Video BIOS memory area via machine.mem +# It requires root privilege and x86 legacy harfware (which has mentioned +# Video BIOS at all). +# It is expected to print 0xaa55, which is a signature at the start of +# Video BIOS. + +import umachine as machine + +print(hex(machine.mem16[0xc0000])) -- cgit v1.2.3