.segment "ZEROPAGE" PAD_STATE: .res 2 ;one byte per controller PAD_STATEP: .res 2 PAD_STATET: .res 2 .importzp TEMP PAD_BUF =TEMP+1 .include "nes.inc" .segment "CODE" .export _pad_poll, _pad_trigger, _pad_state ;unsigned char __fastcall__ pad_poll(unsigned char pad); _pad_poll: tay ldx #0 @padPollPort: lda #1 sta CTRL_PORT1 lda #0 sta CTRL_PORT1 lda #8 sta