Skip to main content
added 63 characters in body
Source Link
Martin Rosenau
  • 2.1k
  • 10
  • 17

MS-DOS .COM file, 56 bytes

Here the file content in hexadecimal:

b4 09 ba 2c 01 cd 21 b2 2f e8 11 00 b2 2d e8 0c
00 b2 5c e8 07 00 b2 7c e8 02 00 eb ea b4 02 cd
21 b2 08 cd 21 b9 05 00 f4 e2 fd c3 4c 6f 61 64
69 6e 67 2e 2e 2e 20 24

The matching assembler code looks like this:

    mov ah, 9      ; Print "Loading... "
    mov dx, text
    int 21h
theloop:
    mov dl, '/'    ; Call "chrout" for "/", "-", "\" and "|"
    call chrout
    mov dl, '-'
    call chrout
    mov dl, '\'
    call chrout
    mov dl, '|'
    call chrout
    jmp theloop    ; Endless loop

chrout:            ; Sub-Function "chrout"
    mov ah, 2      ; Output the character
    int 21h
    mov dl, 8      ; Output backspace
    int 21h
    mov cx,5       ; Call "HLT" 5 times
timeloop:
    hlt            ; Normally HLT will wait 18.2~55 milliseconds
                   ; (Assuming no keyboard key is pressed)
    loop timeloop
    ret            ; End of the function

text:
    ASCII "Loading... ",'$'

MS-DOS .COM file, 56 bytes

Here the file content in hexadecimal:

b4 09 ba 2c 01 cd 21 b2 2f e8 11 00 b2 2d e8 0c
00 b2 5c e8 07 00 b2 7c e8 02 00 eb ea b4 02 cd
21 b2 08 cd 21 b9 05 00 f4 e2 fd c3 4c 6f 61 64
69 6e 67 2e 2e 2e 20 24

The matching assembler code looks like this:

    mov ah, 9      ; Print "Loading... "
    mov dx, text
    int 21h
theloop:
    mov dl, '/'    ; Call "chrout" for "/", "-", "\" and "|"
    call chrout
    mov dl, '-'
    call chrout
    mov dl, '\'
    call chrout
    mov dl, '|'
    call chrout
    jmp theloop    ; Endless loop

chrout:            ; Sub-Function "chrout"
    mov ah, 2      ; Output the character
    int 21h
    mov dl, 8      ; Output backspace
    int 21h
    mov cx,5       ; Call "HLT" 5 times
timeloop:
    hlt            ; Normally HLT will wait 18.2 milliseconds
    loop timeloop
    ret            ; End of the function

text:
    ASCII "Loading... ",'$'

MS-DOS .COM file, 56 bytes

Here the file content in hexadecimal:

b4 09 ba 2c 01 cd 21 b2 2f e8 11 00 b2 2d e8 0c
00 b2 5c e8 07 00 b2 7c e8 02 00 eb ea b4 02 cd
21 b2 08 cd 21 b9 05 00 f4 e2 fd c3 4c 6f 61 64
69 6e 67 2e 2e 2e 20 24

The matching assembler code looks like this:

    mov ah, 9      ; Print "Loading... "
    mov dx, text
    int 21h
theloop:
    mov dl, '/'    ; Call "chrout" for "/", "-", "\" and "|"
    call chrout
    mov dl, '-'
    call chrout
    mov dl, '\'
    call chrout
    mov dl, '|'
    call chrout
    jmp theloop    ; Endless loop

chrout:            ; Sub-Function "chrout"
    mov ah, 2      ; Output the character
    int 21h
    mov dl, 8      ; Output backspace
    int 21h
    mov cx,5       ; Call "HLT" 5 times
timeloop:
    hlt            ; Normally HLT will wait ~55 milliseconds
                   ; (Assuming no keyboard key is pressed)
    loop timeloop
    ret            ; End of the function

text:
    ASCII "Loading... ",'$'
Source Link
Martin Rosenau
  • 2.1k
  • 10
  • 17

MS-DOS .COM file, 56 bytes

Here the file content in hexadecimal:

b4 09 ba 2c 01 cd 21 b2 2f e8 11 00 b2 2d e8 0c
00 b2 5c e8 07 00 b2 7c e8 02 00 eb ea b4 02 cd
21 b2 08 cd 21 b9 05 00 f4 e2 fd c3 4c 6f 61 64
69 6e 67 2e 2e 2e 20 24

The matching assembler code looks like this:

    mov ah, 9      ; Print "Loading... "
    mov dx, text
    int 21h
theloop:
    mov dl, '/'    ; Call "chrout" for "/", "-", "\" and "|"
    call chrout
    mov dl, '-'
    call chrout
    mov dl, '\'
    call chrout
    mov dl, '|'
    call chrout
    jmp theloop    ; Endless loop

chrout:            ; Sub-Function "chrout"
    mov ah, 2      ; Output the character
    int 21h
    mov dl, 8      ; Output backspace
    int 21h
    mov cx,5       ; Call "HLT" 5 times
timeloop:
    hlt            ; Normally HLT will wait 18.2 milliseconds
    loop timeloop
    ret            ; End of the function

text:
    ASCII "Loading... ",'$'