Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 655529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:36:49+00:00 2026-05-13T22:36:49+00:00

This is inspired by/taken from this thread: http://www.allegro.cc/forums/thread/603383 The Problem Assume the user gives

  • 0

This is inspired by/taken from this thread: http://www.allegro.cc/forums/thread/603383

The Problem

Assume the user gives you a numeric input ranging from 1 to 7. Input should be taken from the console, arguments are less desirable.

When the input is 1, print the following:

***********
 ********* 
  *******    
   *****   
    ***    
     *     

Values greater than one should generate multiples of the pattern, ending with the one above, but stacked symmetrically. For example, 3 should print the following:

*********** *********** ***********
 *********   *********   ********* 
  *******     *******     *******  
   *****       *****       *****   
    ***         ***         ***    
     *           *           *     
      *********** ***********
       *********   ********* 
        *******     *******  
         *****       *****   
          ***         ***    
           *           *     
            ***********
             ********* 
              *******  
               *****   
                ***    
                 *     

Bonus points if you print the reverse as well.

      *********** ***********
       *********   ********* 
        *******     *******  
         *****       *****   
          ***         ***    
           *           *     
            ***********
             ********* 
              *******  
               *****   
                ***    
                 *     
                 *     
                ***    
               *****   
              *******  
             ********* 
            ***********
           *           *     
          ***         ***    
         *****       *****   
        *******     *******  
       *********   ********* 
      *********** ***********

Can we try and keep it to one answer per language, that we all improve on?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T22:36:49+00:00Added an answer on May 13, 2026 at 10:36 pm

    Assembler, 165 bytes assembled

    Build Instructions

    1. Download A86 from here
    2. Add a reference to the A86 executable into your DOS search path
    3. Paste the code below into a text file (example: triforce.asm)
    4. Invoke the assembler: a86 triforce.asm
    5. This will create a .COM file called triforce.com
    6. Type triforce to run

    This was developed using the standard WinXP DOS box (Start->Programs->Accessories->Command Prompt). It should work with other DOS emulators.

    Assemble using A86 and requires WinXP DOS box to run the .COM file it produces. Press ‘q’ to exit, keys 1-7 to draw the output.

      l20:mov ah,7
          int 21h
          cmp al,'q'
          je ret
          sub al,'0'
          cmp al,1
          jb l20
          cmp al,7
          ja l20
          mov [l0-1],al
          mov byte ptr [l7+2],6
          jmp $+2
          mov ah,2
          mov ch,0
          mov bh,3
       l0:mov bl,1
       l1:mov dh,0
       l3:cmp dh,ch
          je l2
          mov dl,32
          int 21h
          inc dh
          jmp l3
          ret
       l2:mov dh,bh
       l6:mov cl,12
       l5:mov dl,42
          cmp cl,bl
          ja l4
          mov dl,32
          cmp dh,1
          je l21
       l4:int 21h
          dec cl
          jnz l5
      l21:dec dh
          jnz l6
          mov dl,10
          int 21h
          mov dl,13
          int 21h
      l10:inc ch
       l9:add bl,2
       l7:cmp ch,6
          jne l1
      l13:add byte ptr [l7+2],6
      l11:dec bh
      l12:cmp bh,0
          jne l0
          xor byte ptr [l0+1],10
          xor byte ptr [l9+1],40
          xor byte ptr [l10+1],8
          xor byte ptr [l13+1],40
          sub byte ptr [l7+2],12
          mov dh,[l0-1]
          inc dh
          xor [l12+2],dh
          xor byte ptr [l11+1],8
          xor byte ptr [l1+1],1
          inc bh
          cmp byte ptr [l0+1],11
          je l0
          jmp l20
    

    It uses lots of self-modifying code to do the triforce and its mirror, it even modifies the self-modifying code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My question is partially inspired by this article written by Eric Lippert: http://blogs.msdn.com/ericlippert/archive/2009/10/19/what-is-this-thing-you-call-thread-safe.aspx Using
This is more a conceptual question. It's inspired from using some extremely large table
This thread inspired the question. Here are the code samples again. I'm looking for
This question is inspired from another topic which poses this question: Find the first
This is inspired by Does File.Copy() from a network share to another share on
Note: this was inspired by WebBrowser Event Properties? Why am I able to access
This question is inspired by the article Why are Facebook, Digg, and Twitter so
This question is inspired by this question . I'd like to get a dictionary
Inspired by this question , I'd like to know whether there is any trick
Inspired by this discussion , after some googling I wasn't able to find an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.