flat assembler
Message board for the users of flat assembler.

Index > Windows > talking with COM port, cash drawer

Author
Thread Post new topic Reply to topic
sleepsleep



Joined: 05 Oct 2006
Posts: 12749
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 0010456
sleepsleep 19 Mar 2008, 06:42
recently, they bought a new cash drawer, connected through COM port.
according to the manual that came with it,

To open the drawer through COM1 under QBASIC:

OPEN "COM1:300,N,8,1"
FOR RANDOM AS #1
PRINT #1,"0000000000"

any idea how to convert it into fasm like?
Post 19 Mar 2008, 06:42
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 12749
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 0010456
sleepsleep 19 Mar 2008, 07:36
problem solved.
coded using vb

open "COM1" for write access as #1
print #1,"0000000000"
close #1

:p
Post 19 Mar 2008, 07:36
View user's profile Send private message Reply with quote
AlexP



Joined: 14 Nov 2007
Posts: 561
Location: Out the window. Yes, that one.
AlexP 19 Mar 2008, 12:54
Or you can use OllyDbg for Windows to dis-asm it, like most people (including me) do to figure stuff like that out. It should give you what u need if u can find the right code.
Post 19 Mar 2008, 12:54
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20309
Location: In your JS exploiting you and your system
revolution 19 Mar 2008, 13:37
Don't you people ever read the docs? The com port is very simple to use in assembly. Just open a handle (CreateFile) and write/read data (WriteFile/ReadFile).

edit: Although it would be faster to read the appropriate docs than to find some program and reverse it, on reflection, I can see that it may not be so much fun.
Post 19 Mar 2008, 13:37
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.