output :


0 1 2 3 4 5 6 7 8 9
1 1
2    2
3      3
4        4
5          5
6             6
7               7
8                 8
9                    9


>>> i use the COMMAND PROMPT.....
>>>help me for get this output please....for assembler there.. :sad:
Posted on 2010-07-15 07:06:26 by shimene03
org $100
; Works with fasm
        mov    ah, 9
        mov    dx, text
        int    $21

        xor    ax, ax
        int    $16

        int    $20

text:
        times  10 dw %-1 + '0 '
repeat 9
        db      13, 10
        dw      % + '0 '
        times  %-1 dw '  '
        db      % + '0'
end repeat

db '$'


I can provide code-only in solution one or maybe two months from now. ;)
Posted on 2010-07-15 10:11:54 by LocoDelAssembly
sir....its error... we use a command prompt...the code must ASCII code......please help sir....  :)
Posted on 2010-07-17 19:25:23 by shimene03
shimene03,

What's wrong with LocoDelAssembly's code? It compiles fine (using fasm) and outputs just the same text you've provided. Actually it can't fail: directives after text: label can be rewritten as

db "0 1 2 3 4 5 6 7 8 9", 13, 10
db "1 1", 13, 10
db "2  2", 13, 10
db "3    3", 13, 10
db "4      4", 13, 10
db "5        5", 13, 10
db "6          6", 13, 10
db "7            7", 13, 10
db "8              8", 13, 10
db "9                9$"
Posted on 2010-07-17 22:34:36 by baldr

org $100
; Works with fasm
        mov     ah, 9
        mov     dx, text
        int     $21

        xor     ax, ax
        int     $16

        int     $20

text:
        times   10 dw %-1 + '0 '
repeat 9
        db      13, 10
        dw      % + '0 '
        times   %-1 dw '  '
        db      % + '0'
end repeat

db '$'


I can provide code-only in solution one or maybe two months from now. ;)




>>>>>>>>>>sir i got it...thank you sir...  :P
Posted on 2010-07-18 03:29:20 by shimene03
If you want a "code only" solution, try writing the comments first:


; first line
;  for N 0 to 9
;    print N
;    print space
;    next
;  print newline
; remaining lines
;    for N 1 to 9
;      print N
;      print N spaces
;      print N
;      print newline
;      next


Something like that...

Best,
Frank



Posted on 2010-07-18 10:35:28 by fbkotler