Author Topic: Asmc Command-Line Reference  (Read 4023 times)

nidud

  • Member
  • *****
  • Posts: 2170
    • https://github.com/nidud/asmc
Re: Asmc Command-Line Reference
« Reply #15 on: March 05, 2021, 07:55:05 AM »
 :biggrin:

name, type, and size are the most common used words in programming so hogging them up as keywords are just, well, dumb.

jj2007

  • Member
  • *****
  • Posts: 11480
  • Assembler is fun ;-)
    • MasmBasic
Re: Asmc Command-Line Reference
« Reply #16 on: March 05, 2021, 08:00:50 AM »
Here are some more useless keywords for your exclusion list:

Code: [Select]
.486                                      ; create 32 bit code
.model flat, stdcall                      ; 32 bit memory model
option casemap :none                      ; case sensitive

.code
name db "Masm32:", 0
type db "not a typo", 0
size db "big, really big", 0
for db "for, yeah!", 0
instr db "inthestring", 0
catstr db "the cat bites you", 0
handle db "handles everything", 0
pointer db "pointless", 0
dword db "has 32 bits", 0
xmm db "a register", 0
end db "my last variable", 0

start:
mov eax, offset name
ret

end start

nidud

  • Member
  • *****
  • Posts: 2170
    • https://github.com/nidud/asmc
Re: Asmc Command-Line Reference
« Reply #17 on: March 05, 2021, 08:36:24 AM »
Same with a b c d -- not very clever.

for is a typical programming keyword so no problem there.

The standard libraries are made by linguists and most of the function names are covered there, so I guess instr and catstr derives from strstr and strcat.

As for the data types I think they are very good, as BYTE, WORD. I would preferred the NASM style XWORD, YWORD, and ZWORD (the last two already implemented), as appose to the MM extension thought.

end however should probably be a dot word.

jj2007

  • Member
  • *****
  • Posts: 11480
  • Assembler is fun ;-)
    • MasmBasic
Re: Asmc Command-Line Reference
« Reply #18 on: March 05, 2021, 11:32:24 AM »
For your inspiration, nidud - there is a lot of work to do :thumbsup:

Code: [Select]
.486
.model flat, stdcall
option casemap :none

.code
assume db "just a hypothesis", 0
and db "so on", 0
or db "what?", 0
not db "so obvious", 0
break db "let's have a break", 0
continue db "yes, go on!", 0
error db "a mistake", 0
width db "one metre", 0
high db "two metres", 0
mask db "you should wear one", 0
page db "DIN A4", 0
comment db "I hear", 0
local db "in my village", 0
near db "nearer, nearest", 0
public db "the opposite of private", 0
out db "in the woods", 0
record db "greetings from the Guiness book", 0
subtitle db "some movies have them", 0
union db "that's our strength", 0
fword db "don't use it", 0
short db "one metre and 50cm", 0
this db "is a surprise", 0
goto db "hell", 0
group db "several people", 0
uses db "there are many uses", 0
none db "zero, null, void", 0
word db "which one?", 0
even db "that's really odd", 0
odd db "even that one is odd", 0
sign db "put your signature here", 0
zero db "null", 0
NULL db "a useless person", 0
Var0 dd NULL
option db "not an option", 0
label db "it's just a name", 0
model db "should be beautiful", 0
flat db "apartment", 0
name db "Nidud", 0
type db "not a typo", 0
size db "big, really big", 0
for db "for, yeah!", 0
instr db "inthestring", 0
catstr db "the cat bites you", 0
pointer db "pointless", 0
dword db "has 32 bits", 0
sword db "a weapon", 0
xmm0 db "a register", 0
end db "my last variable", 0
handle db "we can handle that", 0
MyHandle HANDLE ? ; that type is not defined...
While db "I thought, ...", 0
Repeat db "yes, repeat that, please", 0
Until db "you get bored", 0
include db "the contrary of 'exclude'", 0
Else db "a female german name", 0

start: mov eax, offset name
ret
end start

Code: [Select]
*** Assemble using Asmc /nologo ***
 Assembling: tmp_file.asm
tmp_file.asm(6) : error A2008: syntax error : db
tmp_file.asm(7) : error A2008: syntax error : db
tmp_file.asm(8) : error A2008: syntax error : db
tmp_file.asm(9) : error A2008: syntax error : db
tmp_file.asm(19) : error A2008: syntax error : near
tmp_file.asm(20) : error A2008: syntax error : db
tmp_file.asm(21) : error A2008: syntax error : db
tmp_file.asm(22) : error A2008: syntax error : record
tmp_file.asm(24) : error A2008: syntax error : union
tmp_file.asm(25) : error A2008: syntax error : db "don't use it", 0
tmp_file.asm(26) : error A2008: syntax error : short
tmp_file.asm(28) : error A2170: directive must appear inside a macro
tmp_file.asm(29) : error A2008: syntax error : group
tmp_file.asm(32) : error A2008: syntax error : db "which one?", 0
tmp_file.asm(33) : error A2008: syntax error : db
tmp_file.asm(39) : error A2008: syntax error : db "not an option", 0
tmp_file.asm(40) : error A2008: syntax error : label
tmp_file.asm(42) : error A2008: syntax error : flat
tmp_file.asm(46) : error A2008: syntax error : 0
tmp_file.asm(47) : error A2008: syntax error : instr
tmp_file.asm(48) : error A2008: syntax error : catstr
tmp_file.asm(50) : error A2008: syntax error : db "has 32 bits", 0
tmp_file.asm(51) : error A2008: syntax error : db "a weapon", 0
tmp_file.asm(52) : error A2008: syntax error : xmm0
tmp_file.asm(53) : error A2008: syntax error : db "my last variable", 0
tmp_file.asm(55) : error A2008: syntax error : MyHandle
tmp_file.asm(56) : error A2026: constant expected
tmp_file.asm(56) : error A2008: syntax error : "I thought, ...", 0
tmp_file.asm(74) : fatal error A1008: unmatched macro nesting

nidud

  • Member
  • *****
  • Posts: 2170
    • https://github.com/nidud/asmc
Re: Asmc Command-Line Reference
« Reply #19 on: March 05, 2021, 11:45:41 AM »
 :biggrin:

There's not gonna be any changes beyond whats already made.