*Very* new to ASM. Where to start?

Pagina 5/5
1 | 2 | 3 | 4 |

Van KdL

Paragon (1414)

afbeelding van KdL

27-09-2005, 01:16

---------------------------------------------------------------------------
          text mode:
---------------------------------------------------------------------------


          ORG $C000

SPACE:    CALL $9F       ; CHGET (we obtain a reset of key buffer)
          LD A,($FBED)
          BIT 0,A      
          JP NZ,SPACE    ; space off   ($FBED) = xxxxxxx1
                         ; space on    ($FBED) = xxxxxxx0
          RET            ; exit


---------------------------------------------------------------------------
          graphic mode:
---------------------------------------------------------------------------


          ORG $C000

          LD A,5
          CALL $5F       ; screen 5

SPACE:    CALL $9F       ; CHGET (we obtain a reset of key buffer)
          LD A,($FBED)
          BIT 0,A      
          JP NZ,SPACE    ; space off   ($FBED) = xxxxxxx1
                         ; space on    ($FBED) = xxxxxxx0
          XOR A
          JP $5F         ; screen 0 & exit


---------------------------------------------------------------------------

BYe~BYe Cool KdL

Van KdL

Paragon (1414)

afbeelding van KdL

27-09-2005, 02:44

A trick...

---------------------------------------------------------------------------
          for text or graphic mode:
---------------------------------------------------------------------------

          ORG $C000

          CALL $10D9   ;press any valid key & exit to screen 0
                       ;equal to the 'PAUSE' command of MSXDOS

---------------------------------------------------------------------------

...grabbed with blueMSX debugger!

Wink KdL

Van BiFi

Enlighted (4348)

afbeelding van BiFi

27-09-2005, 06:55

which in (quite) some cases might fail on other systems since it's a non-official call.

Pagina 5/5
1 | 2 | 3 | 4 |