Demo entry 5281516

asm

   

Submitted by anonymous on Jun 14, 2016 at 07:49
Language: Asymptote. Code size: 1.2 kB.

SSTACK SEGMENT STACK
  DW 256 DUP(?)
SSTACK ENDS
DATA SEGMENT

DATA ENDS
CODE SEGMENT
  ASSUME CS:CODE,DS:DATA,SS:SSTACK

  DELAY PROC NEAR
    PUSH BX
    PUSH CX
    MOV BX,10
    LOP1:
      MOV CX,2800H
    LOP2:
      DEC CX
      JNZ LOP2
      DEC BX
      JNZ LOP1
      POP CX
      POP BX
      RET
  DELAY ENDP

  START: 
    MOV AX,DATA
    MOV DS,AX
    MOV AL,00H
    MOV DX,0640H
    OUT DX,AL
    MOV DX,0600H
    OUT DX,AL
    MOV AL,0FFH
    MOV DX,06C0H
    OUT DX,AL
    MOV DX,0680H
    OUT DX,AL
    MOV BL,00000001B
    MOV BH,11111110B
    MOV CX,08H
  L1:
    MOV DX, 0600H
    MOV AL,BL
    OUT DX,AL
    SHL BL,1
    MOV DX,0680H
    MOV AL,BH
    OUT DX,AL
    ROL BH,1
    CALL DELAY
    LOOP L1
    MOV AL,00H
    MOV DX,0600H
    OUT DX,AL
    MOV DX,0640H
    OUT DX,AL
    MOV AL,0FFH
    MOV DX,0680H
    OUT DX,AL
    MOV DX,06C0H
    OUT DX,AL
    MOV BL,00000001B
    MOV BH,11111110B
    MOV CX,08H
  L2: 
    MOV DX, 0640H
    MOV AL,BL
    OUT DX,AL
    SHL BL,1
    MOV DX,06C0H
    MOV AL,BH
    OUT DX,AL
    ROL BH,1
    CALL DELAY
    LOOP L2
    JMP START
    MOV AH,4CH
    INT 21H
  END START
CODE ENDS

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).