mirror of
https://gitlab.os-k.eu/os-k-team/kvisc.git
synced 2023-08-25 14:05:46 +02:00
local data
This commit is contained in:
parent
847f2ba9d6
commit
c2603b9692
11
as/k-as.py
11
as/k-as.py
@ -212,20 +212,25 @@ def parse_preproc(line):
|
||||
leave()
|
||||
sys.exit(1)
|
||||
|
||||
label = tok[0]
|
||||
if label[0] == '.':
|
||||
label = plastlabel + label
|
||||
|
||||
plabels_data[label] = pdata
|
||||
|
||||
# number data
|
||||
if is_number(tok[2]):
|
||||
plabels_data[tok[0]] = pdata
|
||||
written = b_data.write(int(tok[2], base=0).to_bytes(8, byteorder='little', signed=False))
|
||||
assert(written == 8)
|
||||
pdata += written
|
||||
|
||||
# string data
|
||||
elif tok[2][0] in "'\"":
|
||||
s = tok[2].strip()
|
||||
assert(s[-1] == tok[2][0])
|
||||
|
||||
s = s[1:-1]
|
||||
|
||||
plabels_data[tok[0]] = pdata
|
||||
|
||||
real_len = 0
|
||||
escaping = False
|
||||
|
||||
|
@ -1,17 +1,16 @@
|
||||
; The OS/K Team licences this file to you under the MIT license.
|
||||
; See the LICENSE file in the project root for more information.
|
||||
|
||||
hw = "Hello World\n:)"
|
||||
|
||||
;
|
||||
; Main function
|
||||
;
|
||||
main:
|
||||
enter
|
||||
|
||||
mov ax0, hw
|
||||
mov ax0, .hw
|
||||
call print
|
||||
|
||||
leave
|
||||
ret
|
||||
|
||||
.hw = "Hello World\n:)"
|
||||
|
Loading…
x
Reference in New Issue
Block a user