flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Arturx87 16 Mar 2023, 07:44
How to draw character in vga mode (13h) in my select position (example 2px x 4px)
Code: Mov al,’a’ Mov ah,0eh Int10h Thanks for Help |
|||
![]() |
|
edfed 17 Mar 2023, 15:52
Code: print: .char: pushad movzx esi,al shl esi,3 add esi,bioschars mov edi,.base mov eax,[edi+.x] mov ebx,[edi+.y] mov ch,8 .loadline: mov dh,[esi] mov dl,80h .nextdot: test dh,dl je @f mov cl,[edi+.c];31 call put.pixel @@: inc eax shr dl,1 jne .nextdot inc ebx mov eax,[edi+.x] inc esi dec ch jne .loadline add dword[edi+.x],8 popad ret .string: ;esi asciiz string @@: lodsb or al,al je @f call .char jmp @b @@: ret .base = 10200h .x = 0 .y = 4 .c = 8 bioschars = 0ffa6eh .xl=16 .yl=16 char table is at 0ffa6eh putpixel is just like that: Code: .pixel: push ebx cmp eax,screen.xl jae @f cmp ebx,screen.yl jae @f imul ebx,screen.xl mov [screen.base+eax+ebx],cl ; xor [screen.base+eax+ebx],cl @@: pop ebx ret and screen.base can be the double buffer, or direct to vram, as you want. for CGA mode, it starts at 0a0000h this code is intended for protected mode but just whows how to print chars. |
|||
![]() |
|
DimonSoft 17 Mar 2023, 20:17
There used to be functions that set/retrieve the current cursor position. Then one has to just add 1 plus 1.
|
|||
![]() |
|
macomics 17 Mar 2023, 20:43
edfed wrote: char table is at 0ffa6eh To get pointers to the sign generator tables , there is a function AH=0x1130 DimonSoft wrote: There used to be functions that set/retrieve the current cursor position. Then one has to just add 1 plus 1. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.