mirror of
https://gitlab.os-k.eu/os-k-team/kvisc.git
synced 2023-08-25 14:05:46 +02:00
stuff
This commit is contained in:
parent
3ab03703f4
commit
778c56cc60
9
fs/abcdef.txt
Normal file
9
fs/abcdef.txt
Normal file
@ -0,0 +1,9 @@
|
||||
abc
|
||||
def
|
||||
ghi
|
||||
jkl
|
||||
mno
|
||||
pqr
|
||||
stu
|
||||
vwx
|
||||
yz$
|
0
fs/empty.txt
Normal file
0
fs/empty.txt
Normal file
@ -6,7 +6,6 @@
|
||||
; int doprnt(PUTC putc, int n, const char *fmt, va_list ap)
|
||||
;
|
||||
doprnt:
|
||||
dump 0
|
||||
enter 8
|
||||
|
||||
mov q[rbp-8], rbx
|
||||
@ -30,9 +29,9 @@ doprnt:
|
||||
mov rdi, rbx
|
||||
scasb.rep.nz rdi, '%'
|
||||
|
||||
.print_regular:
|
||||
; everything below rdi is a regular character; print it
|
||||
b.e rbx, rdi, .check_modf
|
||||
.print_regular:
|
||||
b.z rbx, rdi, .check_modf
|
||||
|
||||
mov ax0, b[rbx]
|
||||
call .doput
|
||||
@ -49,14 +48,14 @@ doprnt:
|
||||
mov rax, b[rbx+1]
|
||||
add rbx, 2
|
||||
|
||||
b.e rax, 's', .modf_s
|
||||
b.e rax, 'c', .modf_c
|
||||
b.e rax, 'p', .modf_p
|
||||
b.e rax, 'x', .modf_x
|
||||
b.e rax, 'd', .modf_d
|
||||
b.e rax, 'o', .modf_o
|
||||
b.e rax, 'b', .modf_b
|
||||
b.e rax, '%', .modf_percent
|
||||
b.z rax, 's', .modf_s
|
||||
b.z rax, 'c', .modf_c
|
||||
b.z rax, 'p', .modf_p
|
||||
b.z rax, 'x', .modf_x
|
||||
b.z rax, 'd', .modf_d
|
||||
b.z rax, 'o', .modf_o
|
||||
b.z rax, 'b', .modf_b
|
||||
b.z rax, '%', .modf_percent
|
||||
|
||||
; unrecognized
|
||||
jmp .bad_modifier
|
||||
@ -176,7 +175,6 @@ doprnt:
|
||||
mov rsi, q[rbp-48]
|
||||
mov nx3, q[rbp-56]
|
||||
leave
|
||||
dump 1
|
||||
ret
|
||||
;
|
||||
; prints ax0
|
||||
|
@ -13,7 +13,6 @@ putc:
|
||||
; int printf(const char *fmt, ...)
|
||||
;
|
||||
printf:
|
||||
dump 0
|
||||
mov ax2, ax0
|
||||
mov ax0, putc
|
||||
mov ax1, STRLEN_MAX
|
||||
@ -24,7 +23,6 @@ printf:
|
||||
; int nprintf(const char *fmt, int n, ...)
|
||||
;
|
||||
nprintf:
|
||||
dump 0
|
||||
mov ax2, ax0
|
||||
mov ax0, putc
|
||||
lea ax3, b[rsp+8]
|
||||
|
@ -30,6 +30,7 @@ main:
|
||||
.input_loop:
|
||||
pause
|
||||
pause
|
||||
pause
|
||||
|
||||
; Fill .buf with user input
|
||||
scan rax
|
||||
|
@ -55,18 +55,17 @@
|
||||
match-empty-string-at-end = "TRUE">
|
||||
|
||||
<!-- KVISC -->
|
||||
<keyword>(inv|flg|[re]?pc)</keyword>
|
||||
<keyword>[re]?[abcd]xl?</keyword>
|
||||
<keyword>[re]?[sd]il?</keyword>
|
||||
<keyword>[re]?[sbi]pl?</keyword>
|
||||
<keyword>(inv|flg|[re]pc)</keyword>
|
||||
<keyword>[re][abcdfg]x</keyword>
|
||||
<keyword>[re][sd]i</keyword>
|
||||
<keyword>[re][sbi]p</keyword>
|
||||
<keyword>[a-z]x?[0-9]+[bwdlq]?</keyword>
|
||||
|
||||
<!-- x86-64 -->
|
||||
<keyword>[c-gs]s</keyword>
|
||||
<keyword>[re]flags</keyword>
|
||||
<keyword>([gil]d)tr</keyword>
|
||||
<keyword>[x-z]mm[0-9]+</keyword>
|
||||
<keyword>[re]?[a-d][xhl]</keyword>
|
||||
<keyword>[x-z]?mmx?[0-9]+</keyword>
|
||||
<keyword>(s[at]|[dc]r)[0-9]+</keyword>
|
||||
</keyword-list>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user