URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
[/] [or1k/] [trunk/] [rtems-20020807/] [c/] [src/] [lib/] [libbsp/] [i386/] [ts_386ex/] [tools/] [dos_sup/] [ts1325.inc] - Rev 1765
Compare with Previous | Blame | View Log
; Some nasm macros to turn on TS-1325 LEDs and wait for button presses.; This should be '%include'ed in your nasm source file.;; Tony AmbardarP1LTC equ 0F862hP1PIN equ 0F860h%macro LED_OFF 0mov dx, P1LTCin al, dxor al, 01000000b ; turn off redand al, 11011111b ; turn off greenout dx, al%endmacro%macro LED_GRN 0mov dx, P1LTCin al, dxor al, 01100000b ; turn off red, turn on greenout dx, al%endmacro%macro LED_YEL 0mov dx, P1LTCin al, dxor al, 00100000b ; turn on greenand al, 10111111b ; turn on redout dx, al%endmacro%macro LED_RED 0mov dx, P1LTCin al, dxand al, 10011111b ; turn on red, turn off greenout dx, al%endmacro%macro PSW_WAIT 0mov dx, P1PIN ; Get PSW statemov ecx, 80000h%%read in al, dxtest al, 00000001b ; is PSW asserted?jnz %%read ; if not, we're donedec ecxjnz %%read%endmacro
