3/28/2016

CorePy (Python Assembly language on EFI Shell)

Sample code name
https://github.com/EfiPy/EfiPy2/blob/main/Efi/Apps/CorepySample/asm.py

Description
For low level controlling by Python language in UEFI shell environment, EfiPy2 leverages another open source project CorePy.

Sample Code: output 0xAA to port 0x80
1. Download latest EfiPy from https://github.com/EfiPy/EfiPy2
2. Copy Disk/EFI folder to boot device, which does not includes bootable shell, yet.
3. Copy asm.py to EFI/Tools.
4. Boot into shell and change working folder to fsx:\EFI\tools
5. Run "Python.efi asm.py"

Source code
code.add(x86.mov(dx, 0x80))
code.add(x86.mov(ax, 0xaa))
code.add(x86.out(dx, ax))

proc.execute(code)


Result



3/06/2016

PanelTest.py and its demo video on YouTube

Introduction
This is simple python program which demos how PanelTest.py run in UEFI shell, and how the program result is after python script is edited immediately in shell.


Source code
PanelTest.py. Also, each test item in PanelTest.py is split out... PanelFont.pyPanelGrid.py and PanelRuler.py