⇐ Home

byron's stuff: selected assembler interrupts

here's some of my favourite x86 assembler interrupts. i hope that you enjoy these as much as i do.

read light pen position - int 10h service 4

input

AH = 4

output

AH = 0  light pen switch not down
AH = 1  DH, DL = row, column of light pen position
        CH = raster line (vertical) 0 - 199
        BX = pixel column (horizontal) 0 - 319, 639

park heads ps/2 only - int 13h service 19h

input

DL = drive number

output

carry = 0  success
carry = 1  error : AH = error code

cassette i/o - int 15h

input

AH = 0  turn cassette motor on
AH = 1  turn cassette motor off
AH = 2  read one or more 256 byte blocks.
        store data at ES:BX
        CX = count of bytes to read
AH = 3  write one or more 256 byte blocks from ES:BX
        count of bytes to write in CX

output

DX = number of bytes actually read. carry flag set if error
carry = 1
    AH = 1  crc error
    AH = 2  data transitions lost
    AH = 4  no data found

resident basic - int 18h

this interrupt starts up rom-resident basic in the pc

last modified : Tuesday, 22-Mar-2011 12:21:38 WST