- Thanks received
- 10,019
Good lad!![]()
Mind you, is it worth saving 237 years when we're so heavily bound by the cost of display RAM I/O?

Good lad!![]()

Mind you, is it worth saving 237 years when we're so heavily bound by the cost of display RAM I/O?![]()
Good lad!However, it don't work... You've broked it. You've not got the 5 bytes on the front that set the display mode.
mov ax,b800
mov ds,ax
mov es, ax
mov ax,0730
xor di,di
mov cx,10
rep stosw

Quoted

Thanks Nick, modified as follows...
Code:A 100 mov ax,2 int 10 mov ax,b800 mov ds,ax mov ax,30 xor di,di mov cx,f ds: mov [di],al inc di dec cx inc di cmp cx,0 jne 113 mov di,1E mov cx,10 mov al,[di] inc al cmp al,3a je 12F mov [di],al jmp 11D mov al,30 mov [di],al dec di dec di cmp di,0 je 13C jmp 123 mov ax,4c00 int 21 N test.COM RCX 41 W Q
If you follow the instructions you will find it obvious that the code hasn't hung.
Code:;********* File: test.com ************* ; code SEGMENT ASSUME CS:code, DS:code ORG 100h strt: MOV AX ,0002h INT 10 ; Video Function Call MOV AX ,B800h MOV DS,AX MOV AX ,0030h XOR DI,DI MOV CX ,0010h MOV DS:[DI],AL INC DI INC DI DEC CX CMP CX,+00h JNZ J00113 J0011D: MOV DI ,0020h MOV CX ,0010h J00123: MOV AL,[DI] INC AL CMP AL,3Ah JZ J0012F MOV [DI],AL JMP J0011D J0012F: MOV AL ,30h MOV [DI],AL DEC DI DEC DI CMP DI,+00h JZ J0013C JMP J00123 J0013C: MOV AX ,4C00h INT 21 ; DOS Function Call code ENDS END strt

This one is 65 bytes and it actually works.

MOV AX,0002
INT 10
MOV AX,B800
MOV DS,AX
MOV ES,AX
MOV AX,0730
XOR DI,DI
MOV CX,000A
REP STOSW
MOV DI,0012
MOV CX,000B
MOV AL,[DI]
INC AL
CMP AL,3A
JZ 0128
MOV [DI],AL
JMP 0116
MOV AL,30
MOV [DI],AL
SUB DI,+02
JS 0133
JMP 011C
MOV AX,4C00
INT 21

->>> JNZ J00113
J00113 label isn't specified in your source code, did you compile it?
I just had to spend an hour trying to locate decent assembler, had to settle on Turbo Assembler![]()
This one is 65 bytes and it actually works.
inc di
dec cx
inc di
cmp cx,0
jne 113
inc di
inc di
dec cx
jne 113