flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
DOS386 01 Sep 2007, 09:45
> I need it urgently
Homework ?? Typical for PASCAL forums ![]() > .asm code to show 2-digit number Use DIV instruction, 16-bit dividend , 8-bit divisor (10) ![]() > every half a second $046C , see RBIL memory map http://board.flatassembler.net/download.php?id=3093 |
|||
![]() |
|
Picnic 01 Sep 2007, 10:06
Here's one way to count from 00 to 99:
Code: org 100h xor ax,ax go: push ax add ax,3030h xchg ah,al int 29h xchg ah,al int 29h mov al,0dh int 29h mov al,0ah int 29h pop ax inc al aaa cmp ax,0909h jbe go ret |
|||
![]() |
|
0.1 01 Sep 2007, 10:41
Do this:
$|=1; for ('00' .. '99') { select(undef, undef, undef, 0.5); print("$_ "; } PS: Sorry BAD joke! |
|||
![]() |
|
eek 01 Sep 2007, 13:27
This will do the counting bit for ya.
ZONE S L org cs:100 mov bp,B800 ;printing mov es,bp ;bit mov di,722 ; ; mov ax,9030 mov bx,11110000b mov cx,9030 loop es:mov [di],al cmp al,39 jz Tens inc di inc di es:mov b[di],"," inc di inc di inc ax jmp loop ; Tens inc cx inc di inc di es:mov b[di],"," inc di inc di and ax,bx es:mov [di],cl loop2 inc di inc di es:mov [di],al cmp al,39 jz Tens inc di inc di es:mov b[di],"," inc di inc di inc ax mov bp,sp mov dx,[bp] es:mov b[di],cl jmp loop2 ; END [color=#][/color][color=#][/color][color=#][/color][color=#][/color][color=#][/color][color=#][/color] |
|||
![]() |
|
sinsi 01 Sep 2007, 15:11
Code: for x=0 to 9 for y=0 to 9 print str$("0"+x & "0"+y);" "; if user_pressed_a_key then print_a_minus wait(half_a_sec) next y next x print "this is my homework" print "answer is from several ASM programming sites" print "but (C)(R)(Tm) the_drunk_sinsi" loser |
|||
![]() |
|
jharvey 02 Sep 2007, 02:58
Thank you guys!!!
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.