Print the ASCII table The task is to display n characters of the ASCII table.

You may write a function (or a program that takes the argument as a parameter, STDIN is allowed as well) that takes a parameter n, which will be the index of the last character to print.

The task is quite simple, so as an example here's a possible implementation in Python 2.7:

(lambda n:map(chr, range(n)))(256)


As I said it's a simple task. So this is code-golf and the shortest codes wins!

EDIT

As some of you pointed out this code doesn't print the result. It's just an example since I might struggle explaining the problem in english ;-).

EDIT2

Feel free to post the answer in any programming language, even if it's not the shortest code. Maybe there are some interesting implementations out there!

EDIT3

Fixed the example so it prints the result.
brainfuck - 169 146 142 bytes
-[+&gt;+[+&lt;]&gt;+]&gt;+&gt;&gt;,[&gt;,]&lt;[&lt;]&lt;[-&gt;&gt;[-&gt;]&lt;[&lt;]&lt;]&gt;&gt;&gt;[[&lt;[-&lt;+&lt;+&lt;+&gt;&gt;&gt;]+++++++++[&lt;[-&lt;+&gt;]&lt;&lt;[-&lt;+&gt;&gt;&gt;+&lt;&lt;]&lt;[-&gt;+&lt;]&gt;&gt;&gt;&gt;-]]&lt;,&lt;&lt;,&gt;[-&gt;&gt;&gt;+&lt;&lt;&lt;]&gt;&gt;&gt;----------&gt;]&lt;-[-&gt;.+&lt;]

Limitations:

EOF must be 0
Requires 8-bit wrapping cells
Because of ^, mods input by 256

Not the shortest answer here, but hey, brainfuck! This would be a really, really good brainfuck challenge, except for the fact that it requires human readable input without guaranteeing the number of digits. I could have required input to have leading zeroes to make it 3 characters long, but what fun is that? :D One major problem with taking input this way is that brainfuck's only branching or looping structure checks if the current cell is zero or not. When the input can contain zeroes, it can cause your code to take branches it shouldn't be taking. To solve this problem, I store each digit of input plus 1, then subtract the excess at the last possible second. That way, I always know where my zeroes are.
I did say that this would have been a great brainfuck challenge without having to parse input. Why is that? Well, let's pretend that we don't take a numeric input. We'll say the challenge is &quot;Given a byte of input, output all ASCII characters below that byte&quot;. Here's what my answer would be:

brainfuck - 8 bytes
,[-&gt;.+&lt;]


It's quite a difference! The real program uses 135 instructions to collect the input (over 95% of the program!), just because it's a human typing it. Store the number as a byte and give that to me, and it only takes one.
(Fun fact: If you understood the hypothetical program, then congratulations! You understand brainfuck in its entirety. The whole language has only eight commands, and that program happens to use each one exactly once.)
Explanation
-[+&gt;+[+&lt;]&gt;+]&gt;+               abuse 8 bit wrapping to put 47 in cell 4

&gt;&gt;,[&gt;,]                      starting in cell 6; get each character of input

&lt;[&lt;]&lt;[-&gt;&gt;[-&gt;]&lt;[&lt;]&lt;]          subtract the value of cell 4 from each input character
                             '0' has an ascii value of 47 so subtracting 47 from each
                             digit gives you that digit's value plus 1

&gt;&gt;&gt;[                         if the number is in more than one cell
                             (when the program first starts this means &quot;if the input has
                             more than one digit&quot;)

[&lt;[-&lt;+&lt;+&lt;+&gt;&gt;&gt;]               copy first input cell to 3 new cells

+++++++++[&lt;[-&lt;+&gt;]&lt;&lt;          do some fancy addition magic to multiply that value by 10
[-&lt;+&gt;&gt;&gt;+&lt;&lt;]&lt;[-&gt;+&lt;]&gt;&gt;&gt;&gt;-]]

&lt;,&lt;&lt;,&gt;                       clean up a bit (abusing comma to set cells to 0)

[-&gt;&gt;&gt;+&lt;&lt;&lt;]&gt;&gt;&gt;                add the value to the next cell of input

----------                   because we multiplied (the digit plus 1) by 10; the answer
                             is 10 too high; so subtract 10

&gt;]                           if the input is still in multiple cells; do the song and
                             dance again (multiply by 10; add to next cell; subtract 10)

&lt;-                           we never got a chance to fix the final digit; so it's still 1
                             too high

               ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
               ;;         we have now finished processing input         ;;
               ;;     the tape is empty except for the current cell     ;;
               ;;  the current cell contains the number that was input  ;;
               ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[                            while the cell containing input != 0

-                            subtract 1 from it

&gt;.+                          go a cell to the right; output that cell; then add 1

&lt;]                           repeat