Note: This is the June 17, 2006 capture of http://bentong.topcities.com/comp/progs/asm/testbin.htm from the Wayback Machine. This was uploaded to the reloaded ISLESV.NET on June 22, 2023.

; Program TESTBIN.ASM: Test the DISPBIN display procedure.
;
; This file Copyright (C) 2004 by Vincent "Bentong" S. Isles
;				  http://bentong.topcities.com
;				  bentong_isles@yahoo.com
        .MODEL  SMALL
        .CODE

        EXTRN  DISPBIN:NEAR              ; it's not in this file, and use 32
                                        ; bit addressing!
        ORG     100H

MAIN    PROC    NEAR
        MOV     AL,05H                  ; five counts of rape...
AGAIN:  PUSH    AX                      ; save counter
        CALL    DISPBIN                 ; display our counter in binary
        MOV     DL,20H                  ; load blank character
        MOV     AH,02H                  ; disp char
        INT     21H
        MOV     AH,02H                  ; again
        INT     21H
        POP     AX                      ; get counter back
        DEC     AL
        JNZ     AGAIN                   ; repeat until counter equals zero
        INT     20H
MAIN    ENDP

        END     MAIN                    ; start at main

Leave a Reply

Your email address will not be published. Required fields are marked *