Author Topic: Port code not working  (Read 2438 times)


  • Member
  • *****
  • Posts: 2354
Port code not working
« on: February 16, 2013, 04:40:19 AM »
It would be interesting if this could work under XP.

Code: [Select]
;     Blink.asm- the keyboard LED's
;     Works thru Win 98
        cseg segment
        assume cs:cseg
        org 100h                ;  COM format
        sub ax,ax               ;  set DS to 0000
        mov ds,ax
        mov cx,0fh              ;  number of times to cycle

        mov bx,0417h            ;  Pointing to 0000:0417
        mov byte ptr [bx],16d   ;  Turn only Scroll Lock ON
        call Delay
        mov byte ptr [bx],64d   ;  Turn only Caps Lock ON
        call Delay
        mov byte ptr [bx],32d   ;  Turn only Num Lock ON
        call Delay

        loop Blink              ;  Loop 15 times then
        mov ax,4C00h            ;  exit to DOS.
        int 21h                 ;
        mov ah,01h              ;  update the BIOS and
        int 16h                 ;  turn the LED's on.

        push cx
        mov cx,0A000h
        in al,4Fh               ;  Port 4Fh is used for
        loop lo1                ;  a do-nothing delay.
        pop cx

        cseg ends
        end  Start

Take care,