Skip to main content
added 73 characters in body
Source Link
640KB
  • 11.9k
  • 2
  • 35
  • 57

x86-16 machine code, IBM PC DOS, 13 10 bytes

00000000: b04c cd29 0c20 3403 ebf8                 .L.). 4...

Listing:

B0 4C       MOV  AL, 'L'        ; start off with capital L
        PRINT:
CD 29       INT  29H            ; write to console
0C 20       OR   AL, 20H        ; lowercase it
34 03       XOR  AL, 3          ; swap between 'l' (0x6c) and 'o' (0x6f)
EB F8       JMP  PRINT          ; loop forever

Try it online!

A standalone PC DOS executable COM program. Output to console.

-3 bytes thx to @nununoisy's very clever use of XOR to swap between l and o.

Runtime:

enter image description here

Forever and ever...

x86-16 machine code, IBM PC DOS, 13 10 bytes

00000000: b04c cd29 0c20 3403 ebf8                 .L.). 4...

Listing:

B0 4C       MOV  AL, 'L'        ; start off with capital L
        PRINT:
CD 29       INT  29H            ; write to console
0C 20       OR   AL, 20H        ; lowercase it
34 03       XOR  AL, 3          ; swap between 'l' (0x6c) and 'o' (0x6f)
EB F8       JMP  PRINT          ; loop forever

A standalone PC DOS executable COM program. Output to console.

-3 bytes thx to @nununoisy's very clever use of XOR to swap between l and o.

Runtime:

enter image description here

Forever and ever...

x86-16 machine code, IBM PC DOS, 13 10 bytes

00000000: b04c cd29 0c20 3403 ebf8                 .L.). 4...

Listing:

B0 4C       MOV  AL, 'L'        ; start off with capital L
        PRINT:
CD 29       INT  29H            ; write to console
0C 20       OR   AL, 20H        ; lowercase it
34 03       XOR  AL, 3          ; swap between 'l' (0x6c) and 'o' (0x6f)
EB F8       JMP  PRINT          ; loop forever

Try it online!

A standalone PC DOS executable COM program. Output to console.

-3 bytes thx to @nununoisy's very clever use of XOR to swap between l and o.

Runtime:

enter image description here

Forever and ever...

deleted 1 character in body
Source Link
640KB
  • 11.9k
  • 2
  • 35
  • 57

x86-16 machine code, IBM PC DOS, 13 10 bytes

00000000: b04c cd29 0c20 3403 ebf8                 .L.). 4...

Listing:

B0 4C       MOV  AL, 'L'        ; start off with capital L
        PRINT:
CD 29       INT  29H            ; write to console
0C 20       OR   AL, 020H20H        ; lowercase it
34 03       XOR  AL, 3          ; swap between 'l' (0x6c) and 'o' (0x6f)
EB F8       JMP  PRINT          ; loop forever

A standalone PC DOS executable COM program. Output to console.

-3 bytes thx to @nununoisy's very clever use of XOR to swap between l and o.

Runtime:

enter image description here

Forever and ever...

x86-16 machine code, IBM PC DOS, 13 10 bytes

00000000: b04c cd29 0c20 3403 ebf8                 .L.). 4...

Listing:

B0 4C       MOV  AL, 'L'        ; start off with capital L
        PRINT:
CD 29       INT  29H            ; write to console
0C 20       OR   AL, 020H       ; lowercase it
34 03       XOR  AL, 3          ; swap between 'l' (0x6c) and 'o' (0x6f)
EB F8       JMP  PRINT          ; loop forever

A standalone PC DOS executable COM program. Output to console.

-3 bytes thx to @nununoisy's very clever use of XOR to swap between l and o.

Runtime:

enter image description here

Forever and ever...

x86-16 machine code, IBM PC DOS, 13 10 bytes

00000000: b04c cd29 0c20 3403 ebf8                 .L.). 4...

Listing:

B0 4C       MOV  AL, 'L'        ; start off with capital L
        PRINT:
CD 29       INT  29H            ; write to console
0C 20       OR   AL, 20H        ; lowercase it
34 03       XOR  AL, 3          ; swap between 'l' (0x6c) and 'o' (0x6f)
EB F8       JMP  PRINT          ; loop forever

A standalone PC DOS executable COM program. Output to console.

-3 bytes thx to @nununoisy's very clever use of XOR to swap between l and o.

Runtime:

enter image description here

Forever and ever...

-3 bytes thx to nununoisy
Source Link
640KB
  • 11.9k
  • 2
  • 35
  • 57

x86-16 machine code, IBM PC DOS, 1313 10 bytes

00000000: b04c cd29 b86f0c20 6ccd3403 2986ebf8 e0eb fa               .L.).ol.). 4...

Listing:

 B0 4C          MOV  AL, 'L'        ; start off with capital L 
 CD 29      PRINT:
CD 29       INT  29H            ; write to console 
 B80C 6F6C20       OR MOV  AXAL, 'lo'020H       ; AH = 'l', AL = 'o' 
            PRINT:lowercase it
 CD 29          INT  29H   34 03       XOR ; write AL to console 
 86 E0          XCHG AH, AL3          ; swap between 'l' (0x6c) and 'o' (0x6f)
 EB FA   F8       JMP  PRINT          ; loop forever

A standalone PC DOS executable COM program. Output to console.

-3 bytes thx to @nununoisy's very clever use of XOR to swap between l and o.

Runtime:

enter image description here

Forever and ever...

x86-16 machine code, IBM PC DOS, 13 bytes

00000000: b04c cd29 b86f 6ccd 2986 e0eb fa         .L.).ol.)....

Listing:

 B0 4C          MOV  AL, 'L'        ; start off with capital L 
 CD 29          INT  29H            ; write to console 
 B8 6F6C        MOV  AX, 'lo'       ; AH = 'l', AL = 'o' 
            PRINT: 
 CD 29          INT  29H            ; write AL to console 
 86 E0          XCHG AH, AL         ; swap 'l' and 'o' 
 EB FA          JMP  PRINT          ; loop forever

A standalone PC DOS executable COM program. Output to console.

Runtime:

enter image description here

Forever and ever...

x86-16 machine code, IBM PC DOS, 13 10 bytes

00000000: b04c cd29 0c20 3403 ebf8                 .L.). 4...

Listing:

B0 4C       MOV  AL, 'L'        ; start off with capital L
        PRINT:
CD 29       INT  29H            ; write to console
0C 20       OR   AL, 020H       ; lowercase it
34 03       XOR  AL, 3          ; swap between 'l' (0x6c) and 'o' (0x6f)
EB F8       JMP  PRINT          ; loop forever

A standalone PC DOS executable COM program. Output to console.

-3 bytes thx to @nununoisy's very clever use of XOR to swap between l and o.

Runtime:

enter image description here

Forever and ever...

fix comment; edited body
Source Link
640KB
  • 11.9k
  • 2
  • 35
  • 57
Loading
Post Undeleted by 640KB
Post Deleted by 640KB
Source Link
640KB
  • 11.9k
  • 2
  • 35
  • 57
Loading