[Wisp-cvs] wisp/users/dig cpmhello.tran,1.2,1.3 doshello.tran,1.1,1.2 hello.tran,1.8,1.9 mswhello.tr
Status: Alpha
Brought to you by:
digg
From: <di...@us...> - 2003-05-22 17:21:09
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv8273 Modified Files: cpmhello.tran doshello.tran hello.tran mswhello.tran tran-builtins tran.py Log Message: implemented the |section| word Index: cpmhello.tran =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/cpmhello.tran,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- cpmhello.tran 19 May 2003 09:21:09 -0000 1.2 +++ cpmhello.tran 22 May 2003 17:20:58 -0000 1.3 @@ -16,7 +16,7 @@ 5 $call 0 $rst -.data +section .data label message "Hello, world!$" times b, Index: doshello.tran =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/doshello.tran,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- doshello.tran 18 May 2003 23:18:06 -0000 1.1 +++ doshello.tran 22 May 2003 17:21:00 -0000 1.2 @@ -20,7 +20,7 @@ %ax #x4C00 $mov #x21 $int -.data +section .data label message "Hello, world!$" times b, Index: hello.tran =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/hello.tran,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- hello.tran 18 May 2003 22:45:15 -0000 1.8 +++ hello.tran 22 May 2003 17:21:01 -0000 1.9 @@ -21,7 +21,7 @@ %eax 1 $mov #x80 $int -.data +section .data label message "Hello, world!\n" dup =: #msglen \ assign its length to #msglen Index: mswhello.tran =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/mswhello.tran,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- mswhello.tran 18 May 2003 22:45:15 -0000 1.17 +++ mswhello.tran 22 May 2003 17:21:01 -0000 1.18 @@ -17,13 +17,13 @@ 'message '#msglen 'rckeep 0 WriteFile drop 0 ExitProcess -.data +section .data label message "Hello, world!\r\n" dup =: #msglen times b, -.bss +section .bss label rckeep 1 tetras reserve Index: tran-builtins =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/tran-builtins,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- tran-builtins 22 May 2003 06:27:36 -0000 1.40 +++ tran-builtins 22 May 2003 17:21:01 -0000 1.41 @@ -158,6 +158,9 @@ if not name[0] in '&#!': name = '&' + name interpreter.regstack.append(Symbol_Literal(name)) +section|name + interpreter.switch_to_section(name) + swap any any y = interpreter.regstack.pop(); x = interpreter.regstack.pop() interpreter.regstack.append(y); interpreter.regstack.append(x) Index: tran.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/tran.py,v retrieving revision 1.127 retrieving revision 1.128 diff -u -d -r1.127 -r1.128 --- tran.py 22 May 2003 17:17:38 -0000 1.127 +++ tran.py 22 May 2003 17:21:03 -0000 1.128 @@ -251,15 +251,10 @@ __slots__ = 'sections current recordee regpaths hanging regstack state meaning register_names toksrc included byte_order'.split() universal_meaning = make_universal_meaning('tran-builtins') - def make_section_switcher (this, name): - def switcher (interpreter): - interpreter.switch_to_section(name) - return switcher def add_section (this, name): if this.sections.has_key(name): raise 'Duplicate section name', name this.sections[name] = Linkie(this.byte_order) - this.meaning[name] = 'builtin', this.make_section_switcher(name), 0 def switch_to_section (this, name): this.current = this.sections[name] |