Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  login

"Besides, I think [Slackware] sounds better than 'Microsoft,' don't you?" (By Patrick Volkerding)


programming / comp.lang.asm.x86 / Re: Space Invaders

SubjectAuthor
o Re: Space Invadersrugxulo

1
Subject: Re: Space Invaders
From: rugx...@nospicedham.gmail.com
Newsgroups: comp.lang.asm.x86
Organization: A noiseless patient Spider
Date: Thu, 5 Sep 2019 03:54 UTC
References: 1 2 3
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: rugx...@nospicedham.gmail.com
Newsgroups: comp.lang.asm.x86
Subject: Re: Space Invaders
Date: Wed, 4 Sep 2019 20:54:37 -0700 (PDT)
Organization: A noiseless patient Spider
Lines: 68
Approved: fbkotler@myfairpoint.net - comp.lang.asm.x86 moderation team.
Message-ID: <80c4fe06-e324-4bfd-add1-a5ccf93af921@googlegroups.com>
References: <o7ivp4$145e$1@gioia.aioe.org> <8225f548-71b1-4dcc-ab13-4ec5f7770f1e@googlegroups.com>
<0206df74-bcba-4efc-b6de-0af5ff77da92@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Date: Thu, 05 Sep 2019 03:54:38 +0000
Injection-Info: h2725194.stratoserver.net; posting-host="888506115823166c094f795851996479";
logging-data="8487"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX186c7oCm+C4Obr9PpyWBY8HlnztHNDRdLE="
User-Agent: G2/1.0
Cancel-Lock: sha1:Ylc4XgSeI1wz6qcpYwUHddqppK0=
View all headers
Hi again,

On Saturday, July 15, 2017 at 9:11:38 PM UTC-5, rug...@nospicedham.gmail.com wrote:

I almost hate to revive this topic, but I did improve my scripts.

Much simpler now (and more standard/portable sed):

INV-FASM.SED :
*****************************************************************
1i\
OFFSET equ\
Offset equ\
LEA equ MOV
/^;/b
/ D[BW] /b
/LEA /b
s/\[0\]//
/,O[fF]/b
/CODE_SEG/d
/END/d
s/ DD / DW 0,/
s/Word Ptr //
s/ *PROC .*/:/
s/ES:\[/[ES:/
s/40://
s/\[\([0-9]\)\]/_\1/
s/\([A-Z][a-zA-Z][a-zA-Z][a-zA-Z0-9_]*\),/[\1],/
s/,\([A-Z][a-zA-Z][a-zA-Z][a-zA-Z0-9_]*\)/,[\1]/
s/\([ID].C\) *\([A-Z][^ ][^ ][^ ]*\)/\1 [\2]/
/_[0-9]\]/s/_/+/
/RemoveNewInt9:/,/CLC/s/\[\([^0]\)/[cs:\1/
*****************************************************************

INV-NASM.SED :
*****************************************************************
1i\
%idefine offset\
%define LEA MOV\
%define B byte\
%define W word\
%include "inv-nasm.inc"
s/ DD / DW 0,/
/ D[BW] /{
h
s/^\([A-Z][^ ]*\) *D\(.\) .*/%define s_\1 \2/w inv-nasm.inc
g
b
}
/^;/b
/LEA /b
s/\[0\]//
/,O[fF]/b
/CODE_SEG/d
/END/d
s/ *PROC .*/:/
s/ES:\[/[ES:/
s/40://
s/\[\([1-9]\)\]/+\1/
s/Word Ptr //
s/\[\(.*[+]BX\)\]/\1/
s/\([A-Z][a-zA-Z][a-zA-Z][a-zA-Z0-9_+]*\),/s_\1[\1],/
s/,\([A-Z][a-zA-Z][a-zA-Z][a-zA-Z0-9_+]*\)/,s_\1[\1]/
s/\([ID].C\) *\([A-Z][^ ][^ ][a-zA-Z0-9+]*\)/\1 s_\2[\2]/
s/[+].*\[/[/
/RemoveNewInt9:/,/CLC/s/\[\([^0]\)/[cs:\1/
*****************************************************************



1
rocksolid light 0.7.2
clearneti2ptor